[php-src] PHP-8.3: ext/intl: level up c++ runtime std for icu 74 and onwards.

From: Date: Fri, 19 Apr 2024 09:10:11 +0000
Subject: [php-src] PHP-8.3: ext/intl: level up c++ runtime std for icu 74 and onwards.
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-128162@lists.php.net to get a copy of this message
Author: David Carlier (devnexen) Date: 2024-04-19T10:04:25+01:00 Commit: https://github.com/php/php-src/commit/cc46a4e6b5a413bab3e264c1dcaaf7052f54fbc4 Raw diff: https://github.com/php/php-src/commit/cc46a4e6b5a413bab3e264c1dcaaf7052f54fbc4.diff 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 Changed paths: M NEWS M ext/intl/config.m4 Diff: diff --git a/NEWS b/NEWS index bcff2820ded76..e5f8e3eba5ff3 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,9 @@ PHP NEWS . Fixed bug GH-13563 (Setting bool values via env in FPM config fails). (Jakub Zelenka) +- Intl: + . Fixed build for icu 74 and onwards. (dunglas) + - MySQLnd: . Fix shift out of bounds on 32-bit non-fast-path platforms. (nielsdos) diff --git a/ext/intl/config.m4 b/ext/intl/config.m4 index dd687bcd97de3..48f5147ca7bbf 100644 --- a/ext/intl/config.m4 +++ b/ext/intl/config.m4 @@ -80,7 +80,16 @@ if test "$PHP_INTL" != "no"; then breakiterator/codepointiterator_methods.cpp" PHP_REQUIRE_CXX() - PHP_CXX_COMPILE_STDCXX(11, mandatory, PHP_INTL_STDCXX) + + AC_MSG_CHECKING([if intl requires -std=gnu++17]) + AS_IF([test "$PKG_CONFIG icu-uc --atleast-version=74"],[ + AC_MSG_RESULT([yes]) + PHP_CXX_COMPILE_STDCXX(17, mandatory, PHP_INTL_STDCXX) + ],[ + AC_MSG_RESULT([no]) + PHP_CXX_COMPILE_STDCXX(11, mandatory, PHP_INTL_STDCXX) + ]) + PHP_INTL_CXX_FLAGS="$INTL_COMMON_FLAGS $PHP_INTL_STDCXX $ICU_CXXFLAGS" case $host_alias in *cygwin*) PHP_INTL_CXX_FLAGS="$PHP_INTL_CXX_FLAGS -D_POSIX_C_SOURCE=200809L"

« previous php.cvs (#128162) next »