@@ -9,18 +9,10 @@ if test "$PHP_INTL" != "no"; then
9
9
PHP_SETUP_ICU(INTL_SHARED_LIBADD)
10
10
PHP_SUBST(INTL_SHARED_LIBADD)
11
11
PHP_REQUIRE_CXX()
12
- if test "$icu_version" -ge "4002"; then
13
- icu_spoof_src=" spoofchecker/spoofchecker_class.c \
14
- spoofchecker/spoofchecker.c\
15
- spoofchecker/spoofchecker_create.c\
16
- spoofchecker/spoofchecker_main.c"
17
- else
18
- icu_spoof_src=""
19
- fi
12
+ INTL_COMMON_FLAGS="$ICU_CFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
20
13
PHP_NEW_EXTENSION(intl, php_intl.c \
21
14
intl_error.c \
22
15
intl_convert.c \
23
- intl_convertcpp.cpp \
24
16
collator/collator.c \
25
17
collator/collator_class.c \
26
18
collator/collator_sort.c \
@@ -32,8 +24,6 @@ if test "$PHP_INTL" != "no"; then
32
24
collator/collator_is_numeric.c \
33
25
collator/collator_error.c \
34
26
common/common_error.c \
35
- common/common_enum.cpp \
36
- common/common_date.cpp \
37
27
converter/converter.c \
38
28
formatter/formatter.c \
39
29
formatter/formatter_main.c \
@@ -53,17 +43,12 @@ if test "$PHP_INTL" != "no"; then
53
43
dateformat/dateformat_attr.c \
54
44
dateformat/dateformat_data.c \
55
45
dateformat/dateformat_format.c \
56
- dateformat/dateformat_format_object.cpp \
57
46
dateformat/dateformat_parse.c \
58
- dateformat/dateformat_create.cpp \
59
- dateformat/dateformat_attrcpp.cpp \
60
- dateformat/dateformat_helpers.cpp \
61
47
msgformat/msgformat.c \
62
48
msgformat/msgformat_attr.c \
63
49
msgformat/msgformat_class.c \
64
50
msgformat/msgformat_data.c \
65
51
msgformat/msgformat_format.c \
66
- msgformat/msgformat_helpers.cpp \
67
52
msgformat/msgformat_parse.c \
68
53
grapheme/grapheme_string.c \
69
54
grapheme/grapheme_util.c \
@@ -73,6 +58,20 @@ if test "$PHP_INTL" != "no"; then
73
58
transliterator/transliterator.c \
74
59
transliterator/transliterator_class.c \
75
60
transliterator/transliterator_methods.c \
61
+ idn/idn.c \
62
+ spoofchecker/spoofchecker_class.c \
63
+ spoofchecker/spoofchecker.c\
64
+ spoofchecker/spoofchecker_create.c\
65
+ spoofchecker/spoofchecker_main.c, $ext_shared,,$INTL_COMMON_FLAGS,cxx)
66
+
67
+ PHP_INTL_CPP_SOURCES="intl_convertcpp.cpp \
68
+ common/common_enum.cpp \
69
+ common/common_date.cpp \
70
+ dateformat/dateformat_format_object.cpp \
71
+ dateformat/dateformat_create.cpp \
72
+ dateformat/dateformat_attrcpp.cpp \
73
+ dateformat/dateformat_helpers.cpp \
74
+ msgformat/msgformat_helpers.cpp \
76
75
timezone/timezone_class.cpp \
77
76
timezone/timezone_methods.cpp \
78
77
calendar/calendar_class.cpp \
@@ -83,9 +82,15 @@ if test "$PHP_INTL" != "no"; then
83
82
breakiterator/breakiterator_methods.cpp \
84
83
breakiterator/rulebasedbreakiterator_methods.cpp \
85
84
breakiterator/codepointiterator_internal.cpp \
86
- breakiterator/codepointiterator_methods.cpp \
87
- idn/idn.c \
88
- $icu_spoof_src, $ext_shared,,$ICU_INCS -Wno-write-strings)
85
+ breakiterator/codepointiterator_methods.cpp"
86
+
87
+ PHP_INTL_CPP_FLAGS="$ICU_CXXFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
88
+ if test "$ext_shared" = "no"; then
89
+ PHP_ADD_SOURCES(PHP_EXT_DIR(intl), $PHP_INTL_CPP_SOURCES, $PHP_INTL_CPP_FLAGS)
90
+ else
91
+ PHP_ADD_SOURCES_X(PHP_EXT_DIR(intl), $PHP_INTL_CPP_SOURCES, $PHP_INTL_CPP_FLAGS, shared_objects_intl, yes)
92
+ fi
93
+
89
94
PHP_ADD_BUILD_DIR($ext_builddir/collator)
90
95
PHP_ADD_BUILD_DIR($ext_builddir/converter)
91
96
PHP_ADD_BUILD_DIR($ext_builddir/common)
0 commit comments