Annotation of embedaddon/libiconv/srcm4/signal_h.m4, revision 1.1.1.2
1.1.1.2 ! misho 1: # signal_h.m4 serial 16
! 2: dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
1.1 misho 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])
1.1.1.2 ! misho 10: AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T])
! 11: gl_NEXT_HEADERS([signal.h])
! 12:
1.1 misho 13: # AIX declares sig_atomic_t to already include volatile, and C89 compilers
14: # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
15: AC_CHECK_TYPE([volatile sig_atomic_t], [],
16: [HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0], [[
17: #include <signal.h>
18: ]])
1.1.1.2 ! misho 19:
! 20: AC_REQUIRE([AC_TYPE_UID_T])
! 21:
! 22: dnl Persuade glibc <signal.h> to define sighandler_t.
! 23: AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
! 24: AC_CHECK_TYPE([sighandler_t], [], [HAVE_SIGHANDLER_T=0], [[
! 25: #include <signal.h>
! 26: ]])
! 27:
! 28: dnl Check for declarations of anything we want to poison if the
! 29: dnl corresponding gnulib module is not in use.
! 30: gl_WARN_ON_USE_PREPARE([[#include <signal.h>
! 31: ]], [pthread_sigmask sigaction
! 32: sigaddset sigdelset sigemptyset sigfillset sigismember
! 33: sigpending sigprocmask])
! 34: ])
! 35:
! 36: AC_DEFUN([gl_CHECK_TYPE_SIGSET_T],
! 37: [
! 38: AC_CHECK_TYPES([sigset_t],
! 39: [gl_cv_type_sigset_t=yes], [gl_cv_type_sigset_t=no],
! 40: [[
! 41: #include <signal.h>
! 42: /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
! 43: #include <sys/types.h>
! 44: ]])
! 45: if test $gl_cv_type_sigset_t != yes; then
! 46: HAVE_SIGSET_T=0
! 47: fi
1.1 misho 48: ])
49:
50: AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR],
51: [
52: dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
53: AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
1.1.1.2 ! misho 54: gl_MODULE_INDICATOR_SET_VARIABLE([$1])
! 55: dnl Define it also as a C macro, for the benefit of the unit tests.
! 56: gl_MODULE_INDICATOR_FOR_TESTS([$1])
1.1 misho 57: ])
58:
59: AC_DEFUN([gl_SIGNAL_H_DEFAULTS],
60: [
1.1.1.2 ! misho 61: GNULIB_PTHREAD_SIGMASK=0; AC_SUBST([GNULIB_PTHREAD_SIGMASK])
1.1 misho 62: GNULIB_SIGNAL_H_SIGPIPE=0; AC_SUBST([GNULIB_SIGNAL_H_SIGPIPE])
63: GNULIB_SIGPROCMASK=0; AC_SUBST([GNULIB_SIGPROCMASK])
64: GNULIB_SIGACTION=0; AC_SUBST([GNULIB_SIGACTION])
65: dnl Assume proper GNU behavior unless another module says otherwise.
66: HAVE_POSIX_SIGNALBLOCKING=1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING])
1.1.1.2 ! misho 67: HAVE_PTHREAD_SIGMASK=1; AC_SUBST([HAVE_PTHREAD_SIGMASK])
1.1 misho 68: HAVE_SIGSET_T=1; AC_SUBST([HAVE_SIGSET_T])
69: HAVE_SIGINFO_T=1; AC_SUBST([HAVE_SIGINFO_T])
70: HAVE_SIGACTION=1; AC_SUBST([HAVE_SIGACTION])
71: HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
72: AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION])
73: HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
74: AC_SUBST([HAVE_TYPE_VOLATILE_SIG_ATOMIC_T])
1.1.1.2 ! misho 75: HAVE_SIGHANDLER_T=1; AC_SUBST([HAVE_SIGHANDLER_T])
! 76: REPLACE_PTHREAD_SIGMASK=0; AC_SUBST([REPLACE_PTHREAD_SIGMASK])
1.1 misho 77: ])
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>