buildsys: add option to enable/disable building tests
When doing cross-compilation, the tests are meant to be run on the target. However, they are currently not installed, so it does not make sense to build tehm to start with. Additionally, when doing a system for production, those tests are not needed anyway. Add a configure option to disable building the tests altogether. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user