Skip to content

Commit 4763396

Browse files
committed
Simplify functions checks in m4
- AC_CHECK_FUNCS already automatically defines belonging HAVE_function symbols and executes given shell code.
1 parent ee58282 commit 4763396

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

Zend/Zend.m4

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,10 +306,8 @@ AC_ARG_ENABLE([zend-signals],
306306
[ZEND_SIGNALS=$enableval],
307307
[ZEND_SIGNALS=yes])
308308
309-
AC_CHECK_FUNC(sigaction, [
310-
AC_DEFINE(HAVE_SIGACTION, 1, [Whether sigaction() is available])
311-
], [
312-
ZEND_SIGNALS=no
309+
AC_CHECK_FUNCS([sigaction], [], [
310+
ZEND_SIGNALS=no
313311
])
314312
if test "$ZEND_SIGNALS" = "yes"; then
315313
AC_DEFINE(ZEND_SIGNALS, 1, [Use zend signal handling])

ext/pcntl/config.m4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ PHP_ARG_ENABLE([pcntl],
44
[Enable pcntl support (CLI/CGI only)])])
55

66
if test "$PHP_PCNTL" != "no"; then
7-
AC_CHECK_FUNCS(fork, [ AC_DEFINE(HAVE_FORK,1,[ ]) ], [ AC_MSG_ERROR(pcntl: fork() not supported by this platform) ])
8-
AC_CHECK_FUNCS(waitpid, [ AC_DEFINE(HAVE_WAITPID,1,[ ]) ], [ AC_MSG_ERROR(pcntl: waitpid() not supported by this platform) ])
9-
AC_CHECK_FUNCS(sigaction, [ AC_DEFINE(HAVE_SIGACTION,1,[ ]) ], [ AC_MSG_ERROR(pcntl: sigaction() not supported by this platform) ])
7+
AC_CHECK_FUNCS([fork], [], [AC_MSG_ERROR([pcntl: fork() not supported by this platform])])
8+
AC_CHECK_FUNCS([waitpid], [], [AC_MSG_ERROR([pcntl: waitpid() not supported by this platform])])
9+
AC_CHECK_FUNCS([sigaction], [], [AC_MSG_ERROR([pcntl: sigaction() not supported by this platform])])
1010
AC_CHECK_FUNCS([getpriority setpriority wait3 wait4 sigwaitinfo sigtimedwait unshare])
1111

1212
AC_MSG_CHECKING([for siginfo_t])

0 commit comments

Comments
 (0)