From: foobar Date: Fri, 8 Dec 2000 13:09:32 +0000 (+0000) Subject: Version checking for domxml. Requires >= 2.2.7 at the moment. X-Git-Tag: php-4.0.5RC1~959 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=41f3d66705de5d0e524986685b209904e6d16a48;p=php Version checking for domxml. Requires >= 2.2.7 at the moment. --- diff --git a/ext/domxml/config.m4 b/ext/domxml/config.m4 index e8125d2018..f7fd9aed09 100644 --- a/ext/domxml/config.m4 +++ b/ext/domxml/config.m4 @@ -1,6 +1,23 @@ dnl $Id$ dnl config.m4 for extension domxml +AC_DEFUN(PHP_DOM_CHECK_VERSION,[ + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS="-I$DOMXML_DIR/include" + AC_MSG_CHECKING(for libxml version) + AC_EGREP_CPP(yes,[ + #include + #if LIBXML_VERSION >= 20207 + yes + #endif + ],[ + AC_MSG_RESULT(>= 2.2.7) + ],[ + AC_MSG_ERROR(libxml version 2.2.7 or greater required.) + ]) + CPPFLAGS=$old_CPPFLAGS +]) + PHP_ARG_WITH(dom, for DOM support, [ --with-dom[=DIR] Include DOM support (requires libxml >= 2.2.7). DIR is the libxml install directory, @@ -25,6 +42,8 @@ if test "$PHP_DOM" != "no"; then AC_MSG_ERROR(Please reinstall the libxml >= 2.2.7 distribution) fi + PHP_DOM_CHECK_VERSION + AC_ADD_INCLUDE($DOMXML_DIR/include) PHP_SUBST(DOMXML_SHARED_LIBADD) @@ -52,8 +71,7 @@ if test "$PHP_DOM" != "no"; then LIBS="$LIBS -L$withval/lib -lz" fi - AC_CHECK_LIB(xml, xmlFreeURI, [AC_DEFINE(HAVE_DOMXML,1,[ ])], - [AC_MSG_ERROR(DOM module requires libxml >= 2.2.7)]) + AC_DEFINE(HAVE_DOMXML,1,[ ]) AC_ADD_LIBRARY(z) PHP_EXTENSION(domxml, $ext_shared)