xref: /PHP-8.3/ext/libxml/config.w32 (revision 68dd6cc9)
1// vim:ft=javascript
2
3ARG_WITH("libxml", "LibXML support", "yes");
4
5if (PHP_LIBXML == "yes") {
6	if (CHECK_LIB("libxml2_a_dll.lib;libxml2_a.lib", "libxml") &&
7			CHECK_LIB("libiconv_a.lib;iconv_a.lib;libiconv.lib;iconv.lib", "libxml") &&
8			CHECK_HEADER_ADD_INCLUDE("libxml/parser.h", "CFLAGS_LIBXML", PHP_PHP_BUILD + "\\include\\libxml2") &&
9			CHECK_HEADER_ADD_INCLUDE("libxml/tree.h", "CFLAGS_LIBXML", PHP_PHP_BUILD + "\\include\\libxml2") &&
10			ADD_EXTENSION_DEP('libxml', 'iconv')) {
11
12		EXTENSION("libxml", "libxml.c", false /* never shared */, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
13		AC_DEFINE("HAVE_LIBXML", 1, "LibXML support");
14		ADD_FLAG("CFLAGS_LIBXML", "/D LIBXML_STATIC /D LIBXML_STATIC_FOR_DLL /D HAVE_WIN32_THREADS ");
15		if (!PHP_LIBXML_SHARED) {
16			ADD_DEF_FILE("ext\\libxml\\php_libxml2.def");
17		}
18		PHP_INSTALL_HEADERS("ext/libxml/", "php_libxml.h");
19	} else {
20		WARNING("libxml support can't be enabled, iconv or libxml are missing")
21		PHP_LIBXML = "no"
22	}
23}
24