Land #585, add option to disable tests to autoconf

This commit is contained in:
Brent Cook 2020-05-07 06:06:19 -05:00
commit 049c874d76
2 changed files with 13 additions and 1 deletions

View File

@ -1,4 +1,7 @@
SUBDIRS = crypto ssl tls include apps tests man SUBDIRS = crypto ssl tls include apps man
if ENABLE_TESTS
SUBDIRS += tests
endif
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
pkgconfigdir = $(libdir)/pkgconfig pkgconfigdir = $(libdir)/pkgconfig

View File

@ -66,6 +66,15 @@ AC_ARG_ENABLE([extratests],
AS_HELP_STRING([--enable-extratests], [Enable extra tests that may be unreliable on some platforms])) AS_HELP_STRING([--enable-extratests], [Enable extra tests that may be unreliable on some platforms]))
AM_CONDITIONAL([ENABLE_EXTRATESTS], [test "x$enable_extratests" = xyes]) AM_CONDITIONAL([ENABLE_EXTRATESTS], [test "x$enable_extratests" = xyes])
AC_ARG_ENABLE([tests],
[AS_HELP_STRING([--disable-tests], [Disable tests @<:@default=enabled@:>@])],
[
if ! test "x${enable_tests}" = "xyes"; then
enable_tests="no"
fi],
[enable_tests="yes"])
AM_CONDITIONAL([ENABLE_TESTS], [test "x$enable_tests" = xyes])
# Add CPU-specific alignment flags # Add CPU-specific alignment flags
old_cflags=$CFLAGS old_cflags=$CFLAGS
CFLAGS="$CFLAGS -I$srcdir/include" CFLAGS="$CFLAGS -I$srcdir/include"