Re: cvs: php4 /ext/domxml config.m4
| From: | Jani Taskinen | Date: | Thu, 07 Dec 2000 11:24:03 +0000 |
| Subject: | Re: cvs: php4 /ext/domxml config.m4 | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-3000@lists.php.net to get a copy of this message | ||
Wouldn't this be better check of the version for doxml:
Index: config.m4
===================================================================
RCS file: /repository/php4/ext/domxml/config.m4,v
retrieving revision 1.18
diff -u -r1.18 config.m4
--- config.m4 2000/12/07 10:04:18 1.18
+++ config.m4 2000/12/07 11:20:20
@@ -1,6 +1,23 @@
dnl $Id: config.m4,v 1.18 2000/12/07 10:04:18 steinm Exp $
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 <libxml/xmlversion.h>
+ #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 @@
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 @@
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)