config.m4 995 B

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