Skip to content

Commit f0245ae

Browse files
committed
Fix erroneous dnl appended in configure
The `dnl` (Discard to Next Line) M4 macro in this combination of `m4_if` macros and arguments isn't properly replaced and a literal `dnl` string is appended in the configure script. The `[]dnl` works ok. This fixes the PHP_CXX_COMPILE_STDCXX check in ext/intl whether the specified C++ standard is mandatory or optional. This is a backport of commit 03f1553 to PHP-8.2 due to phpGH-14002.
1 parent b3e26c3 commit f0245ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build/php_cxx_compile_stdcxx.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ AC_DEFUN([PHP_CXX_COMPILE_STDCXX], [dnl
2727
[$1], [14], [ax_cxx_compile_alternatives="14 1y"],
2828
[$1], [17], [ax_cxx_compile_alternatives="17 1z"],
2929
[$1], [20], [ax_cxx_compile_alternatives="20"],
30-
[m4_fatal([invalid first argument `$1' to PHP_CXX_COMPILE_STDCXX])])dnl
30+
[m4_fatal([invalid first argument `$1' to PHP_CXX_COMPILE_STDCXX])])[]dnl
3131
m4_if([$2], [], [ax_cxx_compile_cxx$1_required=true],
3232
[$2], [mandatory], [ax_cxx_compile_cxx$1_required=true],
3333
[$2], [optional], [ax_cxx_compile_cxx$1_required=false],
34-
[m4_fatal([invalid third argument `$2' to PHP_CXX_COMPILE_STDCXX])])dnl
34+
[m4_fatal([invalid third argument `$2' to PHP_CXX_COMPILE_STDCXX])])[]dnl
3535
AC_LANG_PUSH([C++])dnl
3636
ac_success=no
3737

0 commit comments

Comments
 (0)