From 5a34b269725e0719f7fc87cc9363eec868fc0b35 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Wed, 26 Sep 2001 19:02:33 +0000 Subject: [PATCH] - This patch adds proper header file detection on system which simultaneously isntallied libxml1 and libxml2 (eg. Debian) (patch by Markus Fischer ) --- ext/domxml/config.m4 | 9 +++++++-- 1 file 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 @@ -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=) -- 2.50.1