Add, forgotten in last commit.
[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; 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 available signal blocking primitives. Three different APIs exist:
8 # 1) POSIX: sigemptyset, sigaddset, sigprocmask
9 # 2) SYSV: sighold, sigrelse
10 # 3) BSD: sigblock, sigsetmask
11 # For simplicity, here we check only for the POSIX signal blocking.
12 AC_DEFUN([gt_SIGNALBLOCKING],
13 [
14   signals_not_posix=
15   AC_EGREP_HEADER(sigset_t, signal.h, , signals_not_posix=1)
16   if test -z "$signals_not_posix"; then
17     AC_CHECK_FUNC(sigprocmask,
18       AC_DEFINE(HAVE_POSIX_SIGNALBLOCKING, 1,
19        [Define to 1 if you have the sigset_t type and the sigprocmask function.]))
20   fi
21 ])