summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2013-01-06 15:09:53 -0500
committerPeter Hutterer <peter.hutterer@who-t.net>2013-01-07 07:51:04 +1000
commit9dd07f7e49d993c9beb768954863524fb225892b (patch)
tree2d069fe17c8732f47d7890465f0ace4a6e5461bd
parent182d6eaa279b34b564ff23f8806546963c64c6e5 (diff)
add a configure flag to control xml behavior
The default behavior (autodetection) is unchanged. This adds a knob for distros to control directly. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--configure.ac12
1 files changed, 8 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 9980c5a..e973733 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,11 +5,15 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2])
AC_CONFIG_HEADERS(config.h)
AC_PROG_CC
AC_PROG_INSTALL
+PKG_PROG_PKG_CONFIG
-PKG_CHECK_MODULES(XML, libxml-2.0, [HAVE_LIBXML=yes], [HAVE_LIBXML=no])
-if test x$HAVE_LIBXML = "xno"; then
- AC_MSG_WARN([libxml headers not available. Cannot build evtest-capture.])
-fi
+AC_ARG_ENABLE([xml], [AS_HELP_STRING([--disable-xml], [Disable support for xml (evtest-capture)])])
+AS_IF([test "x$enable_xml" != "xno"], [
+ PKG_CHECK_MODULES(XML, libxml-2.0, [HAVE_LIBXML=yes], [HAVE_LIBXML=no])
+ AS_IF([test "x$enable_xml$HAVE_LIBXML" = "xyesno"], [
+ AC_MSG_ERROR([libxml headers not available. Cannot build evtest-capture.])
+ ])
+])
AM_CONDITIONAL(HAVE_LIBXML, [test "x$HAVE_LIBXML" = "xyes"])
AC_PATH_PROG(XSLTPROC, [xsltproc])