From 1fdfd8a1b490f8ac9e7e11896298e41cc210d87d Mon Sep 17 00:00:00 2001 From: KangLin Date: Tue, 16 Oct 2018 09:53:52 +0800 Subject: [PATCH] Add build condition --- expat/Makefile.am | 8 +++++++- expat/configure.ac | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/expat/Makefile.am b/expat/Makefile.am index 5ed9ac41..fbfc469b 100644 --- a/expat/Makefile.am +++ b/expat/Makefile.am @@ -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 diff --git a/expat/configure.ac b/expat/configure.ac index 69e89474..acc8eb51 100644 --- a/expat/configure.ac +++ b/expat/configure.ac @@ -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]) -- 2.40.0