config.m4 1.0 KB

12345678910111213141516171819202122232425262728
  1. dnl config.m4 for extension pcntl
  2. PHP_ARG_ENABLE(pcntl, whether to enable pcntl support,
  3. [ --enable-pcntl Enable pcntl support (CLI/CGI only)])
  4. if test "$PHP_PCNTL" != "no"; then
  5. AC_CHECK_FUNCS(fork, [ AC_DEFINE(HAVE_FORK,1,[ ]) ], [ AC_MSG_ERROR(pcntl: fork() not supported by this platform) ])
  6. AC_CHECK_FUNCS(waitpid, [ AC_DEFINE(HAVE_WAITPID,1,[ ]) ], [ AC_MSG_ERROR(pcntl: waitpid() not supported by this platform) ])
  7. AC_CHECK_FUNCS(sigaction, [ AC_DEFINE(HAVE_SIGACTION,1,[ ]) ], [ AC_MSG_ERROR(pcntl: sigaction() not supported by this platform) ])
  8. AC_CHECK_FUNCS([getpriority setpriority wait3 wait4 sigprocmask sigwaitinfo sigtimedwait])
  9. AC_MSG_CHECKING([for siginfo_t])
  10. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  11. #include <signal.h>
  12. #ifdef HAVE_SIGINFO_H
  13. #include <siginfo.h>
  14. #endif
  15. ]],[[
  16. siginfo_t info;
  17. ]])],[
  18. AC_MSG_RESULT([yes])
  19. PCNTL_CFLAGS="-DHAVE_STRUCT_SIGINFO_T"
  20. ], [
  21. AC_MSG_RESULT([no])
  22. ])
  23. PHP_NEW_EXTENSION(pcntl, pcntl.c php_signal.c, $ext_shared, cli, $PCNTL_CFLAGS)
  24. fi