diff --git a/Makefile.am b/Makefile.am index be70526..6bc419f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/configure.ac b/configure.ac index b95a5d8..5fe1deb 100644 --- a/configure.ac +++ b/configure.ac @@ -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])