xref: /PHP-7.2/ext/intl/config.m4 (revision bcf2e10a)
1dnl config.m4 for extension intl
2
3dnl ##########################################################################
4dnl Initialize the extension
5PHP_ARG_ENABLE(intl, whether to enable internationalization support,
6[  --enable-intl           Enable internationalization support])
7
8if test "$PHP_INTL" != "no"; then
9  PHP_SETUP_ICU(INTL_SHARED_LIBADD)
10  PHP_SUBST(INTL_SHARED_LIBADD)
11  PHP_REQUIRE_CXX()
12  INTL_COMMON_FLAGS="$ICU_INCS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
13  if test "$icu_version" -ge "4002"; then
14    icu_spoof_src=" spoofchecker/spoofchecker_class.c \
15    spoofchecker/spoofchecker.c\
16    spoofchecker/spoofchecker_create.c\
17    spoofchecker/spoofchecker_main.c"
18  else
19    icu_spoof_src=""
20  fi
21  PHP_NEW_EXTENSION(intl, php_intl.c \
22    intl_error.c \
23    intl_convert.c \
24    collator/collator.c \
25    collator/collator_class.c \
26    collator/collator_sort.c \
27    collator/collator_convert.c \
28    collator/collator_locale.c \
29    collator/collator_compare.c \
30    collator/collator_attr.c \
31    collator/collator_create.c \
32    collator/collator_is_numeric.c \
33    collator/collator_error.c \
34    common/common_error.c \
35    converter/converter.c \
36    formatter/formatter.c \
37    formatter/formatter_main.c \
38    formatter/formatter_class.c \
39    formatter/formatter_attr.c \
40    formatter/formatter_data.c \
41    formatter/formatter_format.c \
42    formatter/formatter_parse.c \
43    normalizer/normalizer.c \
44    normalizer/normalizer_class.c \
45    normalizer/normalizer_normalize.c \
46    locale/locale.c \
47    locale/locale_class.c \
48    locale/locale_methods.c \
49    dateformat/dateformat.c \
50    dateformat/dateformat_class.c \
51    dateformat/dateformat_attr.c \
52    dateformat/dateformat_data.c \
53    dateformat/dateformat_format.c \
54    dateformat/dateformat_parse.c \
55    msgformat/msgformat.c \
56    msgformat/msgformat_attr.c \
57    msgformat/msgformat_class.c \
58    msgformat/msgformat_data.c  \
59    msgformat/msgformat_format.c \
60    msgformat/msgformat_parse.c \
61    grapheme/grapheme_string.c \
62    grapheme/grapheme_util.c \
63    resourcebundle/resourcebundle.c \
64    resourcebundle/resourcebundle_class.c \
65    resourcebundle/resourcebundle_iterator.c \
66    transliterator/transliterator.c \
67    transliterator/transliterator_class.c \
68    transliterator/transliterator_methods.c \
69    uchar/uchar.c \
70    idn/idn.c \
71    $icu_spoof_src, $ext_shared,,$INTL_COMMON_FLAGS,cxx)
72
73  PHP_INTL_CXX_SOURCES="intl_convertcpp.cpp \
74    common/common_enum.cpp \
75    common/common_date.cpp \
76    dateformat/dateformat_format_object.cpp \
77    dateformat/dateformat_create.cpp \
78    dateformat/dateformat_attrcpp.cpp \
79    dateformat/dateformat_helpers.cpp \
80    msgformat/msgformat_helpers.cpp \
81    timezone/timezone_class.cpp \
82    timezone/timezone_methods.cpp \
83    calendar/calendar_class.cpp \
84    calendar/calendar_methods.cpp \
85    calendar/gregoriancalendar_methods.cpp \
86    breakiterator/breakiterator_class.cpp \
87    breakiterator/breakiterator_iterators.cpp \
88    breakiterator/breakiterator_methods.cpp \
89    breakiterator/rulebasedbreakiterator_methods.cpp \
90    breakiterator/codepointiterator_internal.cpp \
91    breakiterator/codepointiterator_methods.cpp"
92  PHP_INTL_CXX_FLAGS="$INTL_COMMON_FLAGS $ICU_CXXFLAGS"
93  if test "$ext_shared" = "no"; then
94    PHP_ADD_SOURCES(PHP_EXT_DIR(intl), $PHP_INTL_CXX_SOURCES, $PHP_INTL_CXX_FLAGS)
95  else
96    PHP_ADD_SOURCES_X(PHP_EXT_DIR(intl), $PHP_INTL_CXX_SOURCES, $PHP_INTL_CXX_FLAGS, shared_objects_intl, yes)
97  fi
98
99  PHP_ADD_BUILD_DIR($ext_builddir/collator)
100  PHP_ADD_BUILD_DIR($ext_builddir/converter)
101  PHP_ADD_BUILD_DIR($ext_builddir/common)
102  PHP_ADD_BUILD_DIR($ext_builddir/formatter)
103  PHP_ADD_BUILD_DIR($ext_builddir/normalizer)
104  PHP_ADD_BUILD_DIR($ext_builddir/dateformat)
105  PHP_ADD_BUILD_DIR($ext_builddir/locale)
106  PHP_ADD_BUILD_DIR($ext_builddir/msgformat)
107  PHP_ADD_BUILD_DIR($ext_builddir/grapheme)
108  PHP_ADD_BUILD_DIR($ext_builddir/resourcebundle)
109  PHP_ADD_BUILD_DIR($ext_builddir/transliterator)
110  PHP_ADD_BUILD_DIR($ext_builddir/timezone)
111  PHP_ADD_BUILD_DIR($ext_builddir/calendar)
112  PHP_ADD_BUILD_DIR($ext_builddir/idn)
113  PHP_ADD_BUILD_DIR($ext_builddir/spoofchecker)
114  PHP_ADD_BUILD_DIR($ext_builddir/breakiterator)
115  PHP_ADD_BUILD_DIR($ext_builddir/uchar)
116fi
117