aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu <[email protected]>2013-06-21 10:03:23 +0900
committerYAMAMOTO Mitsuharu <[email protected]>2013-06-21 10:03:23 +0900
commit6b4914d244b2d3c3c216c368c20305c365e9ad98 (patch)
tree6609d517d94440ce84b134d9559f3b4e23f0d874
parent7a65a0b2e87e9e24f600558c67a68fc4cf6e1998 (diff)
configure.ac (HAVE_LIBXML2): Try built-in libxml2 on OS X 10.8 as a fallback.
-rw-r--r--ChangeLog5
-rw-r--r--configure.ac13
2 files changed, 18 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 91eb430f3f..15241e6eba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-06-21 YAMAMOTO Mitsuharu <[email protected]>
+
+ * configure.ac (HAVE_LIBXML2): Try built-in libxml2 on OS X 10.8
+ as a fallback.
+
2013-06-20 Stefan Monnier <[email protected]>
* .bzrignore: Don't unignore cl-loaddefs.el.
diff --git a/configure.ac b/configure.ac
index 6e5c888b43..6a360a89c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3106,6 +3106,19 @@ HAVE_LIBXML2=no
if test "${with_xml2}" != "no"; then
### I'm not sure what the version number should be, so I just guessed.
PKG_CHECK_MODULES(LIBXML2, libxml-2.0 > 2.6.17, HAVE_LIBXML2=yes, HAVE_LIBXML2=no)
+ # Built-in libxml2 on OS X 10.8 lacks libxml-2.0.pc.
+ if test "${HAVE_LIBXML2}" != "yes" -a "$opsys" = "darwin"; then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2"
+ AC_CHECK_HEADER(libxml/HTMLparser.h,
+ [AC_CHECK_DECL(HTML_PARSE_RECOVER, HAVE_LIBXML2=yes, ,
+ [#include <libxml/HTMLparser.h>])])
+ CPPFLAGS="$SAVE_CPPFLAGS"
+ if test "${HAVE_LIBXML2}" = "yes"; then
+ LIBXML2_LIBS="-lxml2"
+ LIBXML2_CFLAGS="-I/usr/include/libxml2"
+ fi
+ fi
if test "${HAVE_LIBXML2}" = "yes"; then
if test "${opsys}" != "mingw32"; then
LIBS="$LIBXML2_LIBS $LIBS"