@@ -251,28 +251,7 @@ int main(void)
251
251
AC_MSG_RESULT ( done )
252
252
253
253
ZEND_CHECK_SIGNALS
254
-
255
- dnl Don't enable Zend Max Execution Timers by default until PHP 8.3 to not break the ABI
256
- AC_ARG_ENABLE ( [ zend-max-execution-timers] ,
257
- [ AS_HELP_STRING ( [ --enable-zend-max-execution-timers] ,
258
- [ whether to enable zend max execution timers] ) ] ,
259
- [ ZEND_MAX_EXECUTION_TIMERS=$enableval] ,
260
- [ ZEND_MAX_EXECUTION_TIMERS=$ZEND_ZTS] )
261
-
262
- AS_CASE ( [ "$host_alias"] , [ *linux*|*freebsd*] , [ ] , [ ZEND_MAX_EXECUTION_TIMERS='no'] )
263
-
264
- PHP_CHECK_FUNC(timer_create, rt)
265
- if test "$ac_cv_func_timer_create" != "yes"; then
266
- ZEND_MAX_EXECUTION_TIMERS='no'
267
- fi
268
-
269
- if test "$ZEND_MAX_EXECUTION_TIMERS" = "yes"; then
270
- AC_DEFINE ( ZEND_MAX_EXECUTION_TIMERS , 1 , [ Use zend max execution timers] )
271
- CFLAGS="$CFLAGS -DZEND_MAX_EXECUTION_TIMERS"
272
- fi
273
-
274
- AC_MSG_CHECKING ( whether to enable zend max execution timers )
275
- AC_MSG_RESULT ( $ZEND_MAX_EXECUTION_TIMERS )
254
+ ZEND_CHECK_MAX_EXECUTION_TIMERS
276
255
] )
277
256
278
257
dnl
@@ -413,3 +392,33 @@ AS_VAR_IF([ZEND_SIGNALS], [yes],
413
392
AC_MSG_CHECKING ( [ whether to enable Zend signal handling] )
414
393
AC_MSG_RESULT ( [ $ZEND_SIGNALS] )
415
394
] )
395
+
396
+ dnl
397
+ dnl ZEND_CHECK_MAX_EXECUTION_TIMERS
398
+ dnl
399
+ dnl Check whether to enable Zend max execution timers.
400
+ dnl
401
+ AC_DEFUN ( [ ZEND_CHECK_MAX_EXECUTION_TIMERS] , [ dnl
402
+ AC_ARG_ENABLE ( [ zend-max-execution-timers] ,
403
+ [ AS_HELP_STRING ( [ --enable-zend-max-execution-timers] ,
404
+ [ Enable Zend max execution timers; when building with thread safety
405
+ (--enable-zts), they are automatically enabled by default based on the
406
+ system support] ) ] ,
407
+ [ ZEND_MAX_EXECUTION_TIMERS=$enableval] ,
408
+ [ ZEND_MAX_EXECUTION_TIMERS=$ZEND_ZTS] )
409
+
410
+ AS_CASE ( [ $host_alias] , [ *linux*|*freebsd*] ,,
411
+ [ ZEND_MAX_EXECUTION_TIMERS=no] )
412
+
413
+ AS_VAR_IF ( [ ZEND_MAX_EXECUTION_TIMERS] , [ yes] ,
414
+ [ AC_SEARCH_LIBS ( [ timer_create] , [ rt] ,,
415
+ [ ZEND_MAX_EXECUTION_TIMERS=no] ) ] )
416
+
417
+ AS_VAR_IF ( [ ZEND_MAX_EXECUTION_TIMERS] , [ yes] ,
418
+ [ AC_DEFINE ( [ ZEND_MAX_EXECUTION_TIMERS] , [ 1] ,
419
+ [ Define to 1 if Zend max execution timers are supported and enabled.] )
420
+ AS_VAR_APPEND ( [ CFLAGS] , [ " -DZEND_MAX_EXECUTION_TIMERS"] ) ] )
421
+
422
+ AC_MSG_CHECKING ( [ whether to enable Zend max execution timers] )
423
+ AC_MSG_RESULT ( [ $ZEND_MAX_EXECUTION_TIMERS] )
424
+ ] )
0 commit comments