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:
@@ -1,11 +1,14 @@
|
|||||||
# Generic definitions
|
# Generic definitions
|
||||||
SUBDIRS = lib doc utils examples
|
SUBDIRS = lib doc utils
|
||||||
if BUILD_TEST_TOOL
|
if BUILD_TEST_TOOL
|
||||||
SUBDIRS += test-tool
|
SUBDIRS += test-tool
|
||||||
endif
|
endif
|
||||||
if BUILD_TESTS
|
if BUILD_TESTS
|
||||||
SUBDIRS += tests
|
SUBDIRS += tests
|
||||||
endif
|
endif
|
||||||
|
if BUILD_EXAMPLES
|
||||||
|
SUBDIRS += examples
|
||||||
|
endif
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS =-I m4
|
ACLOCAL_AMFLAGS =-I m4
|
||||||
AUTOMAKE_OPTIONS = foreign subdir-objects
|
AUTOMAKE_OPTIONS = foreign subdir-objects
|
||||||
|
|||||||
@@ -63,6 +63,14 @@ AC_ARG_ENABLE([tests],
|
|||||||
AM_CONDITIONAL([BUILD_TESTS],
|
AM_CONDITIONAL([BUILD_TESTS],
|
||||||
[expr "$ENABLE_TESTS" : yes > /dev/null 2>&1])
|
[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_CONFIG_HEADER(config.h)
|
||||||
|
|
||||||
AC_CHECK_LIB([gcrypt], [gcry_control])
|
AC_CHECK_LIB([gcrypt], [gcry_control])
|
||||||
|
|||||||
Reference in New Issue
Block a user