time: Fix test failure on FreeBSD.
[gnulib.git] / m4 / sigpipe.m4
blob93439ffbfca3a467500f57f77b209691d3a5b21e
1 # sigpipe.m4
2 # serial 3
3 dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 dnl Tests whether SIGPIPE is provided by <signal.h>.
9 dnl Sets gl_cv_header_signal_h_SIGPIPE.
10 AC_DEFUN([gl_SIGNAL_SIGPIPE],
12   dnl Ensure to expand the default settings once only, before all statements
13   dnl that occur in other macros.
14   AC_REQUIRE([gl_SIGNAL_SIGPIPE_BODY])
17 AC_DEFUN([gl_SIGNAL_SIGPIPE_BODY],
19   AC_REQUIRE([AC_PROG_CC])
20   AC_CACHE_CHECK([for SIGPIPE], [gl_cv_header_signal_h_SIGPIPE], [
21     AC_EGREP_CPP([booboo],[
22 #include <signal.h>
23 #if !defined SIGPIPE
24 booboo
25 #endif
26       ],
27       [gl_cv_header_signal_h_SIGPIPE=no],
28       [gl_cv_header_signal_h_SIGPIPE=yes])
29   ])