Skip to content

Commit 037855f

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. Close GH-13422.
1 parent 211dc60 commit 037855f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

ext/intl/config.m4

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,16 @@ 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([if intl requires -std=gnu++17])
85+
AS_IF([test "$PKG_CONFIG icu-uc --atleast-version=74"],[
86+
AC_MSG_RESULT([yes])
87+
PHP_CXX_COMPILE_STDCXX(17, mandatory, PHP_INTL_STDCXX)
88+
],[
89+
AC_MSG_RESULT([no])
90+
PHP_CXX_COMPILE_STDCXX(11, mandatory, PHP_INTL_STDCXX)
91+
])
92+
8493
PHP_INTL_CXX_FLAGS="$INTL_COMMON_FLAGS $PHP_INTL_STDCXX $ICU_CXXFLAGS"
8594
case $host_alias in
8695
*cygwin*) PHP_INTL_CXX_FLAGS="$PHP_INTL_CXX_FLAGS -D_POSIX_C_SOURCE=200809L"

0 commit comments

Comments
 (0)