summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2023-04-24 14:16:31 +0200
committerGravatar Nikias Bassen2023-04-24 14:16:31 +0200
commit5d65599261515b6af769b580d83c3d39d85ea2ac (patch)
tree8101f9114af877506dfba2637af2a9bb4c34876b
parent61f01b1b06ff906cce4c4c3b2aa031f2efaf1201 (diff)
downloadlibplist-5d65599261515b6af769b580d83c3d39d85ea2ac.tar.gz
libplist-5d65599261515b6af769b580d83c3d39d85ea2ac.tar.bz2
autoconf: Allow disabling build of test suite
-rw-r--r--Makefile.am6
-rw-r--r--configure.ac7
2 files changed, 12 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 84b196d..7da967d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,11 +1,15 @@
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = libcnary src include tools test docs
+SUBDIRS = libcnary src include tools docs
if HAVE_CYTHON
SUBDIRS += cython
endif
+if BUILD_TESTS
+SUBDIRS += test
+endif
+
if BUILD_FUZZERS
SUBDIRS += fuzz
endif
diff --git a/configure.ac b/configure.ac
index a9de503..cb230fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -202,6 +202,12 @@ AC_ARG_WITH([fuzzers],
[build_fuzzers=${withval}],
[build_fuzzers=no])
+AC_ARG_WITH([tests],
+ [AS_HELP_STRING([--without-tests],
+ [Do not build libplist test suite (default is yes)])],
+ [build_tests=${withval}],
+ [build_tests=yes])
+
if test "x$build_fuzzers" = "xyes"; then
if test "x$build_sanitizers" = "xno"; then
AC_MSG_ERROR([--with-fuzzers implies --with-sanitizers, but --without-sanitizers was given. This does not work.])
@@ -288,6 +294,7 @@ if test "x$build_fuzzers" = "xyes"; then
fi
AM_CONDITIONAL([BUILD_FUZZERS],[test "x$build_fuzzers" = "xyes"])
+AM_CONDITIONAL([BUILD_TESTS],[test "x$build_tests" != "xno"])
if test "x$build_fuzzers" = "xyes" || test "x$build_sanitizers" = "xyes"; then
AS_COMPILER_FLAGS(TEST_CFLAGS, [$CFLAGS])