| 1 |
# sysexits.m4 |
| 2 |
# serial 7 |
| 3 |
dnl Copyright (C) 2003, 2005, 2007, 2009-2026 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. |
| 7 |
dnl This file is offered as-is, without any warranty. |
| 8 |
|
| 9 |
AC_DEFUN([gl_SYSEXITS], |
| 10 |
[ |
| 11 |
AC_CHECK_HEADERS_ONCE([sysexits.h]) |
| 12 |
if test $ac_cv_header_sysexits_h = yes; then |
| 13 |
HAVE_SYSEXITS_H=1 |
| 14 |
gl_CHECK_NEXT_HEADERS([sysexits.h]) |
| 15 |
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sysexits.h>]], |
| 16 |
[[switch (0) |
| 17 |
{ |
| 18 |
case EX_OK: |
| 19 |
case EX_USAGE: |
| 20 |
case EX_DATAERR: |
| 21 |
case EX_NOINPUT: |
| 22 |
case EX_NOUSER: |
| 23 |
case EX_NOHOST: |
| 24 |
case EX_UNAVAILABLE: |
| 25 |
case EX_SOFTWARE: |
| 26 |
case EX_OSERR: |
| 27 |
case EX_OSFILE: |
| 28 |
case EX_CANTCREAT: |
| 29 |
case EX_IOERR: |
| 30 |
case EX_TEMPFAIL: |
| 31 |
case EX_PROTOCOL: |
| 32 |
case EX_NOPERM: |
| 33 |
case EX_CONFIG: |
| 34 |
break; |
| 35 |
} |
| 36 |
]])], |
| 37 |
[GL_GENERATE_SYSEXITS_H=false], |
| 38 |
[GL_GENERATE_SYSEXITS_H=true]) |
| 39 |
else |
| 40 |
HAVE_SYSEXITS_H=0 |
| 41 |
GL_GENERATE_SYSEXITS_H=true |
| 42 |
fi |
| 43 |
AC_SUBST([HAVE_SYSEXITS_H]) |
| 44 |
]) |