xref: /PHP-7.4/ext/iconv/config.w32 (revision 1ad08256)
1// vim: ft=javascript
2
3ARG_WITH("iconv", "iconv support", "yes");
4
5if (PHP_ICONV != "no") {
6	if ((CHECK_LIB("libiconv_a.lib", "iconv", PHP_ICONV) || CHECK_LIB("libiconv.lib", "iconv", PHP_ICONV) ||
7			CHECK_LIB("iconv_a.lib", "iconv", PHP_ICONV) || CHECK_LIB("iconv.lib", "iconv", PHP_ICONV)) &&
8		CHECK_HEADER_ADD_INCLUDE("iconv.h", "CFLAGS_ICONV", PHP_ICONV)) {
9
10		EXTENSION("iconv", "iconv.c", PHP_ICONV_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
11
12		AC_DEFINE("HAVE_ICONV", 1, "Define if iconv extension is enabled");
13		AC_DEFINE("HAVE_LIBICONV", 1, "Define if libiconv is available");
14		AC_DEFINE("ICONV_ALIASED_LIBICONV", 1, "The iconv function is called iconv() in libiconv");
15		AC_DEFINE("PHP_ICONV_IMPL", "\"libiconv\"", "Which iconv implementation to use");
16		AC_DEFINE("ICONV_SUPPORTS_ERRNO", 1, "Whether iconv supports errno or not");
17		ADD_FLAG("CFLAGS_ICONV", "/D PHP_ICONV_EXPORTS ");
18		if (!PHP_ICONV_SHARED) {
19			ADD_DEF_FILE("ext\\iconv\\php_iconv.def");
20		}
21		PHP_INSTALL_HEADERS("", "ext/iconv");
22	} else {
23		WARNING("iconv support can't be enabled, libraries or headers are missing")
24		PHP_ICONV = "no";
25	}
26}
27