1 # signalblocking.m4 serial 2 (gettext-0.15.1)
2 dnl Copyright (C) 2001-2002, 2006 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.
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([gl_SIGNALBLOCKING],
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, [gl_cv_func_sigprocmask=1])
19 if test -n "$gl_cv_func_sigprocmask"; then
20 AC_DEFINE([HAVE_POSIX_SIGNALBLOCKING], 1,
21 [Define to 1 if you have the sigset_t type and the sigprocmask function.])
23 AC_LIBOBJ([sigprocmask])
28 # Prerequisites of lib/sigprocmask.c.
29 AC_DEFUN([gl_PREREQ_SIGPROCMASK], [
30 AC_CHECK_FUNCS_ONCE(raise)