New module 'fatal-signal'.
[gnulib.git] / m4 / signalblocking.m4
1 # signalblocking.m4 serial 1 (gettext-0.11)
2 dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
3 dnl This file is free software, distributed under the terms of the GNU
4 dnl General Public License.  As a special exception to the GNU General
5 dnl Public License, this file may be distributed as part of a program
6 dnl that contains a configuration script generated by Autoconf, under
7 dnl the same distribution terms as the rest of that program.
8
9 # Determine available signal blocking primitives. Three different APIs exist:
10 # 1) POSIX: sigemptyset, sigaddset, sigprocmask
11 # 2) SYSV: sighold, sigrelse
12 # 3) BSD: sigblock, sigsetmask
13 # For simplicity, here we check only for the POSIX signal blocking.
14 AC_DEFUN([gt_SIGNALBLOCKING],
15 [
16   signals_not_posix=
17   AC_EGREP_HEADER(sigset_t, signal.h, , signals_not_posix=1)
18   if test -z "$signals_not_posix"; then
19     AC_CHECK_FUNC(sigprocmask,
20       AC_DEFINE(HAVE_POSIX_SIGNALBLOCKING, 1,
21        [Define to 1 if you have the sigset_t type and the sigprocmask function.]))
22   fi
23 ])