sigaction.m4 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # sigaction.m4 serial 6
  2. dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
  3. dnl This file is free software; the Free Software Foundation
  4. dnl gives unlimited permission to copy and/or distribute it,
  5. dnl with or without modifications, as long as this notice is preserved.
  6. # Determine if sigaction interface is present.
  7. AC_DEFUN([gl_SIGACTION],
  8. [
  9. AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
  10. AC_CHECK_FUNCS_ONCE([sigaction])
  11. if test $ac_cv_func_sigaction = yes; then
  12. AC_CHECK_MEMBERS([struct sigaction.sa_sigaction], , ,
  13. [[#include <signal.h>]])
  14. if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
  15. HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
  16. fi
  17. else
  18. HAVE_SIGACTION=0
  19. fi
  20. ])
  21. # Prerequisites of the part of lib/signal.in.h and of lib/sigaction.c.
  22. AC_DEFUN([gl_PREREQ_SIGACTION],
  23. [
  24. AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
  25. AC_REQUIRE([AC_C_RESTRICT])
  26. AC_REQUIRE([AC_TYPE_UID_T])
  27. AC_REQUIRE([gl_PREREQ_SIG_HANDLER_H])
  28. AC_CHECK_FUNCS_ONCE([sigaltstack siginterrupt])
  29. AC_CHECK_TYPES([siginfo_t], [], [], [[
  30. #include <signal.h>
  31. ]])
  32. if test $ac_cv_type_siginfo_t = no; then
  33. HAVE_SIGINFO_T=0
  34. fi
  35. ])
  36. # Prerequisites of lib/sig-handler.h.
  37. AC_DEFUN([gl_PREREQ_SIG_HANDLER_H],
  38. [
  39. AC_REQUIRE([AC_C_INLINE])
  40. ])