config.m4 4.2 KB

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