summaryrefslogtreecommitdiff
path: root/autoconf
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-08-03 19:47:19 +0000
committerEric Christopher <echristo@apple.com>2012-08-03 19:47:19 +0000
commit46e6bcf3aca5496e51993dff0d3be2c0b45e4a8f (patch)
tree2ef5599c78b90f942b81412d8542865f12537f9c /autoconf
parent82120023861a85427f436dcb6f21a741e32a7896 (diff)
downloadllvm-46e6bcf3aca5496e51993dff0d3be2c0b45e4a8f.tar.gz
llvm-46e6bcf3aca5496e51993dff0d3be2c0b45e4a8f.tar.bz2
llvm-46e6bcf3aca5496e51993dff0d3be2c0b45e4a8f.tar.xz
Add support for detecting libxml for Dmitri's work. He'll
commit code in clang that uses this shortly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161252 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf')
-rw-r--r--autoconf/configure.ac17
1 files changed, 17 insertions, 0 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 48ebc62255..413a1eefe6 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -1292,6 +1292,23 @@ AC_ARG_WITH(intel-jitevents,
AC_DEFINE_UNQUOTED([LLVM_USE_INTEL_JITEVENTS],$USE_INTEL_JITEVENTS,
[Define if we have the Intel JIT API runtime support library])
+dnl Check for libxml2
+dnl Right now we're just checking for the existence, we could also check for a
+dnl particular version via --version on xml2-config
+AC_CHECK_PROGS(XML2CONFIG, xml2-config)
+
+AC_MSG_CHECKING(for libxml2 includes)
+if test "x$XML2CONFIG" = "x"; then
+ AC_MSG_RESULT(xml2-config not found)
+else
+ LIBXML2_INC=`$XML2CONFIG --cflags`
+ AC_MSG_RESULT($LIBXML2_INC)
+ AC_CHECK_LIB(xml2, xmlReadFile,[AC_DEFINE([CLANG_HAVE_LIBXML],1,[Define if we have libxml2])
+ LIBXML2_LIBS="-lxml2"])
+fi
+AC_SUBST(LIBXML2_LIBS)
+AC_SUBST(LIBXML2_INC)
+
dnl===-----------------------------------------------------------------------===
dnl===
dnl=== SECTION 6: Check for header files