Skip to content

Commit cc46a4e

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-14002
1 parent fda91a0 commit cc46a4e

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ PHP NEWS
1818
. Fixed bug GH-13563 (Setting bool values via env in FPM config fails).
1919
(Jakub Zelenka)
2020

21+
- Intl:
22+
. Fixed build for icu 74 and onwards. (dunglas)
23+
2124
- MySQLnd:
2225
. Fix shift out of bounds on 32-bit non-fast-path platforms. (nielsdos)
2326

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)