summaryrefslogtreecommitdiff
path: root/ext/xsl/config.w32
blob: 2a92a7b0375d27e70b8e9c798806a1876d164259 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// $Id$
// vim: ft=javascript

ARG_WITH("xsl", "xsl support", "no");

if (PHP_XSL != "no") {
	if (PHP_DOM == "yes" && PHP_LIBXML == "yes") {
		var ext_xsl_lib_found = false;

		if (CHECK_LIB("libxslt_a.lib", "xsl", PHP_XSL)) {
			ADD_FLAG("CFLAGS_XSL", "/D LIBXSLT_STATIC ");
			ext_xsl_lib_found = true;
		} else if (CHECK_LIB("libxslt.lib", "xsl", PHP_XSL)) {
			ext_xsl_lib_found = true;
		}

		if (ext_xsl_lib_found && CHECK_HEADER_ADD_INCLUDE("libxslt\\xslt.h", "CFLAGS_XSL")) {

			EXTENSION("xsl", "php_xsl.c xsltprocessor.c", PHP_XSL_SHARED);
			AC_DEFINE("HAVE_XSL", 1, "Define if xsl extension is enabled");
			if (! PHP_XSL_SHARED) {
				ADD_FLAG("CFLAGS_XSL", "/D DOM_EXPORTS /D LIBXML_STATIC");
			} else {
				if (PHP_DEBUG == "yes") {
					ADD_FLAG("LDFLAGS_XSL", "/nodefaultlib:msvcrt");
				}
			}
			ADD_EXTENSION_DEP('xsl', 'libxml');
		} else {
			WARNING("xsl not enabled; libraries and headers not found");
		}
	} else {
		WARNING("xsl not enabled; DOM extension required");
	}
}