buildsys: add option to enable/disable building the examples

In a production system, the examples are not needed.

Add a configure option to disable building the examples.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
This commit is contained in:
Yann E. MORIN
2018-12-04 10:47:34 +01:00
parent eec4954986
commit a8d54cc82d
2 changed files with 12 additions and 1 deletions

View File

@@ -1,11 +1,14 @@
# Generic definitions
SUBDIRS = lib doc utils examples
SUBDIRS = lib doc utils
if BUILD_TEST_TOOL
SUBDIRS += test-tool
endif
if BUILD_TESTS
SUBDIRS += tests
endif
if BUILD_EXAMPLES
SUBDIRS += examples
endif
ACLOCAL_AMFLAGS =-I m4
AUTOMAKE_OPTIONS = foreign subdir-objects

View File

@@ -63,6 +63,14 @@ AC_ARG_ENABLE([tests],
AM_CONDITIONAL([BUILD_TESTS],
[expr "$ENABLE_TESTS" : yes > /dev/null 2>&1])
AC_ARG_ENABLE([examples],
[AC_HELP_STRING([--enable-examples],
[Enable building examples])],
[ENABLE_EXAMPLES=$enableval],
[ENABLE_EXAMPLES=yes])
AM_CONDITIONAL([BUILD_EXAMPLES],
[expr "$ENABLE_EXAMPLES" : yes > /dev/null 2>&1])
AC_CONFIG_HEADER(config.h)
AC_CHECK_LIB([gcrypt], [gcry_control])