config.m4 937 B

12345678910111213141516171819202122232425262728293031323334353637
  1. PHP_ARG_ENABLE([xml],
  2. [whether to enable XML support],
  3. [AS_HELP_STRING([--disable-xml],
  4. [Disable XML support])],
  5. [yes])
  6. PHP_ARG_WITH([expat],
  7. [whether to build with expat support],
  8. [AS_HELP_STRING([--with-expat],
  9. [XML: use expat instead of libxml2])],
  10. [no],
  11. [no])
  12. if test "$PHP_XML" != "no"; then
  13. dnl
  14. dnl Default to libxml2 if --with-expat is not specified.
  15. dnl
  16. if test "$PHP_EXPAT" = "no"; then
  17. if test "$PHP_LIBXML" = "no"; then
  18. AC_MSG_ERROR([XML extension requires LIBXML extension, add --with-libxml])
  19. fi
  20. PHP_SETUP_LIBXML(XML_SHARED_LIBADD, [
  21. xml_extra_sources="compat.c"
  22. PHP_ADD_EXTENSION_DEP(xml, libxml)
  23. ])
  24. else
  25. PHP_SETUP_EXPAT([XML_SHARED_LIBADD])
  26. fi
  27. PHP_NEW_EXTENSION(xml, xml.c $xml_extra_sources, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
  28. PHP_SUBST(XML_SHARED_LIBADD)
  29. PHP_INSTALL_HEADERS([ext/xml/])
  30. AC_DEFINE(HAVE_XML, 1, [ ])
  31. fi