xref: /PHP-5.5/ext/xsl/config.w32 (revision bfa5044b)
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		var ext_xsl_lib_found = false;
11		var ext_exslt_lib_found = false;
12
13		if (CHECK_LIB("libxslt_a.lib", "xsl", PHP_XSL)) {
14			ext_xsl_lib_found = true;
15			ADD_FLAG("CFLAGS_XSL", "/D LIBXSLT_STATIC ");
16			if (CHECK_LIB("libexslt_a.lib", "xsl", PHP_XSL)) {
17				ADD_FLAG("CFLAGS_XSL", "/D LIBEXSLT_STATIC ");
18				ext_exslt_lib_found = true;
19			}
20		} else if (CHECK_LIB("libxslt.lib", "xsl", PHP_XSL)) {
21			ext_xsl_lib_found = true;
22			if (CHECK_LIB("libexslt.lib", "xsl", PHP_XSL)) {
23				ext_exslt_lib_found = true;
24			}
25		}
26
27		if (ext_xsl_lib_found && CHECK_HEADER_ADD_INCLUDE("libxslt\\xslt.h", "CFLAGS_XSL")) {
28			if (ext_exslt_lib_found) {
29				if (CHECK_HEADER_ADD_INCLUDE("libexslt\\exslt.h", "CFLAGS_XSL")) {
30					AC_DEFINE("HAVE_XSL_EXSLT", 1, "");
31				}
32			}
33			EXTENSION("xsl", "php_xsl.c xsltprocessor.c", PHP_XSL_SHARED);
34			AC_DEFINE("HAVE_XSL", 1, "Define if xsl extension is enabled");
35			if (! PHP_XSL_SHARED) {
36				ADD_FLAG("CFLAGS_XSL", "/D DOM_EXPORTS /D LIBXML_STATIC");
37			} else {
38				if (PHP_DEBUG == "yes") {
39					ADD_FLAG("LDFLAGS_XSL", "/nodefaultlib:msvcrt");
40				}
41			}
42
43		} else {
44			WARNING("xsl not enabled; libraries and headers not found");
45		}
46	} else {
47		WARNING("xsl not enabled; DOM extension required");
48	}
49}
50