xref: /PHP-7.3/ext/pcntl/config.m4 (revision 4371945b)
1dnl config.m4 for extension pcntl
2
3PHP_ARG_ENABLE(pcntl, whether to enable pcntl support,
4[  --enable-pcntl          Enable pcntl support (CLI/CGI only)])
5
6if 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) ])
10  AC_CHECK_FUNCS([getpriority setpriority wait3 wait4 sigprocmask sigwaitinfo sigtimedwait])
11
12  AC_MSG_CHECKING([for siginfo_t])
13  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
14    #include <signal.h>
15    #ifdef HAVE_SIGINFO_H
16      #include <siginfo.h>
17    #endif
18  ]],[[
19    siginfo_t info;
20  ]])],[
21    AC_MSG_RESULT([yes])
22    PCNTL_CFLAGS="-DHAVE_STRUCT_SIGINFO_T"
23  ], [
24    AC_MSG_RESULT([no])
25  ])
26
27  PHP_NEW_EXTENSION(pcntl, pcntl.c php_signal.c, $ext_shared, cli, $PCNTL_CFLAGS)
28fi
29