config.m4 957 B

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