summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'autoconf/ax_libxml2.m4')
-rw-r--r--autoconf/ax_libxml2.m428
1 files changed, 28 insertions, 0 deletions
diff --git a/autoconf/ax_libxml2.m4 b/autoconf/ax_libxml2.m4
new file mode 100644
index 0000000..f9e9d4e
--- /dev/null
+++ b/autoconf/ax_libxml2.m4
@@ -0,0 +1,28 @@
+# Author: Remko Tronçon
+
+AC_DEFUN([AX_LIBXML],
+[
+ AC_ARG_WITH(
+ [libxml],
+ AC_HELP_STRING([--with-libxml=@<:@ARG@:>@],[Path to LibXML installation]),
+ [
+ WITH_LIBXML="$withval"
+ if test "$withval" != "no" -a "$withval" != "yes"; then
+ LIBXML_CPPFLAGS="-I$withval/include/libxml2"
+ LIBXML_LDFLAGS="-L$withval/lib"
+ CPPFLAGS="$CPPFLAGS $LIBXML_CPPFLAGS"
+ LDFLAGS="$LDFLAGS $LIBXML_LDFLAGS"
+ fi
+ ],
+ [WITH_LIBXML="yes"])
+
+ if test "$WITH_LIBXML" != "no"; then
+ AC_CHECK_HEADER(libxml/parser.h,
+ [
+ HAVE_LIBXML=yes
+ # TODO: Check if this lib exists
+ LIBXML_LIBS="-lxml2"
+ ],
+ [])
+ fi
+])