sigpipe.m4 902 B

1234567891011121314151617181920212223242526272829
  1. # sigpipe.m4 serial 2
  2. dnl Copyright (C) 2008, 2009 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. dnl Tests whether SIGPIPE is provided by <signal.h>.
  7. dnl Sets gl_cv_header_signal_h_SIGPIPE.
  8. AC_DEFUN([gl_SIGNAL_SIGPIPE],
  9. [
  10. dnl Use AC_REQUIRE here, so that the default behavior below is expanded
  11. dnl once only, before all statements that occur in other macros.
  12. AC_REQUIRE([gl_SIGNAL_SIGPIPE_BODY])
  13. ])
  14. AC_DEFUN([gl_SIGNAL_SIGPIPE_BODY],
  15. [
  16. AC_REQUIRE([AC_PROG_CC])
  17. AC_CACHE_CHECK([for SIGPIPE], [gl_cv_header_signal_h_SIGPIPE], [
  18. AC_EGREP_CPP([booboo],[
  19. #include <signal.h>
  20. #if !defined SIGPIPE
  21. booboo
  22. #endif
  23. ],
  24. [gl_cv_header_signal_h_SIGPIPE=no],
  25. [gl_cv_header_signal_h_SIGPIPE=yes])
  26. ])
  27. ])