Doc tweak.
[gnulib.git] / m4 / sigaction.m4
1 # sigaction.m4 serial 4
2 dnl Copyright (C) 2008 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
7 # Determine if sigaction interface is present.
8 AC_DEFUN([gl_SIGACTION],
9 [
10   AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
11   AC_REPLACE_FUNCS([sigaction])
12   if test $ac_cv_func_sigaction = no ; then
13     HAVE_SIGACTION=0
14     AC_SUBST([HAVE_SIGACTION])
15     gl_PREREQ_SIGACTION
16   fi
17 ])
18
19 # Prerequisites of the part of lib/signal.in.h and of lib/sigaction.c.
20 AC_DEFUN([gl_PREREQ_SIGACTION],
21 [
22   AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
23   AC_REQUIRE([AC_C_RESTRICT])
24   AC_REQUIRE([AC_TYPE_UID_T])
25   AC_REQUIRE([gl_PREREQ_SIG_HANDLER_H])
26   AC_CHECK_FUNCS_ONCE([sigaltstack siginterrupt])
27   AC_CHECK_TYPES([siginfo_t], [], [], [[
28 #include <signal.h>
29   ]])
30   if test $ac_cv_type_siginfo_t = no; then
31     HAVE_SIGINFO_T=0
32     AC_SUBST([HAVE_SIGINFO_T])
33   fi
34 ])
35
36 # Prerequisites of lib/sig-handler.h.
37 AC_DEFUN([gl_PREREQ_SIG_HANDLER_H],
38 [
39   AC_REQUIRE([AC_C_INLINE])
40   AC_CHECK_MEMBERS([struct sigaction.sa_sigaction], , ,
41                    [[#include <signal.h>]])
42   if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
43     HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
44     AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION])
45   fi
46 ])