22dnl $Id$
33dnl
44
5- AC_C_BIGENDIAN
6-
7- if test "$ac_cv_c_bigendian" = "yes"; then
8- order=4321
9- else
10- order=1234
11- fi
12-
135PHP_ARG_ENABLE(xml,whether to enable XML support,
146[ --disable-xml Disable XML support using bundled expat lib] , yes)
157
@@ -19,14 +11,11 @@ PHP_ARG_WITH(expat-dir, external libexpat install dir,
1911if test "$PHP_XML" = "yes"; then
2012 AC_DEFINE ( HAVE_LIBEXPAT , 1 , [ ] )
2113
22- if test "$PHP_EXPAT_DIR" = "no"; then
23- AC_DEFINE ( HAVE_LIBEXPAT_BUNDLED , 1 , [ ] )
24- PHP_NEW_EXTENSION(xml, xml.c expat/xmlparse.c expat/xmlrole.c expat/xmltok.c, $ext_shared,,-DBYTEORDER=$order)
25- PHP_ADD_INCLUDE($ext_srcdir/expat)
26- PHP_ADD_BUILD_DIR($ext_builddir/expat)
27- else
28- PHP_NEW_EXTENSION(xml, xml.c, $ext_shared)
14+ if test "$PHP_EXPAT_DIR" = "no" && test "$PHP_BUNDLE_EXPAT" = "no"; then
15+ AC_MSG_ERROR ( xml support is enabled , however the expat bundle is disabled and no external expat directory was specified. )
16+ fi
2917
18+ if test "$PHP_EXPAT_DIR" != "no"; then
3019 for i in $PHP_XML $PHP_EXPAT_DIR; do
3120 if test -f $i/lib/libexpat.a -o -f $i/lib/libexpat.$SHLIB_SUFFIX_NAME ; then
3221 EXPAT_DIR=$i
@@ -41,4 +30,6 @@ if test "$PHP_XML" = "yes"; then
4130 PHP_ADD_LIBRARY_WITH_PATH(expat, $EXPAT_DIR/lib, XML_SHARED_LIBADD)
4231 PHP_SUBST(XML_SHARED_LIBADD)
4332 fi
33+
34+ PHP_NEW_EXTENSION(xml, xml.c, $ext_shared)
4435fi
0 commit comments