1// $Id$ 2// vim: ft=javascript 3 4ARG_WITH("xsl", "xsl support", "no"); 5 6if (PHP_XSL != "no") { 7 if (PHP_DOM == "yes" && PHP_LIBXML == "yes" 8 && ADD_EXTENSION_DEP('xsl', 'libxml') 9 && ADD_EXTENSION_DEP('xsl', 'dom') 10 && CHECK_HEADER_ADD_INCLUDE("libxml/tree.h", "CFLAGS_XSL", PHP_PHP_BUILD + "\\include\\libxml2") 11 ) { 12 var ext_xsl_lib_found = false; 13 var ext_exslt_lib_found = false; 14 15 if (CHECK_LIB("libxslt_a.lib", "xsl", PHP_XSL)) { 16 ext_xsl_lib_found = true; 17 ADD_FLAG("CFLAGS_XSL", "/D LIBXSLT_STATIC "); 18 if (CHECK_LIB("libexslt_a.lib", "xsl", PHP_XSL)) { 19 ADD_FLAG("CFLAGS_XSL", "/D LIBEXSLT_STATIC "); 20 ext_exslt_lib_found = true; 21 } 22 } else if (CHECK_LIB("libxslt.lib", "xsl", PHP_XSL)) { 23 ext_xsl_lib_found = true; 24 if (CHECK_LIB("libexslt.lib", "xsl", PHP_XSL)) { 25 ext_exslt_lib_found = true; 26 } 27 } 28 29 if (ext_xsl_lib_found && CHECK_HEADER_ADD_INCLUDE("libxslt\\xslt.h", "CFLAGS_XSL")) { 30 if (ext_exslt_lib_found) { 31 if (CHECK_HEADER_ADD_INCLUDE("libexslt\\exslt.h", "CFLAGS_XSL")) { 32 AC_DEFINE("HAVE_XSL_EXSLT", 1, ""); 33 } 34 } 35 EXTENSION("xsl", "php_xsl.c xsltprocessor.c", PHP_XSL_SHARED); 36 AC_DEFINE("HAVE_XSL", 1, "Define if xsl extension is enabled"); 37 if (! PHP_XSL_SHARED) { 38 ADD_FLAG("CFLAGS_XSL", "/D DOM_EXPORTS /D LIBXML_STATIC"); 39 } else { 40 if (PHP_DEBUG == "yes") { 41 ADD_FLAG("LDFLAGS_XSL", "/nodefaultlib:msvcrt"); 42 } 43 } 44 45 } else { 46 WARNING("xsl not enabled; libraries and headers not found"); 47 } 48 } else { 49 WARNING("xsl not enabled; DOM extension required"); 50 } 51} 52