diff options
author | foobar <sniper@php.net> | 2005-04-27 13:12:55 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2005-04-27 13:12:55 +0000 |
commit | 39bcbfc3064f8a393d5ff7d951d303dedfe6a00d (patch) | |
tree | 26e554d302221d1f85232daa14cfcb715af2f2c8 /ext/xml | |
parent | aba79c268c2cd2b5fd5df3277c463121913433fb (diff) | |
download | php-git-39bcbfc3064f8a393d5ff7d951d303dedfe6a00d.tar.gz |
- Made the libxml related stuff to error out if someone does --disable-all
or --disable-libxml. Better than silently just leave the ext out..
Diffstat (limited to 'ext/xml')
-rw-r--r-- | ext/xml/config.m4 | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/ext/xml/config.m4 b/ext/xml/config.m4 index 71afc5a5f6..e77cc4035f 100644 --- a/ext/xml/config.m4 +++ b/ext/xml/config.m4 @@ -13,31 +13,37 @@ fi PHP_ARG_WITH(libexpat-dir, libexpat install dir, [ --with-libexpat-dir=DIR XML: libexpat install prefix (deprecated)], no, no) -if test "$PHP_XML" != "no" && test "$PHP_LIBXML" != "no" -o "$PHP_LIBEXPAT_DIR" != "no"; then +if test "$PHP_XML" != "no"; then + dnl - dnl Default to libxml2. + dnl Default to libxml2 if --with-libexpat-dir is not used. dnl - PHP_SETUP_LIBXML(XML_SHARED_LIBADD, [ - xml_extra_sources="compat.c" - ], [ - if test "$PHP_LIBEXPAT_DIR" = "no"; then - AC_MSG_ERROR([xml2-config not found. Use --with-libxml-dir=<DIR>]) + if test "$PHP_LIBEXPAT_DIR" = "no"; then + + if test "$PHP_LIBXML" = "no"; then + AC_MSG_ERROR([XML extension requires LIBXML extension, add --enable-libxml]) fi - ]) + + PHP_SETUP_LIBXML(XML_SHARED_LIBADD, [ + xml_extra_sources="compat.c" + ], [ + AC_MSG_ERROR([xml2-config not found. Use --with-libxml-dir=<DIR>]) + ]) + fi 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/$PHP_LIBDIR/libexpat.a" -o -f "$i/$PHP_LIBDIR/libexpat.$SHLIB_SUFFIX_NAME"; then + if test -f "$i/$PHP_LIBDIR/libexpat.a" || test -f "$i/$PHP_LIBDIR/libexpat.$SHLIB_SUFFIX_NAME"; then EXPAT_DIR=$i break fi done if test -z "$EXPAT_DIR"; then - AC_MSG_ERROR(not found. Please reinstall the expat distribution.) + AC_MSG_ERROR([not found. Please reinstall the expat distribution.]) fi PHP_ADD_INCLUDE($EXPAT_DIR/include) |