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