|
303 | 303 | AC_MSG_CHECKING(whether to enable zend signal handling)
|
304 | 304 | AC_MSG_RESULT($ZEND_SIGNALS)
|
305 | 305 |
|
306 |
| -dnl Don't enable Zend Max Execution Timers by default until PHP 8.3 to not break the ABI |
307 |
| -AC_ARG_ENABLE([zend-max-execution-timers], |
308 |
| - [AS_HELP_STRING([--enable-zend-max-execution-timers], |
309 |
| - [whether to enable zend max execution timers])], |
310 |
| - [ZEND_MAX_EXECUTION_TIMERS=$enableval], |
311 |
| - [ZEND_MAX_EXECUTION_TIMERS=$ZEND_ZTS]) |
312 |
| -
|
313 |
| -AS_CASE(["$host_alias"], [*linux*|*freebsd*], [], [ZEND_MAX_EXECUTION_TIMERS='no']) |
314 |
| -
|
315 |
| -PHP_CHECK_FUNC(timer_create, rt) |
316 |
| -if test "$ac_cv_func_timer_create" != "yes"; then |
317 |
| - ZEND_MAX_EXECUTION_TIMERS='no' |
318 |
| -fi |
319 |
| -
|
320 |
| -if test "$ZEND_MAX_EXECUTION_TIMERS" = "yes"; then |
321 |
| - AC_DEFINE(ZEND_MAX_EXECUTION_TIMERS, 1, [Use zend max execution timers]) |
322 |
| - CFLAGS="$CFLAGS -DZEND_MAX_EXECUTION_TIMERS" |
323 |
| -fi |
324 |
| -
|
325 |
| -AC_MSG_CHECKING(whether to enable zend max execution timers) |
326 |
| -AC_MSG_RESULT($ZEND_MAX_EXECUTION_TIMERS) |
| 306 | +ZEND_CHECK_MAX_EXECUTION_TIMERS |
327 | 307 | ])
|
328 | 308 |
|
329 | 309 | dnl
|
@@ -410,3 +390,33 @@ AS_VAR_IF([php_cv_have___cpuid_count], [yes],
|
410 | 390 | [AC_DEFINE([HAVE_CPUID_COUNT], [1],
|
411 | 391 | [Define to 1 if '__cpuid_count' is available.])])
|
412 | 392 | ])
|
| 393 | + |
| 394 | +dnl |
| 395 | +dnl ZEND_CHECK_MAX_EXECUTION_TIMERS |
| 396 | +dnl |
| 397 | +dnl Check whether to enable Zend max execution timers. |
| 398 | +dnl |
| 399 | +AC_DEFUN([ZEND_CHECK_MAX_EXECUTION_TIMERS], [dnl |
| 400 | +AC_ARG_ENABLE([zend-max-execution-timers], |
| 401 | + [AS_HELP_STRING([--enable-zend-max-execution-timers], |
| 402 | + [Enable Zend max execution timers; when building with thread safety |
| 403 | + (--enable-zts), they are automatically enabled by default based on the |
| 404 | + system support])], |
| 405 | + [ZEND_MAX_EXECUTION_TIMERS=$enableval], |
| 406 | + [ZEND_MAX_EXECUTION_TIMERS=$ZEND_ZTS]) |
| 407 | +
|
| 408 | +AS_CASE([$host_alias], [*linux*|*freebsd*],, |
| 409 | + [ZEND_MAX_EXECUTION_TIMERS=no]) |
| 410 | +
|
| 411 | +AS_VAR_IF([ZEND_MAX_EXECUTION_TIMERS], [yes], |
| 412 | + [AC_SEARCH_LIBS([timer_create], [rt],, |
| 413 | + [ZEND_MAX_EXECUTION_TIMERS=no])]) |
| 414 | +
|
| 415 | +AS_VAR_IF([ZEND_MAX_EXECUTION_TIMERS], [yes], |
| 416 | + [AC_DEFINE([ZEND_MAX_EXECUTION_TIMERS], [1], |
| 417 | + [Define to 1 if Zend max execution timers are supported and enabled.]) |
| 418 | + AS_VAR_APPEND([CFLAGS], [" -DZEND_MAX_EXECUTION_TIMERS"])]) |
| 419 | +
|
| 420 | +AC_MSG_CHECKING([whether to enable Zend max execution timers]) |
| 421 | +AC_MSG_RESULT([$ZEND_MAX_EXECUTION_TIMERS]) |
| 422 | +]) |
0 commit comments