summaryrefslogtreecommitdiff
path: root/ext/iconv/config.w32
blob: 3fd91038b0b7fba6ab963f16dc2437b4a9f82aa3 (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
// $Id$
// vim: ft=javascript

ARG_WITH("iconv", "iconv support", "yes");

if (PHP_ICONV != "no") {
	if ((CHECK_LIB("libiconv_a.lib", "iconv", PHP_ICONV) || CHECK_LIB("libiconv.lib", "iconv", PHP_ICONV) ||
			CHECK_LIB("iconv_a.lib", "iconv", PHP_ICONV) || CHECK_LIB("iconv.lib", "iconv", PHP_ICONV)) &&
		CHECK_HEADER_ADD_INCLUDE("iconv.h", "CFLAGS_ICONV", PHP_ICONV)) {

		EXTENSION("iconv", "iconv.c", PHP_ICONV_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");

		AC_DEFINE("HAVE_ICONV", 1, "Define if iconv extension is enabled");
		AC_DEFINE("HAVE_LIBICONV", 1, "Define if libiconv is available");
		AC_DEFINE("ICONV_ALIASED_LIBICONV", 1, "The iconv function is called iconv() in libiconv");
		AC_DEFINE("PHP_ICONV_IMPL", "\"libiconv\"", "Which iconv implementation to use");
		AC_DEFINE("ICONV_SUPPORTS_ERRNO", 1, "Whether iconv supports errno or not");
		ADD_FLAG("CFLAGS_ICONV", "/D PHP_ICONV_EXPORTS ");
		if (!PHP_ICONV_SHARED) {
			ADD_DEF_FILE("ext\\iconv\\php_iconv.def");
		}
		PHP_INSTALL_HEADERS("", "ext/iconv");
	} else {
		WARNING("iconv support can't be enabled, libraries or headers are missing")
		PHP_ICONV = "no";
	}
}