]> granicus.if.org Git - php/commitdiff
- This patch adds proper header file detection on system which
authorDerick Rethans <derick@php.net>
Wed, 26 Sep 2001 19:02:33 +0000 (19:02 +0000)
committerDerick Rethans <derick@php.net>
Wed, 26 Sep 2001 19:02:33 +0000 (19:02 +0000)
  simultaneously isntallied libxml1 and libxml2 (eg. Debian) (patch by
  Markus Fischer <mfischer@php.net>)

ext/domxml/config.m4

index 09320cf4e97850f3ab2e145df78e3d8f6186e0b8..1c0a8791c36d670e72d92966f33fe8c7b58bdaaa 100644 (file)
@@ -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>)