@@ -182,16 +182,33 @@ AS_VAR_IF([ZEND_DEBUG], [yes], [
182
182
fi
183
183
] , [ AC_DEFINE ( [ ZEND_DEBUG] , [ 0] ) ] )
184
184
185
- test -n "$GCC" && CFLAGS="-Wall -Wextra -Wno-unused-parameter -Wno-sign-compare $CFLAGS"
186
- dnl Check if compiler supports -Wno-clobbered (only GCC)
187
- AX_CHECK_COMPILE_FLAG ( [ -Wno-clobbered] , CFLAGS="-Wno-clobbered $CFLAGS" , , [ -Werror] )
188
- dnl Check for support for implicit fallthrough level 1, also add after previous CFLAGS as level 3 is enabled in -Wextra
189
- AX_CHECK_COMPILE_FLAG ( [ -Wimplicit-fallthrough=1] , CFLAGS="$CFLAGS - Wimplicit-fallthrough=1" , , [ -Werror] )
190
- AX_CHECK_COMPILE_FLAG ( [ -Wduplicated-cond] , CFLAGS="-Wduplicated-cond $CFLAGS" , , [ -Werror] )
191
- AX_CHECK_COMPILE_FLAG ( [ -Wlogical-op] , CFLAGS="-Wlogical-op $CFLAGS" , , [ -Werror] )
192
- AX_CHECK_COMPILE_FLAG ( [ -Wformat-truncation] , CFLAGS="-Wformat-truncation $CFLAGS" , , [ -Werror] )
193
- AX_CHECK_COMPILE_FLAG ( [ -Wstrict-prototypes] , CFLAGS="-Wstrict-prototypes $CFLAGS" , , [ -Werror] )
194
- AX_CHECK_COMPILE_FLAG ( [ -fno-common] , CFLAGS="-fno-common $CFLAGS" , , [ -Werror] )
185
+ AS_VAR_IF ( [ GCC] , [ yes] ,
186
+ [ CFLAGS="-Wall -Wextra -Wno-unused-parameter -Wno-sign-compare $CFLAGS"] )
187
+
188
+ dnl Check if compiler supports -Wno-clobbered (only GCC).
189
+ AX_CHECK_COMPILE_FLAG ( [ -Wno-clobbered] ,
190
+ [ CFLAGS="-Wno-clobbered $CFLAGS"] ,,
191
+ [ -Werror] )
192
+ dnl Check for support for implicit fallthrough level 1, also add after previous
193
+ dnl CFLAGS as level 3 is enabled in -Wextra.
194
+ AX_CHECK_COMPILE_FLAG ( [ -Wimplicit-fallthrough=1] ,
195
+ [ CFLAGS="$CFLAGS -Wimplicit-fallthrough=1"] ,,
196
+ [ -Werror] )
197
+ AX_CHECK_COMPILE_FLAG ( [ -Wduplicated-cond] ,
198
+ [ CFLAGS="-Wduplicated-cond $CFLAGS"] ,,
199
+ [ -Werror] )
200
+ AX_CHECK_COMPILE_FLAG ( [ -Wlogical-op] ,
201
+ [ CFLAGS="-Wlogical-op $CFLAGS"] ,,
202
+ [ -Werror] )
203
+ AX_CHECK_COMPILE_FLAG ( [ -Wformat-truncation] ,
204
+ [ CFLAGS="-Wformat-truncation $CFLAGS"] ,,
205
+ [ -Werror] )
206
+ AX_CHECK_COMPILE_FLAG ( [ -Wstrict-prototypes] ,
207
+ [ CFLAGS="-Wstrict-prototypes $CFLAGS"] ,,
208
+ [ -Werror] )
209
+ AX_CHECK_COMPILE_FLAG ( [ -fno-common] ,
210
+ [ CFLAGS="-fno-common $CFLAGS"] ,,
211
+ [ -Werror] )
195
212
196
213
ZEND_CHECK_ALIGNMENT
197
214
ZEND_CHECK_SIGNALS
@@ -300,7 +317,8 @@ int emu(const opcode_handler_t *ip, void *fp) {
300
317
] )
301
318
AS_VAR_IF ( [ php_cv_have_global_register_vars] , [ yes] ,
302
319
[ AC_DEFINE ( [ HAVE_GCC_GLOBAL_REGS] , [ 1] ,
303
- [ Define to 1 if the target system has support for global register variables.] ) ] ,
320
+ [ Define to 1 if the target system has support for global register
321
+ variables.] ) ] ,
304
322
[ ZEND_GCC_GLOBAL_REGS=no] )
305
323
] )
306
324
AC_MSG_CHECKING ( [ whether to enable global register variables support] )
0 commit comments