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 @@
1AUTOMAKE_OPTIONS = foreign 1AUTOMAKE_OPTIONS = foreign
2ACLOCAL_AMFLAGS = -I m4 2ACLOCAL_AMFLAGS = -I m4
3SUBDIRS = libcnary src include tools test docs 3SUBDIRS = libcnary src include tools docs
4 4
5if HAVE_CYTHON 5if HAVE_CYTHON
6SUBDIRS += cython 6SUBDIRS += cython
7endif 7endif
8 8
9if BUILD_TESTS
10SUBDIRS += test
11endif
12
9if BUILD_FUZZERS 13if BUILD_FUZZERS
10SUBDIRS += fuzz 14SUBDIRS += fuzz
11endif 15endif
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],
202 [build_fuzzers=${withval}], 202 [build_fuzzers=${withval}],
203 [build_fuzzers=no]) 203 [build_fuzzers=no])
204 204
205AC_ARG_WITH([tests],
206 [AS_HELP_STRING([--without-tests],
207 [Do not build libplist test suite (default is yes)])],
208 [build_tests=${withval}],
209 [build_tests=yes])
210
205if test "x$build_fuzzers" = "xyes"; then 211if test "x$build_fuzzers" = "xyes"; then
206 if test "x$build_sanitizers" = "xno"; then 212 if test "x$build_sanitizers" = "xno"; then
207 AC_MSG_ERROR([--with-fuzzers implies --with-sanitizers, but --without-sanitizers was given. This does not work.]) 213 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
288fi 294fi
289 295
290AM_CONDITIONAL([BUILD_FUZZERS],[test "x$build_fuzzers" = "xyes"]) 296AM_CONDITIONAL([BUILD_FUZZERS],[test "x$build_fuzzers" = "xyes"])
297AM_CONDITIONAL([BUILD_TESTS],[test "x$build_tests" != "xno"])
291 298
292if test "x$build_fuzzers" = "xyes" || test "x$build_sanitizers" = "xyes"; then 299if test "x$build_fuzzers" = "xyes" || test "x$build_sanitizers" = "xyes"; then
293 AS_COMPILER_FLAGS(TEST_CFLAGS, [$CFLAGS]) 300 AS_COMPILER_FLAGS(TEST_CFLAGS, [$CFLAGS])