|
199 | 199 |
|
200 | 200 | ZEND_CHECK_ALIGNMENT
|
201 | 201 | ZEND_CHECK_SIGNALS
|
202 |
| -
|
203 |
| -dnl Don't enable Zend Max Execution Timers by default until PHP 8.3 to not break the ABI |
204 |
| -AC_ARG_ENABLE([zend-max-execution-timers], |
205 |
| - [AS_HELP_STRING([--enable-zend-max-execution-timers], |
206 |
| - [whether to enable zend max execution timers])], |
207 |
| - [ZEND_MAX_EXECUTION_TIMERS=$enableval], |
208 |
| - [ZEND_MAX_EXECUTION_TIMERS=$ZEND_ZTS]) |
209 |
| -
|
210 |
| -AS_CASE(["$host_alias"], [*linux*|*freebsd*], [], [ZEND_MAX_EXECUTION_TIMERS='no']) |
211 |
| -
|
212 |
| -PHP_CHECK_FUNC(timer_create, rt) |
213 |
| -if test "$ac_cv_func_timer_create" != "yes"; then |
214 |
| - ZEND_MAX_EXECUTION_TIMERS='no' |
215 |
| -fi |
216 |
| -
|
217 |
| -if test "$ZEND_MAX_EXECUTION_TIMERS" = "yes"; then |
218 |
| - AC_DEFINE(ZEND_MAX_EXECUTION_TIMERS, 1, [Use zend max execution timers]) |
219 |
| - CFLAGS="$CFLAGS -DZEND_MAX_EXECUTION_TIMERS" |
220 |
| -fi |
221 |
| -
|
222 |
| -AC_MSG_CHECKING(whether to enable zend max execution timers) |
223 |
| -AC_MSG_RESULT($ZEND_MAX_EXECUTION_TIMERS) |
| 202 | +ZEND_CHECK_MAX_EXECUTION_TIMERS |
224 | 203 | ])
|
225 | 204 |
|
226 | 205 | dnl
|
@@ -425,3 +404,33 @@ AS_VAR_IF([ZEND_SIGNALS], [yes],
|
425 | 404 | AC_MSG_CHECKING([whether to enable Zend signal handling])
|
426 | 405 | AC_MSG_RESULT([$ZEND_SIGNALS])
|
427 | 406 | ])
|
| 407 | + |
| 408 | +dnl |
| 409 | +dnl ZEND_CHECK_MAX_EXECUTION_TIMERS |
| 410 | +dnl |
| 411 | +dnl Check whether to enable Zend max execution timers. |
| 412 | +dnl |
| 413 | +AC_DEFUN([ZEND_CHECK_MAX_EXECUTION_TIMERS], [dnl |
| 414 | +AC_ARG_ENABLE([zend-max-execution-timers], |
| 415 | + [AS_HELP_STRING([--enable-zend-max-execution-timers], |
| 416 | + [Enable Zend max execution timers; when building with thread safety |
| 417 | + (--enable-zts), they are automatically enabled by default based on the |
| 418 | + system support])], |
| 419 | + [ZEND_MAX_EXECUTION_TIMERS=$enableval], |
| 420 | + [ZEND_MAX_EXECUTION_TIMERS=$ZEND_ZTS]) |
| 421 | +
|
| 422 | +AS_CASE([$host_alias], [*linux*|*freebsd*],, |
| 423 | + [ZEND_MAX_EXECUTION_TIMERS=no]) |
| 424 | +
|
| 425 | +AS_VAR_IF([ZEND_MAX_EXECUTION_TIMERS], [yes], |
| 426 | + [AC_SEARCH_LIBS([timer_create], [rt],, |
| 427 | + [ZEND_MAX_EXECUTION_TIMERS=no])]) |
| 428 | +
|
| 429 | +AS_VAR_IF([ZEND_MAX_EXECUTION_TIMERS], [yes], |
| 430 | + [AC_DEFINE([ZEND_MAX_EXECUTION_TIMERS], [1], |
| 431 | + [Define to 1 if Zend max execution timers are supported and enabled.]) |
| 432 | + AS_VAR_APPEND([CFLAGS], [" -DZEND_MAX_EXECUTION_TIMERS"])]) |
| 433 | +
|
| 434 | +AC_MSG_CHECKING([whether to enable Zend max execution timers]) |
| 435 | +AC_MSG_RESULT([$ZEND_MAX_EXECUTION_TIMERS]) |
| 436 | +]) |
0 commit comments