config.m4 989 B

12345678910111213141516171819202122232425262728
  1. dnl $Id$
  2. dnl config.m4 for extension simplexml
  3. PHP_ARG_ENABLE(simplexml, whether to enable SimpleXML support,
  4. [ --disable-simplexml Disable SimpleXML support], yes)
  5. if test -z "$PHP_LIBXML_DIR"; then
  6. PHP_ARG_WITH(libxml-dir, libxml2 install dir,
  7. [ --with-libxml-dir=DIR SimpleXML: libxml2 install prefix], no, no)
  8. fi
  9. if test "$PHP_SIMPLEXML" != "no"; then
  10. if test "$PHP_LIBXML" = "no"; then
  11. AC_MSG_ERROR([SimpleXML extension requires LIBXML extension, add --enable-libxml])
  12. fi
  13. PHP_SETUP_LIBXML(SIMPLEXML_SHARED_LIBADD, [
  14. AC_DEFINE(HAVE_SIMPLEXML,1,[ ])
  15. PHP_NEW_EXTENSION(simplexml, simplexml.c sxe.c, $ext_shared)
  16. PHP_INSTALL_HEADERS([ext/simplexml/php_simplexml.h ext/simplexml/php_simplexml_exports.h])
  17. PHP_SUBST(SIMPLEXML_SHARED_LIBADD)
  18. ], [
  19. AC_MSG_ERROR([xml2-config not found. Please check your libxml2 installation.])
  20. ])
  21. PHP_ADD_EXTENSION_DEP(simplexml, libxml)
  22. PHP_ADD_EXTENSION_DEP(simplexml, spl, true)
  23. fi