xref: /PHP-5.6/ext/intl/config.w32 (revision 7f0aff52)
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_convertcpp.cpp 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				common_enum.cpp \
27				common_date.cpp \
28				", "intl");
29		ADD_SOURCES(configure_module_dirname + "/converter", "\
30				converter.c \
31				", "intl");
32		ADD_SOURCES(configure_module_dirname + "/formatter", "\
33				formatter.c \
34				formatter_attr.c \
35				formatter_class.c \
36				formatter_data.c \
37				formatter_format.c \
38				formatter_main.c \
39				formatter_parse.c \
40				", "intl");
41		ADD_SOURCES(configure_module_dirname + "/locale", "\
42				locale.c \
43				locale_class.c \
44				locale_methods.c \
45				", "intl");
46		ADD_SOURCES(configure_module_dirname + "/msgformat", "\
47				msgformat.c \
48				msgformat_attr.c \
49				msgformat_class.c \
50				msgformat_data.c \
51				msgformat_format.c \
52				msgformat_helpers.cpp \
53				msgformat_parse.c \
54				", "intl");
55		ADD_SOURCES(configure_module_dirname + "/grapheme", "\
56                                grapheme_string.c grapheme_util.c  \
57                                ", "intl");
58		ADD_SOURCES(configure_module_dirname + "/normalizer", "\
59				normalizer.c \
60				normalizer_class.c \
61				normalizer_normalize.c \
62				", "intl");
63		ADD_SOURCES(configure_module_dirname + "/dateformat", "\
64				dateformat.c \
65				dateformat_class.c \
66				dateformat_attr.c \
67				dateformat_format.c \
68				dateformat_format_object.cpp \
69				dateformat_parse.c \
70				dateformat_data.c \
71				dateformat_attrcpp.cpp \
72				dateformat_helpers.cpp \
73				dateformat_create.cpp \
74				", "intl");
75		ADD_SOURCES(configure_module_dirname + "/idn", "\
76				idn.c",
77				"intl");
78		ADD_SOURCES(configure_module_dirname + "/resourcebundle", "\
79				resourcebundle.c \
80				resourcebundle_class.c \
81				resourcebundle_iterator.c",
82				"intl");
83
84		if (CHECK_HEADER_ADD_INCLUDE("unicode/uspoof.h", "CFLAGS_INTL")) {
85			ADD_SOURCES(configure_module_dirname + "/spoofchecker", "\
86					spoofchecker.c \
87					spoofchecker_class.c \
88					spoofchecker_create.c \
89					spoofchecker_main.c",
90					"intl");
91					AC_DEFINE("HAVE_INTL", 1, "Internationalization support enabled");
92		}
93
94		ADD_SOURCES(configure_module_dirname + "/transliterator", "\
95				transliterator.c \
96				transliterator_class.c \
97				transliterator_methods.c",
98				"intl");
99
100		ADD_SOURCES(configure_module_dirname + "/timezone", "\
101				timezone_class.cpp \
102				timezone_methods.cpp",
103				"intl");
104
105		ADD_SOURCES(configure_module_dirname + "/calendar", "\
106				calendar_methods.cpp \
107				gregoriancalendar_methods.cpp \
108				calendar_class.cpp",
109				"intl");
110
111		ADD_SOURCES(configure_module_dirname + "/breakiterator", "\
112				breakiterator_class.cpp \
113				breakiterator_methods.cpp \
114				breakiterator_iterators.cpp \
115				rulebasedbreakiterator_methods.cpp \
116				codepointiterator_internal.cpp \
117				codepointiterator_methods.cpp ",
118				"intl");
119
120		ADD_FLAG("LIBS_INTL", "icudt.lib icuin.lib icuio.lib icule.lib iculx.lib");
121		ADD_FLAG("CFLAGS_INTL", "/EHsc");
122		AC_DEFINE("HAVE_INTL", 1, "Internationalization support enabled");
123	} else {
124		WARNING("intl not enabled; libraries and/or headers not found");
125	}
126}
127