summaryrefslogtreecommitdiff
path: root/ext/xml/config.m4
diff options
context:
space:
mode:
Diffstat (limited to 'ext/xml/config.m4')
-rw-r--r--ext/xml/config.m417
1 files changed, 13 insertions, 4 deletions
diff --git a/ext/xml/config.m4 b/ext/xml/config.m4
index c4b871107d..316b23b761 100644
--- a/ext/xml/config.m4
+++ b/ext/xml/config.m4
@@ -1,15 +1,24 @@
-dnl $Id$
+# $Source$
+# $Id$
AC_MSG_CHECKING(for XML support)
AC_ARG_WITH(xml,
[ --with-xml Include XML support],[
if test "$withval" != "no"; then
if test "$withval" = "yes"; then
- XML_LIBS="-lexpat"
- XML_INCLUDE=""
+ test -d /usr/include/xmltok && XML_INCLUDE="-I/usr/include/xmltok"
+ test -d /usr/include/xml && XML_INCLUDE="-I/usr/include/xml"
+ test -d /usr/local/include/xml && XML_INCLUDE="-I/usr/local/include/xml"
+ test -d /usr/include/xml && XML_INCLUDE="-I/usr/include/xml"
+ XML_INCLUDE="-I/usr/include/xml"
+ AC_CHECK_LIB(expat, main, XML_LIBS="-lexpat", XML_LIBS="-lxmlparse -lxmltok")
else
XML_LIBS="-L$withval/lib -lexpat"
- XML_INCLUDE="-I$withval/include"
+ if test -d $withval/include/xml; then
+ XML_INCLUDE="-I$withval/include/xml"
+ else
+ XML_INCLUDE="-I$withval/include"
+ fi
fi
AC_DEFINE(HAVE_LIBEXPAT, 1)
AC_MSG_RESULT(yes)