added missing dependencies to fix failing unistr/ tests
[gnulib.git] / m4 / signal_h.m4
1 # signal_h.m4 serial 11
2 dnl Copyright (C) 2007-2010 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 AC_DEFUN([gl_SIGNAL_H],
8 [
9   AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
10   gl_CHECK_NEXT_HEADERS([signal.h])
11 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
12 # then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
13   AC_CHECK_TYPE([volatile sig_atomic_t], [],
14     [HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0], [[
15 #include <signal.h>
16     ]])
17   AC_REQUIRE([AC_TYPE_UID_T])
18
19   dnl Check for declarations of anything we want to poison if the
20   dnl corresponding gnulib module is not in use.
21   gl_WARN_ON_USE_PREPARE([[#include <signal.h>
22     ]], [sigaction sigaddset sigdelset sigemptyset sigfillset sigismember
23     sigpending sigprocmask])
24 ])
25
26 AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR],
27 [
28   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
29   AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
30   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
31   dnl Define it also as a C macro, for the benefit of the unit tests.
32   gl_MODULE_INDICATOR_FOR_TESTS([$1])
33 ])
34
35 AC_DEFUN([gl_SIGNAL_H_DEFAULTS],
36 [
37   GNULIB_SIGNAL_H_SIGPIPE=0;   AC_SUBST([GNULIB_SIGNAL_H_SIGPIPE])
38   GNULIB_SIGPROCMASK=0;        AC_SUBST([GNULIB_SIGPROCMASK])
39   GNULIB_SIGACTION=0;          AC_SUBST([GNULIB_SIGACTION])
40   dnl Assume proper GNU behavior unless another module says otherwise.
41   HAVE_POSIX_SIGNALBLOCKING=1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING])
42   HAVE_SIGSET_T=1;             AC_SUBST([HAVE_SIGSET_T])
43   HAVE_SIGINFO_T=1;            AC_SUBST([HAVE_SIGINFO_T])
44   HAVE_SIGACTION=1;            AC_SUBST([HAVE_SIGACTION])
45   HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
46                                AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION])
47   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
48                                AC_SUBST([HAVE_TYPE_VOLATILE_SIG_ATOMIC_T])
49 ])