Skip to content

Commit f141194

Browse files
committed
ext/intl: level up c++ runtime std for icu 74 and onwards.
to align with what is required to build icu 74 itself.
1 parent 76b7c5c commit f141194

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

ext/intl/config.m4

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,28 @@ if test "$PHP_INTL" != "no"; then
8080
breakiterator/codepointiterator_methods.cpp"
8181

8282
PHP_REQUIRE_CXX()
83-
PHP_CXX_COMPILE_STDCXX(11, mandatory, PHP_INTL_STDCXX)
83+
84+
AC_MSG_CHECKING([c++ std support level])
85+
AC_RUN_IFELSE([AC_LANG_SOURCE([[
86+
#include <unicode/uvernum.h>
87+
88+
int main(int argc, char *argv[])
89+
{
90+
#if U_ICU_VERSION_MAJOR_NUM >= 74
91+
return 0;
92+
#else
93+
return 1;
94+
#endif
95+
}
96+
]])],[
97+
AC_MSG_RESULT([c++17])
98+
PHP_CXX_COMPILE_STDCXX(17, mandatory, PHP_INTL_STDCXX)
99+
],[
100+
AC_MSG_RESULT([c++11])
101+
PHP_CXX_COMPILE_STDCXX(11, mandatory, PHP_INTL_STDCXX)
102+
], [
103+
])
104+
84105
PHP_INTL_CXX_FLAGS="$INTL_COMMON_FLAGS $PHP_INTL_STDCXX $ICU_CXXFLAGS"
85106
case $host_alias in
86107
*cygwin*) PHP_INTL_CXX_FLAGS="$PHP_INTL_CXX_FLAGS -D_POSIX_C_SOURCE=200809L"

0 commit comments

Comments
 (0)