2019-03-03 15:44:16 +00:00
|
|
|
PHP_ARG_ENABLE([xml],
|
|
|
|
[whether to enable XML support],
|
|
|
|
[AS_HELP_STRING([--disable-xml],
|
|
|
|
[Disable XML support])],
|
|
|
|
[yes])
|
2003-05-19 15:33:19 +00:00
|
|
|
|
2019-05-26 09:30:54 +00:00
|
|
|
PHP_ARG_WITH([expat],
|
|
|
|
[whether to build with expat support],
|
|
|
|
[AS_HELP_STRING([--with-expat],
|
|
|
|
[XML: use expat instead of libxml2])],
|
2019-03-03 15:44:16 +00:00
|
|
|
[no],
|
|
|
|
[no])
|
2003-05-19 15:33:19 +00:00
|
|
|
|
2005-04-27 13:12:55 +00:00
|
|
|
if test "$PHP_XML" != "no"; then
|
|
|
|
|
2018-07-29 01:43:45 +00:00
|
|
|
dnl
|
2019-05-26 09:30:54 +00:00
|
|
|
dnl Default to libxml2 if --with-expat is not specified.
|
2003-05-20 00:20:29 +00:00
|
|
|
dnl
|
2019-05-26 09:30:54 +00:00
|
|
|
if test "$PHP_EXPAT" = "no"; then
|
2005-04-27 13:12:55 +00:00
|
|
|
|
|
|
|
if test "$PHP_LIBXML" = "no"; then
|
2019-04-18 10:09:01 +00:00
|
|
|
AC_MSG_ERROR([XML extension requires LIBXML extension, add --with-libxml])
|
2003-05-19 21:50:23 +00:00
|
|
|
fi
|
2005-04-27 13:12:55 +00:00
|
|
|
|
|
|
|
PHP_SETUP_LIBXML(XML_SHARED_LIBADD, [
|
|
|
|
xml_extra_sources="compat.c"
|
2005-05-07 02:51:53 +00:00
|
|
|
PHP_ADD_EXTENSION_DEP(xml, libxml)
|
2005-04-27 13:12:55 +00:00
|
|
|
])
|
2019-05-26 09:30:54 +00:00
|
|
|
else
|
2019-05-29 13:09:43 +00:00
|
|
|
PHP_SETUP_EXPAT([XML_SHARED_LIBADD])
|
2003-05-19 15:33:19 +00:00
|
|
|
fi
|
2003-05-02 04:02:27 +00:00
|
|
|
|
2014-10-17 14:03:40 +00:00
|
|
|
PHP_NEW_EXTENSION(xml, xml.c $xml_extra_sources, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
|
2003-05-19 15:33:19 +00:00
|
|
|
PHP_SUBST(XML_SHARED_LIBADD)
|
2005-06-20 00:52:59 +00:00
|
|
|
PHP_INSTALL_HEADERS([ext/xml/])
|
2003-05-19 15:33:19 +00:00
|
|
|
AC_DEFINE(HAVE_XML, 1, [ ])
|
2001-06-03 13:59:21 +00:00
|
|
|
fi
|