summaryrefslogtreecommitdiff
path: root/ext/intl/config.w32
blob: 22cde6bd6d950bb9a44290c79f5d12d0ed1df5aa (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
// $Id$
// vim:ft=javascript

ARG_ENABLE("intl", "Enable internationalization support", "no");

if (PHP_INTL != "no") {
	if (CHECK_LIB("icuuc.lib", "intl", PHP_INTL) &&
					CHECK_HEADER_ADD_INCLUDE("unicode/utf.h", "CFLAGS_INTL")) {
		// always build as shared - zend_strtod.c/ICU type conflict
		EXTENSION("intl", "php_intl.c intl_convert.c intl_convertcpp.cpp intl_error.c ", true,
								"/I \"" + configure_module_dirname + "\"");
		ADD_SOURCES(configure_module_dirname + "/collator", "\
				collator.c \
				collator_attr.c \
				collator_class.c \
				collator_compare.c \
				collator_convert.c \
				collator_create.c \
				collator_error.c \
				collator_is_numeric.c \
				collator_locale.c \
				collator_sort.c \
				", "intl");
		ADD_SOURCES(configure_module_dirname + "/common", "\
				common_error.c \
				common_enum.cpp \
				common_date.cpp \
				", "intl");
		ADD_SOURCES(configure_module_dirname + "/converter", "\
				converter.c \
				", "intl");
		ADD_SOURCES(configure_module_dirname + "/formatter", "\
				formatter.c \
				formatter_attr.c \
				formatter_class.c \
				formatter_data.c \
				formatter_format.c \
				formatter_main.c \
				formatter_parse.c \
				", "intl");
		ADD_SOURCES(configure_module_dirname + "/locale", "\
				locale.c \
				locale_class.c \
				locale_methods.c \
				", "intl");
		ADD_SOURCES(configure_module_dirname + "/msgformat", "\
				msgformat.c \
				msgformat_attr.c \
				msgformat_class.c \
				msgformat_data.c \
				msgformat_format.c \
				msgformat_helpers.cpp \
				msgformat_parse.c \
				", "intl");
		ADD_SOURCES(configure_module_dirname + "/grapheme", "\
                                grapheme_string.c grapheme_util.c  \
                                ", "intl");
		ADD_SOURCES(configure_module_dirname + "/normalizer", "\
				normalizer.c \
				normalizer_class.c \
				normalizer_normalize.c \
				", "intl");
		ADD_SOURCES(configure_module_dirname + "/dateformat", "\
				dateformat.c \
				dateformat_class.c \
				dateformat_attr.c \
				dateformat_format.c \
				dateformat_format_object.cpp \
				dateformat_parse.c \
				dateformat_data.c \
				dateformat_attrcpp.cpp \
				dateformat_helpers.cpp \
				dateformat_create.cpp \
				", "intl");
		ADD_SOURCES(configure_module_dirname + "/idn", "\
				idn.c",
				"intl");
		ADD_SOURCES(configure_module_dirname + "/resourcebundle", "\
				resourcebundle.c \
				resourcebundle_class.c \
				resourcebundle_iterator.c",
				"intl");

		if (CHECK_HEADER_ADD_INCLUDE("unicode/uspoof.h", "CFLAGS_INTL")) {
			ADD_SOURCES(configure_module_dirname + "/spoofchecker", "\
					spoofchecker.c \
					spoofchecker_class.c \
					spoofchecker_create.c \
					spoofchecker_main.c",
					"intl");
					AC_DEFINE("HAVE_INTL", 1, "Internationalization support enabled");
		}

		ADD_SOURCES(configure_module_dirname + "/transliterator", "\
				transliterator.c \
				transliterator_class.c \
				transliterator_methods.c",
				"intl");
		
		ADD_SOURCES(configure_module_dirname + "/timezone", "\
				timezone_class.cpp \
				timezone_methods.cpp",
				"intl");
				
		ADD_SOURCES(configure_module_dirname + "/calendar", "\
				calendar_methods.cpp \
				gregoriancalendar_methods.cpp \
				calendar_class.cpp",
				"intl");
				
		ADD_SOURCES(configure_module_dirname + "/breakiterator", "\
				breakiterator_class.cpp \
				breakiterator_methods.cpp \
				breakiterator_iterators.cpp \
				rulebasedbreakiterator_methods.cpp \
				codepointiterator_internal.cpp \
				codepointiterator_methods.cpp ",
				"intl");
		
		ADD_FLAG("LIBS_INTL", "icudt.lib icuin.lib icuio.lib icule.lib iculx.lib");
		ADD_FLAG("CFLAGS_INTL", "/EHsc");
		AC_DEFINE("HAVE_INTL", 1, "Internationalization support enabled");
	} else {
		WARNING("intl not enabled; libraries and/or headers not found");
	}
}