xref: /PHP-5.4/ext/intl/config.w32 (revision 9762609c)
1// $Id$
2// vim:ft=javascript
3
4ARG_ENABLE("intl", "Enable internationalization support", "no");
5
6if (PHP_INTL != "no") {
7	if (CHECK_LIB("icuuc.lib", "intl", PHP_INTL) &&
8					CHECK_HEADER_ADD_INCLUDE("unicode/utf.h", "CFLAGS_INTL")) {
9		// always build as shared - zend_strtod.c/ICU type conflict
10		EXTENSION("intl", "php_intl.c intl_convert.c intl_error.c ", true,
11								"/I \"" + configure_module_dirname + "\"");
12		ADD_SOURCES(configure_module_dirname + "/collator", "\
13				collator.c \
14				collator_attr.c \
15				collator_class.c \
16				collator_compare.c \
17				collator_convert.c \
18				collator_create.c \
19				collator_error.c \
20				collator_is_numeric.c \
21				collator_locale.c \
22				collator_sort.c \
23				", "intl");
24		ADD_SOURCES(configure_module_dirname + "/common", "\
25				common_error.c \
26				", "intl");
27		ADD_SOURCES(configure_module_dirname + "/formatter", "\
28				formatter.c \
29				formatter_attr.c \
30				formatter_class.c \
31				formatter_data.c \
32				formatter_format.c \
33				formatter_main.c \
34				formatter_parse.c \
35				", "intl");
36		ADD_SOURCES(configure_module_dirname + "/locale", "\
37				locale.c \
38				locale_class.c \
39				locale_methods.c \
40				", "intl");
41		ADD_SOURCES(configure_module_dirname + "/msgformat", "\
42				msgformat.c \
43				msgformat_attr.c \
44				msgformat_class.c \
45				msgformat_data.c \
46				msgformat_format.c \
47				msgformat_helpers.cpp \
48				msgformat_parse.c \
49				", "intl");
50		ADD_SOURCES(configure_module_dirname + "/grapheme", "\
51                                grapheme_string.c grapheme_util.c  \
52                                ", "intl");
53		ADD_SOURCES(configure_module_dirname + "/normalizer", "\
54				normalizer.c \
55				normalizer_class.c \
56				normalizer_normalize.c \
57				", "intl");
58		ADD_SOURCES(configure_module_dirname + "/dateformat", "\
59				dateformat.c \
60				dateformat_class.c \
61				dateformat_attr.c \
62				dateformat_format.c \
63				dateformat_parse.c \
64				dateformat_data.c \
65				", "intl");
66		ADD_SOURCES(configure_module_dirname + "/idn", "\
67				idn.c",
68				"intl");
69		ADD_SOURCES(configure_module_dirname + "/resourcebundle", "\
70				resourcebundle.c \
71				resourcebundle_class.c \
72				resourcebundle_iterator.c",
73				"intl");
74
75		if (CHECK_HEADER_ADD_INCLUDE("unicode/uspoof.h", "CFLAGS_INTL")) {
76			ADD_SOURCES(configure_module_dirname + "/spoofchecker", "\
77					spoofchecker.c \
78					spoofchecker_class.c \
79					spoofchecker_create.c \
80					spoofchecker_main.c",
81					"intl");
82					AC_DEFINE("HAVE_INTL", 1, "Internationalization support enabled");
83		}
84
85		ADD_SOURCES(configure_module_dirname + "/transliterator", "\
86				transliterator.c \
87				transliterator_class.c \
88				transliterator_methods.c",
89				"intl");
90		ADD_FLAG("LIBS_INTL", "icudt.lib icuin.lib icuio.lib icule.lib iculx.lib");
91		AC_DEFINE("HAVE_INTL", 1, "Internationalization support enabled");
92	} else {
93		WARNING("intl not enabled; libraries and/or headers not found");
94	}
95}
96