diff --git a/Makefile.am b/Makefile.am index 7d8164a..60fe178 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,8 @@ # Generic definitions -SUBDIRS = lib doc utils test-tool tests examples +SUBDIRS = lib doc utils test-tool examples +if BUILD_TESTS +SUBDIRS += tests +endif ACLOCAL_AMFLAGS =-I m4 AUTOMAKE_OPTIONS = foreign subdir-objects diff --git a/configure.ac b/configure.ac index 54f9d4f..69cefd5 100644 --- a/configure.ac +++ b/configure.ac @@ -47,6 +47,14 @@ AC_ARG_ENABLE([manpages], AM_CONDITIONAL(BUILD_MANPAGES, [expr "$ENABLE_MANPAGES" : yes > /dev/null 2>&1]) +AC_ARG_ENABLE([tests], + [AC_HELP_STRING([--enable-tests], + [Enable building tests])], + [ENABLE_TESTS=$enableval], + [ENABLE_TESTS=yes]) +AM_CONDITIONAL([BUILD_TESTS], + [expr "$ENABLE_TESTS" : yes > /dev/null 2>&1]) + AC_CONFIG_HEADER(config.h) AC_CHECK_LIB([gcrypt], [gcry_control])