@@ -16,7 +16,7 @@ m4_include([Zend/Zend.m4])
1616dnl Basic autoconf initialization, generation of config.nice.
1717dnl ----------------------------------------------------------------------------
1818
19- AC_PREREQ ( [ 2.68 ] )
19+ AC_PREREQ ( [ 2.70 ] )
2020AC_INIT ( [ PHP] ,[ 8.6.0-dev] ,[ https://github.com/php/php-src/issues] ,[ php] ,[ https://www.php.net] )
2121AC_CONFIG_SRCDIR ( [ main/php_version.h] )
2222AC_CONFIG_AUX_DIR ( [ build] )
@@ -113,11 +113,14 @@ dnl ----------------------------------------------------------------------------
113113
114114PKG_PROG_PKG_CONFIG
115115AC_PROG_CC ( [ cc gcc] )
116+
117+ dnl Check if C compiler accepts C11.
118+ AS_CASE ( [ $ac_prog_cc_stdc] , [ c99|c89|no] ,
119+ [ AC_MSG_ERROR ( [ C compiler would not accept C11 code.] ) ] )
120+
116121PHP_DETECT_ICC
117122PHP_DETECT_SUNCC
118123
119- dnl AC_PROG_CC_C99 is obsolete with autoconf >= 2.70 yet necessary for <= 2.69.
120- m4_version_prereq ( [ 2.70] ,,[ AC_PROG_CC_C99 ] )
121124AC_PROG_CPP
122125AC_USE_SYSTEM_EXTENSIONS
123126AC_PROG_LN_S
@@ -128,17 +131,6 @@ AS_VAR_IF([cross_compiling], [yes],
128131 AC_MSG_RESULT ( [ $BUILD_CC] ) ] ,
129132 [ BUILD_CC=$CC] )
130133
131- dnl The macro AC_PROG_CC_C99 sets the shell variable ac_cv_prog_cc_c99 to 'no'
132- dnl if the compiler does not support C99.i.e. does not support any of _Bool,
133- dnl flexible arrays, inline, long long int, mixed code and declarations,
134- dnl named initialization of structs, restrict, varargs macros, variable
135- dnl declarations in for loops and variable length arrays.
136- dnl
137- dnl https://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node/C-Compiler.html
138- if test "$ac_cv_prog_cc_c99" = no; then
139- AC_MSG_ERROR ( [ C compiler would not accept C99 code] )
140- fi
141-
142134dnl Support systems with system libraries in e.g. /usr/lib64.
143135PHP_ARG_WITH([ libdir] ,
144136 [ for system library directory] ,
@@ -370,7 +362,7 @@ dnl Then headers.
370362dnl ----------------------------------------------------------------------------
371363
372364dnl QNX requires unix.h to allow functions in libunix to work properly.
373- AC_CHECK_HEADERS ( m4_normalize ( [
365+ AC_CHECK_HEADERS ( [
374366 dirent.h
375367 sys/param.h
376368 sys/types.h
@@ -418,7 +410,7 @@ AC_CHECK_HEADERS(m4_normalize([
418410 nmmintrin.h
419411 wmmintrin.h
420412 immintrin.h
421- ] ) ,,, [ dnl
413+ ] ,,, [ dnl
422414#ifdef HAVE_SYS_PARAM_H
423415#include <sys/param.h>
424416#endif
@@ -441,8 +433,6 @@ PHP_BROKEN_GETCWD
441433AS_VAR_IF ( [ GCC] , [ yes] , [ PHP_BROKEN_GCC_STRLEN_OPT] )
442434
443435dnl Detect the headers required to use makedev, major, and minor.
444- dnl Autoconf <= 2.69 didn't check glibc 2.25 deprecated macros in sys/types.h.
445- m4_version_prereq ( [ 2.70] ,,[ ac_cv_header_sys_types_h_makedev=no] )
446436AC_HEADER_MAJOR
447437
448438dnl Checks for typedefs, structures, and compiler characteristics.
@@ -535,7 +525,7 @@ PHP_CHECK_VARIABLE_ATTRIBUTE([aligned])
535525dnl Checks for library functions.
536526dnl ----------------------------------------------------------------------------
537527
538- AC_CHECK_FUNCS ( m4_normalize ( [
528+ AC_CHECK_FUNCS ( [
539529 alphasort
540530 asctime_r
541531 asprintf
@@ -596,7 +586,7 @@ AC_CHECK_FUNCS(m4_normalize([
596586 usleep
597587 utime
598588 vasprintf
599- ] ) )
589+ ] )
600590
601591PHP_ARG_ENABLE([ system-glob] ,
602592 [ whether to use the system glob function] ,
0 commit comments