summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2001-09-26 19:02:33 +0000
committerDerick Rethans <derick@php.net>2001-09-26 19:02:33 +0000
commit5a34b269725e0719f7fc87cc9363eec868fc0b35 (patch)
tree37e1a3ed9a5b89905dbd5551897cfeac362df57f
parentbfef93878c42498cd30d2dc2626a2452b6148a9a (diff)
downloadphp-git-5a34b269725e0719f7fc87cc9363eec868fc0b35.tar.gz
- This patch adds proper header file detection on system which
simultaneously isntallied libxml1 and libxml2 (eg. Debian) (patch by Markus Fischer <mfischer@php.net>)
-rw-r--r--ext/domxml/config.m49
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/domxml/config.m4 b/ext/domxml/config.m4
index 09320cf4e9..1c0a8791c3 100644
--- a/ext/domxml/config.m4
+++ b/ext/domxml/config.m4
@@ -3,7 +3,7 @@ dnl config.m4 for extension domxml
AC_DEFUN(PHP_DOM_CHECK_VERSION,[
old_CPPFLAGS=$CPPFLAGS
- CPPFLAGS=-I$DOMXML_DIR/include
+ CPPFLAGS=-I$DOMXML_DIR/include$DOMXML_DIR_ADD
AC_MSG_CHECKING(for libxml version)
AC_EGREP_CPP(yes,[
#include <libxml/xmlversion.h>
@@ -25,11 +25,16 @@ PHP_ARG_WITH(dom, for DOM support,
if test "$PHP_DOM" != "no"; then
+ DOMXML_DIR_ADD=""
if test -r $PHP_DOM/include/libxml/tree.h; then
DOMXML_DIR=$PHP_DOM
+ elif test -r $PHP_DOM/include/libxml2/libxml/tree.h; then
+ DOMXML_DIR=$PHP_DOM
+ DOMXML_DIR_ADD="/libxml2"
else
for i in /usr/local /usr; do
test -r $i/include/libxml/tree.h && DOMXML_DIR=$i
+ test -r $i/include/libxml2/libxml/tree.h && DOMXML_DIR=$i && DOMXML_DIR_ADD="/libxml2"
done
fi
@@ -47,7 +52,7 @@ if test "$PHP_DOM" != "no"; then
fi
PHP_ADD_LIBRARY_WITH_PATH($DOM_LIBNAME, $DOMXML_DIR/lib, DOMXML_SHARED_LIBADD)
- PHP_ADD_INCLUDE($DOMXML_DIR/include)
+ PHP_ADD_INCLUDE($DOMXML_DIR/include$DOMXML_DIR_ADD)
if test "$PHP_ZLIB_DIR" = "no"; then
AC_MSG_ERROR(DOMXML requires ZLIB. Use --with-zlib-dir=<DIR>)