From dab706ee2ae6928a1c45d497c126888cb0c26cd0 Mon Sep 17 00:00:00 2001 From: foobar Date: Tue, 20 May 2003 00:20:29 +0000 Subject: [PATCH] - Go back to using --disable-xml and --enable-xml . Require use of --with-libxml-dir and --with-libexpat-dir for ext/xml. Allows other extensions to use --with-expat-dir for now. # still defaults to libxml if --with-libxml-dir and --with-libexpat-dir # are not used. --- ext/xml/config.m4 | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/ext/xml/config.m4 b/ext/xml/config.m4 index 2e9baf24d6..cde0533de9 100644 --- a/ext/xml/config.m4 +++ b/ext/xml/config.m4 @@ -2,34 +2,32 @@ dnl dnl $Id$ dnl -PHP_ARG_WITH(xml,whether to enable XML support, -[ --without-xml Disable XML support. Requires libxml2.], yes) +PHP_ARG_ENABLE(xml,whether to enable XML support, +[ --disable-xml Disable XML support. Requires libxml2.], yes) PHP_ARG_WITH(libxml-dir, libxml install dir, -[ --with-libxml-dir=DIR XML: libxml install prefix], no, no) +[ --with-libxml-dir=DIR XML: libxml install prefix], no, no) -PHP_ARG_WITH(expat-dir, libexpat install dir, -[ --with-expat-dir=DIR XML: libexpat install prefix (deprecated)], no, no) +PHP_ARG_WITH(libexpat-dir, libexpat install dir, +[ --with-libexpat-dir=DIR XML: libexpat install prefix (deprecated)], no, no) if test "$PHP_XML" != "no"; then - - if test "$PHP_XML" != "yes" && test -n "$PHP_LIBXML_DIR"; then - PHP_LIBXML_DIR=$PHP_XML - fi - + dnl + dnl Default to libxml2. + dnl PHP_SETUP_LIBXML(XML_SHARED_LIBADD, [ - xml_sources="xml.c compat.c" + xml_extra_sources="compat.c" ], [ if test "$PHP_EXPAT_DIR" = "no"; then AC_MSG_ERROR(xml2-config not found. Use --with-libxml-dir=) fi ]) - if test "$PHP_EXPAT_DIR" != "no"; then - AC_DEFINE(HAVE_LIBEXPAT, 1, [ ]) - xml_sources="xml.c" - - for i in $PHP_XML $PHP_EXPAT_DIR; do + dnl + dnl Check for expat only if --with-libexpat-dir is used. + dnl + if test "$PHP_LIBEXPAT_DIR" != "no"; then + for i in $PHP_XML $PHP_LIBEXPAT_DIR; do if test -f "$i/lib/libexpat.a" -o -f "$i/lib/libexpat.$SHLIB_SUFFIX_NAME"; then EXPAT_DIR=$i fi @@ -41,9 +39,10 @@ if test "$PHP_XML" != "no"; then PHP_ADD_INCLUDE($EXPAT_DIR/include) PHP_ADD_LIBRARY_WITH_PATH(expat, $EXPAT_DIR/lib, XML_SHARED_LIBADD) + AC_DEFINE(HAVE_LIBEXPAT, 1, [ ]) fi - PHP_NEW_EXTENSION(xml, $xml_sources, $ext_shared) + PHP_NEW_EXTENSION(xml, xml.c $xml_extra_sources, $ext_shared) PHP_SUBST(XML_SHARED_LIBADD) AC_DEFINE(HAVE_XML, 1, [ ]) fi -- 2.40.0