annotate m4/errno_h.m4 @ 39944:eb64273b66c2

Assume Autoconf >= 2.63. * DEPENDENCIES: Mention the requirement. * gnulib-tool (DEFAULT_AUTOCONF_MINVERSION): Bump to 2.63. (func_get_filelist): Don't list m4/onceonly.m4 any more. * pygnulib/GLModuleSystem.py (getFiles): Likewise. * m4/onceonly.m4: Remove file. * m4/openmp.m4: Remove file. * modules/openmp (Files): Remove m4/openmp.m4. * m4/configmake.m4 (gl_CONFIGMAKE_PREP): Don't set datarootdir, docdir, htmldir, dvidir, pdfdir, psdir, localedir. * m4/po.m4 (AM_PO_SUBDIRS): Don't set localedir. * m4/gnulib-common.m4 (m4_foreach_w): Remove fallback for Autoconf < 2.60. (AC_PROG_MKDIR_P): Remove definition for Autoconf < 2.62. (AC_PROG_SED): Remove fallback for Autoconf < 2.60. * m4/errno_h.m4 (AC_COMPUTE_INT): Remove fallback for Autoconf < 2.61. * m4/size_max.m4 (AC_COMPUTE_INT): Likewise. * m4/stdint.m4 (AC_COMPUTE_INT): Likewise. * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Assume AC_USE_SYSTEM_EXTENSIONS exists. * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Likewise, * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Remove workaround for Autoconf < 2.61. * m4/lib-prefix.m4 (AC_LIB_ARG_WITH): Remove macro. (AC_LIB_PREFIX): Use AC_ARG_WITH, assuming semantics of Autoconf >= 2.52. * m4/longlong.m4: Require Autoconf >= 2.62. Update comments. * m4/ls-mntd-fs.m4: Require Autoconf >= 2.60. Update comments. * m4/gettext.m4 (AM_GNU_GETTEXT): Update comment.
author Bruno Haible <bruno@clisp.org>
date Tue, 23 Oct 2018 00:06:52 +0200
parents 10eb9086bea0
children b06060465f09
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
39944
eb64273b66c2 Assume Autoconf >= 2.63.
Bruno Haible <bruno@clisp.org>
parents: 19484
diff changeset
1 # errno_h.m4 serial 13
19484
10eb9086bea0 maint: Run 'make update-copyright'
Paul Eggert <eggert@cs.ucla.edu>
parents: 18626
diff changeset
2 dnl Copyright (C) 2004, 2006, 2008-2018 Free Software Foundation, Inc.
10425
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 dnl This file is free software; the Free Software Foundation
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6
39944
eb64273b66c2 Assume Autoconf >= 2.63.
Bruno Haible <bruno@clisp.org>
parents: 19484
diff changeset
7 AC_PREREQ([2.61])
eb64273b66c2 Assume Autoconf >= 2.63.
Bruno Haible <bruno@clisp.org>
parents: 19484
diff changeset
8
11066
e6215ba96121 error: avoid expand-before-require warning
Eric Blake <ebb9@byu.net>
parents: 11007
diff changeset
9 AC_DEFUN_ONCE([gl_HEADER_ERRNO_H],
10425
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 [
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 AC_REQUIRE([AC_PROG_CC])
11007
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 10899
diff changeset
12 AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 10899
diff changeset
13 AC_EGREP_CPP([booboo],[
10425
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 #include <errno.h>
16893
a6389b513756 error, strerror-override: Support mingw64 from Fedora 17.
Paolo Bonzini <bonzini@gnu.org>
parents: 16891
diff changeset
15 #if !defined ETXTBSY
a6389b513756 error, strerror-override: Support mingw64 from Fedora 17.
Paolo Bonzini <bonzini@gnu.org>
parents: 16891
diff changeset
16 booboo
a6389b513756 error, strerror-override: Support mingw64 from Fedora 17.
Paolo Bonzini <bonzini@gnu.org>
parents: 16891
diff changeset
17 #endif
10441
d435a10d69fe Test for each of the missing macros individually.
Bruno Haible <bruno@clisp.org>
parents: 10440
diff changeset
18 #if !defined ENOMSG
d435a10d69fe Test for each of the missing macros individually.
Bruno Haible <bruno@clisp.org>
parents: 10440
diff changeset
19 booboo
d435a10d69fe Test for each of the missing macros individually.
Bruno Haible <bruno@clisp.org>
parents: 10440
diff changeset
20 #endif
d435a10d69fe Test for each of the missing macros individually.
Bruno Haible <bruno@clisp.org>
parents: 10440
diff changeset
21 #if !defined EIDRM
d435a10d69fe Test for each of the missing macros individually.
Bruno Haible <bruno@clisp.org>
parents: 10440
diff changeset
22 booboo
d435a10d69fe Test for each of the missing macros individually.
Bruno Haible <bruno@clisp.org>
parents: 10440
diff changeset
23 #endif
d435a10d69fe Test for each of the missing macros individually.
Bruno Haible <bruno@clisp.org>
parents: 10440
diff changeset
24 #if !defined ENOLINK
d435a10d69fe Test for each of the missing macros individually.
Bruno Haible <bruno@clisp.org>
parents: 10440
diff changeset
25 booboo
d435a10d69fe Test for each of the missing macros individually.
Bruno Haible <bruno@clisp.org>
parents: 10440
diff changeset
26 #endif
d435a10d69fe Test for each of the missing macros individually.
Bruno Haible <bruno@clisp.org>
parents: 10440
diff changeset
27 #if !defined EPROTO
d435a10d69fe Test for each of the missing macros individually.
Bruno Haible <bruno@clisp.org>
parents: 10440
diff changeset
28 booboo
d435a10d69fe Test for each of the missing macros individually.
Bruno Haible <bruno@clisp.org>
parents: 10440
diff changeset
29 #endif
d435a10d69fe Test for each of the missing macros individually.
Bruno Haible <bruno@clisp.org>
parents: 10440
diff changeset
30 #if !defined EMULTIHOP
d435a10d69fe Test for each of the missing macros individually.
Bruno Haible <bruno@clisp.org>
parents: 10440
diff changeset
31 booboo
d435a10d69fe Test for each of the missing macros individually.
Bruno Haible <bruno@clisp.org>
parents: 10440
diff changeset
32 #endif
d435a10d69fe Test for each of the missing macros individually.
Bruno Haible <bruno@clisp.org>
parents: 10440
diff changeset
33 #if !defined EBADMSG
d435a10d69fe Test for each of the missing macros individually.
Bruno Haible <bruno@clisp.org>
parents: 10440
diff changeset
34 booboo
d435a10d69fe Test for each of the missing macros individually.
Bruno Haible <bruno@clisp.org>
parents: 10440
diff changeset
35 #endif
d435a10d69fe Test for each of the missing macros individually.
Bruno Haible <bruno@clisp.org>
parents: 10440
diff changeset
36 #if !defined EOVERFLOW
d435a10d69fe Test for each of the missing macros individually.
Bruno Haible <bruno@clisp.org>
parents: 10440
diff changeset
37 booboo
d435a10d69fe Test for each of the missing macros individually.
Bruno Haible <bruno@clisp.org>
parents: 10440
diff changeset
38 #endif
d435a10d69fe Test for each of the missing macros individually.
Bruno Haible <bruno@clisp.org>
parents: 10440
diff changeset
39 #if !defined ENOTSUP
d435a10d69fe Test for each of the missing macros individually.
Bruno Haible <bruno@clisp.org>
parents: 10440
diff changeset
40 booboo
d435a10d69fe Test for each of the missing macros individually.
Bruno Haible <bruno@clisp.org>
parents: 10440
diff changeset
41 #endif
15484
80735ab15b24 errno: Port to Minix.
Bruno Haible <bruno@clisp.org>
parents: 14528
diff changeset
42 #if !defined ENETRESET
80735ab15b24 errno: Port to Minix.
Bruno Haible <bruno@clisp.org>
parents: 14528
diff changeset
43 booboo
80735ab15b24 errno: Port to Minix.
Bruno Haible <bruno@clisp.org>
parents: 14528
diff changeset
44 #endif
80735ab15b24 errno: Port to Minix.
Bruno Haible <bruno@clisp.org>
parents: 14528
diff changeset
45 #if !defined ECONNABORTED
80735ab15b24 errno: Port to Minix.
Bruno Haible <bruno@clisp.org>
parents: 14528
diff changeset
46 booboo
80735ab15b24 errno: Port to Minix.
Bruno Haible <bruno@clisp.org>
parents: 14528
diff changeset
47 #endif
11626
e54d8a239545 Define missing ESTALE on Interix 3.5.
Bruno Haible <bruno@clisp.org>
parents: 11550
diff changeset
48 #if !defined ESTALE
e54d8a239545 Define missing ESTALE on Interix 3.5.
Bruno Haible <bruno@clisp.org>
parents: 11550
diff changeset
49 booboo
e54d8a239545 Define missing ESTALE on Interix 3.5.
Bruno Haible <bruno@clisp.org>
parents: 11550
diff changeset
50 #endif
13754
3805b556be4b Define missing EDQUOT on NonStop Kernel.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
51 #if !defined EDQUOT
3805b556be4b Define missing EDQUOT on NonStop Kernel.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
52 booboo
3805b556be4b Define missing EDQUOT on NonStop Kernel.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
53 #endif
10441
d435a10d69fe Test for each of the missing macros individually.
Bruno Haible <bruno@clisp.org>
parents: 10440
diff changeset
54 #if !defined ECANCELED
10425
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
55 booboo
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
56 #endif
16891
e98619449f63 error, strerror-override: Support new errno values from POSIX:2008.
Bruno Haible <bruno@clisp.org>
parents: 16201
diff changeset
57 #if !defined EOWNERDEAD
e98619449f63 error, strerror-override: Support new errno values from POSIX:2008.
Bruno Haible <bruno@clisp.org>
parents: 16201
diff changeset
58 booboo
e98619449f63 error, strerror-override: Support new errno values from POSIX:2008.
Bruno Haible <bruno@clisp.org>
parents: 16201
diff changeset
59 #endif
e98619449f63 error, strerror-override: Support new errno values from POSIX:2008.
Bruno Haible <bruno@clisp.org>
parents: 16201
diff changeset
60 #if !defined ENOTRECOVERABLE
e98619449f63 error, strerror-override: Support new errno values from POSIX:2008.
Bruno Haible <bruno@clisp.org>
parents: 16201
diff changeset
61 booboo
e98619449f63 error, strerror-override: Support new errno values from POSIX:2008.
Bruno Haible <bruno@clisp.org>
parents: 16201
diff changeset
62 #endif
17149
a49df7b88261 errno: port to LynxOS 178 2.2.2
Paul Eggert <eggert@cs.ucla.edu>
parents: 16893
diff changeset
63 #if !defined EILSEQ
a49df7b88261 errno: port to LynxOS 178 2.2.2
Paul Eggert <eggert@cs.ucla.edu>
parents: 16893
diff changeset
64 booboo
a49df7b88261 errno: port to LynxOS 178 2.2.2
Paul Eggert <eggert@cs.ucla.edu>
parents: 16893
diff changeset
65 #endif
10425
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
66 ],
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
67 [gl_cv_header_errno_h_complete=no],
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
68 [gl_cv_header_errno_h_complete=yes])
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
69 ])
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
70 if test $gl_cv_header_errno_h_complete = yes; then
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
71 ERRNO_H=''
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
72 else
14186
cd4635d4dbe6 assume <ctype.h>, ..., <time.h> exist
Paul Eggert <eggert@cs.ucla.edu>
parents: 14079
diff changeset
73 gl_NEXT_HEADERS([errno.h])
10425
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
74 ERRNO_H='errno.h'
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
75 fi
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
76 AC_SUBST([ERRNO_H])
14528
662ae53d8d37 Remove leftover generated .h files after config.status changed.
Bruno Haible <bruno@clisp.org>
parents: 14186
diff changeset
77 AM_CONDITIONAL([GL_GENERATE_ERRNO_H], [test -n "$ERRNO_H"])
10425
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
78 gl_REPLACE_ERRNO_VALUE([EMULTIHOP])
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
79 gl_REPLACE_ERRNO_VALUE([ENOLINK])
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
80 gl_REPLACE_ERRNO_VALUE([EOVERFLOW])
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
81 ])
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
82
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
83 # Assuming $1 = EOVERFLOW.
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
84 # The EOVERFLOW errno value ought to be defined in <errno.h>, according to
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
85 # POSIX. But some systems (like OpenBSD 4.0 or AIX 3) don't define it, and
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
86 # some systems (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined.
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
87 # Check for the value of EOVERFLOW.
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
88 # Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE.
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
89 AC_DEFUN([gl_REPLACE_ERRNO_VALUE],
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
90 [
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
91 if test -n "$ERRNO_H"; then
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
92 AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [
11007
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 10899
diff changeset
93 AC_EGREP_CPP([yes],[
10425
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
94 #include <errno.h>
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
95 #ifdef ]$1[
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
96 yes
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
97 #endif
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
98 ],
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
99 [gl_cv_header_errno_h_]$1[=yes],
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
100 [gl_cv_header_errno_h_]$1[=no])
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
101 if test $gl_cv_header_errno_h_]$1[ = no; then
11007
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 10899
diff changeset
102 AC_EGREP_CPP([yes],[
10425
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
103 #define _XOPEN_SOURCE_EXTENDED 1
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
104 #include <errno.h>
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
105 #ifdef ]$1[
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
106 yes
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
107 #endif
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
108 ], [gl_cv_header_errno_h_]$1[=hidden])
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
109 if test $gl_cv_header_errno_h_]$1[ = hidden; then
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
110 dnl The macro exists but is hidden.
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
111 dnl Define it to the same value.
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
112 AC_COMPUTE_INT([gl_cv_header_errno_h_]$1, $1, [
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
113 #define _XOPEN_SOURCE_EXTENDED 1
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
114 #include <errno.h>
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
115 /* The following two lines are a workaround against an autoconf-2.52 bug. */
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
116 #include <stdio.h>
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
117 #include <stdlib.h>
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
118 ])
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
119 fi
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
120 fi
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
121 ])
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
122 case $gl_cv_header_errno_h_]$1[ in
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
123 yes | no)
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
124 ]$1[_HIDDEN=0; ]$1[_VALUE=
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
125 ;;
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
126 *)
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
127 ]$1[_HIDDEN=1; ]$1[_VALUE="$gl_cv_header_errno_h_]$1["
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
128 ;;
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
129 esac
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
130 AC_SUBST($1[_HIDDEN])
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
131 AC_SUBST($1[_VALUE])
44359c143462 New module 'errno'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
132 fi
10440
d4ba2e998855 Override <errno.h> also on Cygwin.
Bruno Haible <bruno@clisp.org>
parents: 10425
diff changeset
133 ])