2001-12-01 03:00:13 +08:00
|
|
|
dnl
|
|
|
|
dnl $Id$
|
|
|
|
dnl
|
1999-04-22 10:48:28 +08:00
|
|
|
|
2000-02-12 22:28:49 +08:00
|
|
|
AC_C_BIGENDIAN
|
2000-02-12 23:08:32 +08:00
|
|
|
|
|
|
|
if test "$ac_cv_c_bigendian" = "yes"; then
|
2002-11-18 02:37:48 +08:00
|
|
|
order=4321
|
2000-02-12 23:08:32 +08:00
|
|
|
else
|
2002-11-18 02:37:48 +08:00
|
|
|
order=1234
|
2000-02-12 23:08:32 +08:00
|
|
|
fi
|
|
|
|
|
2002-05-05 00:48:01 +08:00
|
|
|
PHP_ARG_ENABLE(xml,whether to enable XML support,
|
|
|
|
[ --disable-xml Disable XML support using bundled expat lib], yes)
|
|
|
|
|
2002-09-05 02:47:28 +08:00
|
|
|
PHP_ARG_WITH(expat-dir, external libexpat install dir,
|
|
|
|
[ --with-expat-dir=DIR XML: external libexpat install dir], no, no)
|
|
|
|
|
2001-06-03 21:59:21 +08:00
|
|
|
if test "$PHP_XML" = "yes"; then
|
2002-03-07 22:20:02 +08:00
|
|
|
AC_DEFINE(HAVE_LIBEXPAT, 1, [ ])
|
2001-06-01 14:32:02 +08:00
|
|
|
|
2002-09-05 02:47:28 +08:00
|
|
|
if test "$PHP_EXPAT_DIR" = "no"; then
|
2001-05-12 01:57:37 +08:00
|
|
|
AC_DEFINE(HAVE_LIBEXPAT_BUNDLED, 1, [ ])
|
2002-11-18 02:37:48 +08:00
|
|
|
PHP_NEW_EXTENSION(xml, xml.c expat/xmlparse.c expat/xmlrole.c expat/xmltok.c, $ext_shared,,-DBYTEORDER=$order)
|
2002-03-11 21:32:44 +08:00
|
|
|
PHP_ADD_INCLUDE($ext_srcdir/expat)
|
2002-03-07 22:20:02 +08:00
|
|
|
PHP_ADD_BUILD_DIR($ext_builddir/expat)
|
2002-09-05 02:47:28 +08:00
|
|
|
else
|
|
|
|
PHP_NEW_EXTENSION(xml, xml.c, $ext_shared)
|
|
|
|
|
|
|
|
for i in $PHP_XML $PHP_EXPAT_DIR; do
|
|
|
|
if test -f $i/lib/libexpat.a -o -f $i/lib/libexpat.$SHLIB_SUFFIX_NAME ; then
|
|
|
|
EXPAT_DIR=$i
|
|
|
|
fi
|
|
|
|
done
|
2001-06-01 14:32:02 +08:00
|
|
|
|
2002-09-05 02:47:28 +08:00
|
|
|
if test -z "$EXPAT_DIR"; then
|
|
|
|
AC_MSG_ERROR(not found. Please reinstall the expat distribution.)
|
2001-01-05 14:36:51 +08:00
|
|
|
fi
|
|
|
|
|
2002-09-05 02:47:28 +08:00
|
|
|
PHP_ADD_INCLUDE($EXPAT_DIR/include)
|
2002-11-08 03:31:08 +08:00
|
|
|
PHP_ADD_LIBRARY_WITH_PATH(expat, $EXPAT_DIR/lib, XML_SHARED_LIBADD)
|
|
|
|
PHP_SUBST(XML_SHARED_LIBADD)
|
2001-01-05 14:36:51 +08:00
|
|
|
fi
|
2001-06-03 21:59:21 +08:00
|
|
|
fi
|