1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Check if the macro AC_PROG_CC_C99 actually made the compiler accept C99 code. (#6317)

This commit is contained in:
Danack
2025-08-31 07:42:55 +01:00
committed by GitHub
parent 2a086e4e73
commit 17d4002977

View File

@@ -128,6 +128,17 @@ AS_VAR_IF([cross_compiling], [yes],
AC_MSG_RESULT([$BUILD_CC])],
[BUILD_CC=$CC])
dnl The macro AC_PROG_CC_C99 sets the shell variable ac_cv_prog_cc_c99 to 'no'
dnl if the compiler does not support C99.i.e. does not support any of _Bool,
dnl flexible arrays, inline, long long int, mixed code and declarations,
dnl named initialization of structs, restrict, varargs macros, variable
dnl declarations in for loops and variable length arrays.
dnl
dnl https://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node/C-Compiler.html
if test "$ac_cv_prog_cc_c99" = no; then
AC_MSG_ERROR([C compiler would not accept C99 code])
fi
dnl Support systems with system libraries in e.g. /usr/lib64.
PHP_ARG_WITH([libdir],
[for system library directory],