xref: /php-src/ext/simplexml/config.w32 (revision f66feaec)
1// vim:ft=javascript
2
3ARG_WITH("simplexml", "Simple XML support", "yes");
4
5if (PHP_SIMPLEXML == "yes") {
6	if(PHP_LIBXML == "yes" &&
7		ADD_EXTENSION_DEP('simplexml', 'libxml') &&
8		ADD_EXTENSION_DEP('simplexml', 'spl') &&
9		CHECK_HEADER_ADD_INCLUDE("libxml/tree.h", "CFLAGS_SIMPLEXML", PHP_PHP_BUILD + "\\include\\libxml2")
10	) {
11		EXTENSION("simplexml", "simplexml.c");
12		AC_DEFINE("HAVE_SIMPLEXML", 1, "Define to 1 if the PHP extension 'simplexml' is available.");
13		if (!PHP_SIMPLEXML_SHARED) {
14			ADD_FLAG("CFLAGS_SIMPLEXML", "/D LIBXML_STATIC");
15		} else {
16			if (!CHECK_LIB("libxml2.lib", "simplexml")) {
17				WARNING("simplexml support can't be enabled, libxml is not found")
18			}
19		}
20
21		ADD_FLAG("CFLAGS_SIMPLEXML", "/D PHP_SIMPLEXML_EXPORTS ");
22		PHP_INSTALL_HEADERS("ext/simplexml", "php_simplexml.h php_simplexml_exports.h");
23	} else {
24		PHP_SIMPLEXML = "no";
25		WARNING("simplexml not enabled; libraries and headers not found");
26	}
27}
28