From 46e6bcf3aca5496e51993dff0d3be2c0b45e4a8f Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Fri, 3 Aug 2012 19:47:19 +0000 Subject: 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 --- autoconf/configure.ac | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'autoconf') 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 -- cgit v1.2.3