diff options
Diffstat (limited to 'ext/pcntl/config.m4')
-rw-r--r-- | ext/pcntl/config.m4 | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/ext/pcntl/config.m4 b/ext/pcntl/config.m4 index 70e0aeb008..8e4dc41f33 100644 --- a/ext/pcntl/config.m4 +++ b/ext/pcntl/config.m4 @@ -10,5 +10,21 @@ if test "$PHP_PCNTL" != "no"; then AC_CHECK_FUNCS(waitpid, [ AC_DEFINE(HAVE_WAITPID,1,[ ]) ], [ AC_MSG_ERROR(pcntl: waitpid() not supported by this platform) ]) AC_CHECK_FUNCS(sigaction, [ AC_DEFINE(HAVE_SIGACTION,1,[ ]) ], [ AC_MSG_ERROR(pcntl: sigaction() not supported by this platform) ]) AC_CHECK_FUNCS([getpriority setpriority wait3 wait4 sigprocmask sigwaitinfo sigtimedwait]) - PHP_NEW_EXTENSION(pcntl, pcntl.c php_signal.c, $ext_shared, cli) + + AC_MSG_CHECKING([for siginfo_t]) + AC_TRY_COMPILE([ + #include <signal.h> + #ifdef HAVE_SIGINFO_H + #include <siginfo.h> + #endif + ],[ + siginfo_t info; + ],[ + AC_MSG_RESULT([yes]) + PCNTL_CFLAGS="-DHAVE_STRUCT_SIGINFO_T" + ], [ + AC_MSG_RESULT([no]) + ]) + + PHP_NEW_EXTENSION(pcntl, pcntl.c php_signal.c, $ext_shared, cli, $PCNTL_CFLAGS) fi |