summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitc807c53ef65739bb43bbb048e6f1261faa1d9615 (patch)
tree18b83f56ea6a53b84f6bb220b7e0bcc1910c43aa /llvm/autoconf
parent04e35970f5ed4bd8fdbc9f063ada90f6c2acd867 (diff)
downloadbcm5719-llvm-c807c53ef65739bb43bbb048e6f1261faa1d9615.tar.gz
bcm5719-llvm-c807c53ef65739bb43bbb048e6f1261faa1d9615.zip
Add support for detecting libxml for Dmitri's work. He'll
commit code in clang that uses this shortly. llvm-svn: 161252
Diffstat (limited to 'llvm/autoconf')
-rw-r--r--llvm/autoconf/configure.ac17
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/autoconf/configure.ac b/llvm/autoconf/configure.ac
index 48ebc62255c..413a1eefe64 100644
--- a/llvm/autoconf/configure.ac
+++ b/llvm/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
OpenPOWER on IntegriCloud