summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2024-12-03 02:28:15 +0100
committerGravatar Nikias Bassen2024-12-03 02:28:15 +0100
commite3ca6af2c580c0b748a5635c15b973094765abbf (patch)
tree345ae08b449f18f2c790d0efdf2543ff778261f9
parent8dee549fd286ab152e94428f38eae6edac1bb746 (diff)
downloadlibplist-e3ca6af2c580c0b748a5635c15b973094765abbf.tar.gz
libplist-e3ca6af2c580c0b748a5635c15b973094765abbf.tar.bz2
configure: Allow building the library without tool(s)
-rw-r--r--configure.ac16
-rw-r--r--tools/Makefile.am4
2 files changed, 19 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 65cc697..fc0d8c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -147,6 +147,14 @@ else
147fi 147fi
148AM_CONDITIONAL([HAVE_CYTHON],[test "x$cython_python_bindings" = "xyes"]) 148AM_CONDITIONAL([HAVE_CYTHON],[test "x$cython_python_bindings" = "xyes"])
149 149
150AC_ARG_WITH([tools],
151 [AS_HELP_STRING([--with-tools], [Build libplist tools. [default=yes]])],
152 [build_tools=${withval}],
153 [build_tools=yes]
154)
155AS_IF([test "x$build_tools" = "xyes"], [AC_DEFINE(BUILD_TOOLS, 1, [Define if we are building plist tools])])
156AM_CONDITIONAL(BUILD_TOOLS, test "x$build_tools" = "xyes")
157
150AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -Wno-strict-aliasing $PTHREAD_CFLAGS") 158AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -Wno-strict-aliasing $PTHREAD_CFLAGS")
151GLOBAL_LDFLAGS="$PTHREAD_LIBS" 159GLOBAL_LDFLAGS="$PTHREAD_LIBS"
152 160
@@ -199,7 +207,11 @@ AC_ARG_WITH([tests],
199 [AS_HELP_STRING([--without-tests], 207 [AS_HELP_STRING([--without-tests],
200 [Do not build libplist test suite (default is yes)])], 208 [Do not build libplist test suite (default is yes)])],
201 [build_tests=${withval}], 209 [build_tests=${withval}],
202 [build_tests=yes]) 210 [build_tests=${build_tools}])
211
212if test "x$build_tests" = "xyes" -a "x$build_tools" != "xyes"; then
213 AC_MSG_ERROR([Building the test suite requires plistutil. Reconfigure with --with-tools=yes to enable.])
214fi
203 215
204if test "x$build_fuzzers" = "xyes"; then 216if test "x$build_fuzzers" = "xyes"; then
205 if test "x$build_sanitizers" = "xno"; then 217 if test "x$build_sanitizers" = "xno"; then
@@ -318,6 +330,8 @@ Configuration for $PACKAGE $VERSION:
318 Install prefix ..........: $prefix 330 Install prefix ..........: $prefix
319 Debug code ..............: $debug 331 Debug code ..............: $debug
320 Python bindings .........: $cython_python_bindings 332 Python bindings .........: $cython_python_bindings
333 Build tools .............: $build_tools
334 Build test suite ........: $build_tests
321$EXTRA_CONF 335$EXTRA_CONF
322 Now type 'make' to build $PACKAGE $VERSION, 336 Now type 'make' to build $PACKAGE $VERSION,
323 and then 'make install' for installation. 337 and then 'make install' for installation.
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 9f3214d..5883286 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -1,3 +1,5 @@
1if BUILD_TOOLS
2
1AM_CFLAGS = \ 3AM_CFLAGS = \
2 $(GLOBAL_CFLAGS) \ 4 $(GLOBAL_CFLAGS) \
3 -I$(top_srcdir)/include 5 -I$(top_srcdir)/include
@@ -8,3 +10,5 @@ bin_PROGRAMS = plistutil
8 10
9plistutil_SOURCES = plistutil.c 11plistutil_SOURCES = plistutil.c
10plistutil_LDADD = $(top_builddir)/src/libplist-2.0.la 12plistutil_LDADD = $(top_builddir)/src/libplist-2.0.la
13
14endif