]> granicus.if.org Git - libexpat/commitdiff
Add build condition
authorKangLin <kl222@126.com>
Tue, 16 Oct 2018 01:53:52 +0000 (09:53 +0800)
committerSebastian Pipping <sebastian@pipping.org>
Sun, 21 Oct 2018 12:47:40 +0000 (14:47 +0200)
expat/Makefile.am
expat/configure.ac

index 5ed9ac410a428c57122effd56e4d2b7490d25944..fbfc469b505aad94fa273b53cbe2be877048805d 100644 (file)
@@ -37,7 +37,13 @@ AUTOMAKE_OPTIONS = \
 ACLOCAL_AMFLAGS = -I m4
 LIBTOOLFLAGS = --verbose
 
-SUBDIRS = lib examples tests  # lib goes first to build first
+SUBDIRS = lib # lib goes first to build first
+if WITH_EXAMPLES
+SUBDIRS += examples
+endif
+if WITH_TESTS
+SUBDIRS += tests  
+endif
 if WITH_XMLWF
 SUBDIRS += xmlwf doc
 endif
index 69e89474ea82eb5abf1ffddd356ddafefd1bd02f..acc8eb519fb6b26339edee34f454c501f3781acc 100644 (file)
@@ -122,6 +122,14 @@ AC_ARG_WITH([xmlwf],
   [with_xmlwf=yes])
 AM_CONDITIONAL([WITH_XMLWF], [test x${with_xmlwf} = xyes])
 
+AC_ARG_WITH([examples], [
+AS_HELP_STRING([--without-examples], [do not build examples, default build examples])], [], [with_examples=yes])
+AM_CONDITIONAL([WITH_EXAMPLES], [test x${with_examples} = xyes])
+
+AC_ARG_WITH([tests], [
+AS_HELP_STRING([--without-tests], [do not build tests, default build tests])], [], [with_tests=yes])
+AM_CONDITIONAL([WITH_TESTS], [test x${with_tests} = xyes])
+
 AM_CONDITIONAL([MINGW], [echo -- "${host}" | ${FGREP} mingw >/dev/null])
 AM_CONDITIONAL([UNICODE], [echo -- "${CPPFLAGS}${CFLAGS}" | ${FGREP} XML_UNICODE >/dev/null])