Use ICU's CXXFLAGS when using pkg-config https://github.com/php/php-src/commit/8daf96cef35c114b9e9cbcc47fc8602be74754d3 --- a/acinclude.m4 2024-05-19 15:08:42.000000000 -0500 +++ b/acinclude.m4 2024-05-19 15:08:42.000000000 -0500 @@ -2236,7 +2236,8 @@ ICU_LIBS=`$PKG_CONFIG --libs icu-uc icu-io icu-i18n` ICU_INCS=`$PKG_CONFIG --cflags-only-I icu-uc icu-io icu-i18n` - ICU_CXXFLAGS="-DU_USING_ICU_NAMESPACE=1" + ICU_CXXFLAGS=`$PKG_CONFIG --variable=CXXFLAGS icu-uc` + ICU_CXXFLAGS="$ICU_CXXFLAGS -DU_USING_ICU_NAMESPACE=1" AC_MSG_RESULT([found $ICU_VERSION])