1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
# $Source: /repository/php4/ext/xml/config.m4,v $
# $Id: config.m4,v 1.22 2000/05/01 02:42:27 sas Exp $
dnl Fallback for --with-xml[=DIR]
dnl AC_ARG_WITH(xml,[],enable_xml=$withval)
AC_C_BIGENDIAN
if test "$ac_cv_c_bigendian" = "yes"; then
order=21
else
order=12
fi
PHP_ARG_WITH(xml, for XML support,
[ --with-xml[=DIR] Include XML support. DIR is base XML directory. If unspecified, the
bundled expat libary will be used.], yes)
if test "$PHP_XML" != "no"; then
AC_DEFINE(HAVE_XML, 1, [Whether you have XML])
PHP_EXTENSION(xml,$ext_shared)
fi
if test "$PHP_XML" = "yes"; then
AC_DEFINE(HAVE_LIBEXPAT, 1, [ ])
CPPFLAGS="$CPPFLAGS -DXML_BYTE_ORDER=$order"
XML_SUBDIRS=expat
XML_LIB_DEPS=expat/libexpat.la
LIB_BUILD($ext_builddir/expat,$ext_shared,yes)
LIB_BUILD($ext_builddir/expat/xmlparse,$ext_shared,yes)
LIB_BUILD($ext_builddir/expat/xmltok,$ext_shared,yes)
AC_ADD_INCLUDE($ext_srcdir/expat/xmltok)
AC_ADD_INCLUDE($ext_srcdir/expat/xmlparse)
PHP_FAST_OUTPUT($ext_builddir/expat/Makefile $ext_builddir/expat/xmlparse/Makefile $ext_builddir/expat/xmltok/Makefile)
elif test "$PHP_XML" != "no"; then
for i in $PHP_XML; do
if test -r $i/include/xmltok/xmlparse.h && test -r $i/include/xmltok/xmltok.h; then
XML_DIR=$i
XML_INC_DIR=$i/include/xmltok
elif test -r $i/include/xmlparse.h && test -r $i/include/xmltok.h; then
XML_DIR=$i
XML_INC_DIR=$i/include
fi
done
CPPFLAGS="$CPPFLAGS -DXML_BYTE_ORDER=$order"
XML_LIB_ADD="-lxmlparse -lxmltok"
AC_ADD_INCLUDE($XML_INC_DIR)
AC_DEFINE(HAVE_LIBEXPAT, 1, [ ])
fi
PHP_SUBST(XML_LIB_DEPS)
PHP_SUBST(XML_SUBDIRS)
PHP_SUBST(XML_LIB_ADD)
|