summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAhmad Fatoum <ahmad@a3f.at>2017-04-04 23:23:59 +0200
committerRoland Knall <rknall@gmail.com>2017-04-19 10:41:55 +0000
commitcfab5ef035db7be8502623af203ab3494a9200e3 (patch)
tree2d848bbd7bd38baa818a817b9cda5b4b107f30a6 /configure.ac
parentd13c6d9628e3964697559e3509d9c1f8ec30ed9e (diff)
downloadwireshark-cfab5ef035db7be8502623af203ab3494a9200e3.tar.gz
Add libxml2 as optional dependency
This can be used by dissectors that need to parse out-of-band configuration. Change-Id: I13c0a2f408fb5c21bad7ab3d7971e0fa8ed7d783 Reviewed-on: https://code.wireshark.org/review/20912 Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index a552b322c4..29767774c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2552,6 +2552,27 @@ else
fi
AM_CONDITIONAL(HAVE_SPANDSP, test "x$have_spandsp" = "xyes")
+#`
+# Libxml2 check
+AC_ARG_WITH(libxml2,
+ AC_HELP_STRING([--with-libxml2=@<:@yes/no@:>@],
+ [Libxml2 is a XML C parser, which can be used for handling XML configuration in dissectors @<:@default=yes, if available@:>@]),
+ with_libxml2="$withval"; want_libxml2="yes", with_libxml2="yes")
+
+PKG_CHECK_MODULES(LIBXML2, libxml-2.0, [have_libxml2=yes], [have_libxml2=no])
+if test "x$with_libxml2" != "xno"; then
+ if (test "${have_libxml2}" = "yes"); then
+ AC_DEFINE(HAVE_LIBXML2, 1, [Define if you have libxml2])
+ elif test "x$want_libxml2" = "xyes"; then
+ # Error out if the user explicitly requested libxml2
+ AC_MSG_ERROR([Libxml2 was requested, but is not available])
+ fi
+else
+ have_libxml2=no
+fi
+AM_CONDITIONAL(HAVE_LIBXML2, test "x$have_libxml2" = "xyes")
+
+
dnl
dnl check whether plugins should be enabled and, if they should be,
dnl check for plugins directory - stolen from Amanda's configure.ac
@@ -3171,6 +3192,7 @@ echo " Have ssh_userauth_agent : $ssh_userauth_agent_message"
echo " Use nl library : $libnl_message"
echo " Use SBC codec library : $have_sbc"
echo " Use SpanDSP library : $have_spandsp"
+echo " Use libxml2 library : $have_libxml2"
echo " Use nghttp2 library : $nghttp2_message"
echo " Use LZ4 library : $have_lz4"
echo " Use Snappy library : $have_snappy"