summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2021-04-11 21:25:54 +0200
committerBruno Haible <bruno@clisp.org>2021-04-11 21:25:54 +0200
commit80a344e3237b878734295cbe696b7f1e4a8541f0 (patch)
tree25fae0a848e083103ee2a721f8846d7991370cbd /modules
parent8b857ed1ad1cbbf265d43016ee7ee93c7b7c6cb4 (diff)
downloadgnulib-80a344e3237b878734295cbe696b7f1e4a8541f0.tar.gz
Support several gnulib-tool invocations under the same configure.ac.
Reported by Reuben Thomas <rrt@sc3d.org> in <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00104.html>. This is done by defining the Gnulib module indicator variables per gnulib-tool invocation. So that a generated .h file is no longer influenced by the set of modules used in other gnulib-tool invocations. * gnulib-tool (func_compute_include_guard_prefix): Set module_indicator_prefix. (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use it to modify $(GNULIB_*) variable references in the Automake snippets. (func_emit_initmacro_start): Push macro definitions for GL_MACRO_PREFIX and GL_MODULE_INDICATOR_PREFIX. (func_emit_initmacro_end): Pop these macro definitions. * pygnulib/GLConfig.py (GLConfig.getIncludeGuardPrefix): New method. * pygnulib/GLEmiter.py (GLEmiter.initmacro_start): Push macro definitions for GL_MACRO_PREFIX and GL_MODULE_INDICATOR_PREFIX. (GLEmiter.initmacro_end): Pop these macro definitions. (GLEmiter.lib_Makefile_am, GLEmiter.tests_Makefile_am): Use the module indicator prefix to modify $(GNULIB_*) variable references in the Automake snippets. * m4/gnulib-common.m4 (gl_MODULE_INDICATOR_INIT_VARIABLE, gl_MODULE_INDICATOR_SET_VARIABLE): Use the value of GL_MODULE_INDICATOR_PREFIX. * m4/arpa_inet_h.m4: Use new idiom for header files that contain references to Gnulib module indicator variables: - Define the main macro through AC_DEFUN_ONCE. - Define a macro gl_*_H_REQUIRE_DEFAULTS that initializes the Gnulib module indicator variables (each prefixed with GL_MODULE_INDICATOR_PREFIX). - Invoke this macro in the gl_*_MODULE_INDICATOR macro. * m4/ctype.m4: Likewise. * m4/dirent_h.m4: Likewise. * m4/fcntl_h.m4: Likewise. * m4/fnmatch_h.m4: Likewise. * m4/glob_h.m4: Likewise. * m4/iconv_h.m4: Likewise. * m4/inttypes.m4: Likewise. * m4/langinfo_h.m4: Likewise. * m4/locale_h.m4: Likewise. * m4/malloc_h.m4: Likewise. * m4/math_h.m4: Likewise. * m4/monetary_h.m4: Likewise. * m4/netdb_h.m4: Likewise. * m4/poll_h.m4: Likewise. * m4/pthread_h.m4: Likewise. * m4/pty_h.m4: Likewise. * m4/sched_h.m4: Likewise. * m4/search_h.m4: Likewise. * m4/signal_h.m4: Likewise. * m4/spawn_h.m4: Likewise. * m4/stddef_h.m4: Likewise. * m4/stdio_h.m4: Likewise. * m4/stdlib_h.m4: Likewise. * m4/string_h.m4: Likewise. * m4/strings_h.m4: Likewise. * m4/sys_file_h.m4: Likewise. * m4/sys_ioctl_h.m4: Likewise. * m4/sys_random_h.m4: Likewise. * m4/sys_resource_h.m4: Likewise. * m4/sys_select_h.m4: Likewise. * m4/sys_socket_h.m4: Likewise. * m4/sys_stat_h.m4: Likewise. * m4/sys_time_h.m4: Likewise. * m4/sys_times_h.m4: Likewise. * m4/sys_types_h.m4: Likewise. * m4/sys_uio_h.m4: Likewise. * m4/sys_utsname_h.m4: Likewise. * m4/sys_wait_h.m4: Likewise. * m4/termios_h.m4: Likewise. * m4/threads.m4: Likewise. * m4/time_h.m4: Likewise. * m4/uchar.m4: Likewise. * m4/unistd_h.m4: Likewise. * m4/utime_h.m4: Likewise. * m4/wchar_h.m4: Likewise. * m4/wctype_h.m4: Likewise. * modules/arpa_inet (configure.ac): Invoke the macro gl_*_H_REQUIRE_DEFAULTS explicitly. * modules/ctype (configure.ac): Likewise. * modules/dirent (configure.ac): Likewise. * modules/fcntl-h (configure.ac): Likewise. * modules/fnmatch-h (configure.ac): Likewise. * modules/glob-h (configure.ac): Likewise. * modules/iconv-h (configure.ac): Likewise. * modules/inttypes-incomplete (configure.ac): Likewise. * modules/langinfo (configure.ac): Likewise. * modules/locale (configure.ac): Likewise. * modules/malloc-h (configure.ac): Likewise. * modules/math (configure.ac): Likewise. * modules/monetary (configure.ac): Likewise. * modules/netdb (configure.ac): Likewise. * modules/poll-h (configure.ac): Likewise. * modules/pthread-h (configure.ac): Likewise. * modules/pty (configure.ac): Likewise. * modules/sched (configure.ac): Likewise. * modules/search (configure.ac): Likewise. * modules/signal-h (configure.ac): Likewise. * modules/spawn (configure.ac): Likewise. * modules/stddef (configure.ac): Likewise. * modules/stdio (configure.ac): Likewise. * modules/stdlib (configure.ac): Likewise. * modules/string (configure.ac): Likewise. * modules/strings (configure.ac): Likewise. * modules/sys_file (configure.ac): Likewise. * modules/sys_ioctl (configure.ac): Likewise. * modules/sys_random (configure.ac): Likewise. * modules/sys_resource (configure.ac): Likewise. * modules/sys_select (configure.ac): Likewise. * modules/sys_socket (configure.ac): Likewise. * modules/sys_stat (configure.ac): Likewise. * modules/sys_time (configure.ac): Likewise. * modules/sys_times (configure.ac): Likewise. * modules/sys_types (configure.ac): Likewise. * modules/sys_uio (configure.ac): Likewise. * modules/sys_utsname (configure.ac): Likewise. * modules/sys_wait (configure.ac): Likewise. * modules/termios (configure.ac): Likewise. * modules/threads-h (configure.ac): Likewise. * modules/time (configure.ac): Likewise. * modules/uchar (configure.ac): Likewise. * modules/unistd (configure.ac): Likewise. * modules/utime-h (configure.ac): Likewise. * modules/wchar (configure.ac): Likewise. * modules/wctype-h (configure.ac): Likewise. * m4/af_alg.m4: Update after a macro name changed. * m4/ctime.m4: Likewise. * m4/explicit_bzero.m4: Likewise. * m4/ffs.m4: Likewise. * m4/ffsl.m4: Likewise. * m4/ffsll.m4: Likewise. * m4/flock.m4: Likewise. * m4/fstat.m4: Likewise. * m4/getaddrinfo.m4: Likewise. * m4/getdomainname.m4: Likewise. * m4/gettimeofday.m4: Likewise. * m4/hostent.m4: Likewise. * m4/ioctl.m4: Likewise. * m4/localtime.m4: Likewise. * m4/mbslen.m4: Likewise. * m4/memchr.m4: Likewise. * m4/memmem.m4: Likewise. * m4/mempcpy.m4: Likewise. * m4/memrchr.m4: Likewise. * m4/mktime.m4: Likewise. * m4/nanosleep.m4: Likewise. * m4/passfd.m4: Likewise. * m4/pselect.m4: Likewise. * m4/rawmemchr.m4: Likewise. * m4/select.m4: Likewise. * m4/servent.m4: Likewise. * m4/sigabbrev_np.m4: Likewise. * m4/sigdescr_np.m4: Likewise. * m4/sockpfaf.m4: Likewise. * m4/stat.m4: Likewise. * m4/stpcpy.m4: Likewise. * m4/stpncpy.m4: Likewise. * m4/strcase.m4: Likewise. * m4/strcasestr.m4: Likewise. * m4/strchrnul.m4: Likewise. * m4/strdup.m4: Likewise. * m4/strerror.m4: Likewise. * m4/strerror_r.m4: Likewise. * m4/strerrorname_np.m4: Likewise. * m4/strftime-fixes.m4: Likewise. * m4/strncat.m4: Likewise. * m4/strndup.m4: Likewise. * m4/strnlen.m4: Likewise. * m4/strpbrk.m4: Likewise. * m4/strptime.m4: Likewise. * m4/strsep.m4: Likewise. * m4/strsignal.m4: Likewise. * m4/strstr.m4: Likewise. * m4/strtok_r.m4: Likewise. * m4/strverscmp.m4: Likewise. * m4/time_r.m4: Likewise. * m4/time_rz.m4: Likewise. * m4/timegm.m4: Likewise. * m4/timespec_get.m4: Likewise. * m4/tzset.m4: Likewise. * modules/accept (configure.ac): Likewise. * modules/bind (configure.ac): Likewise. * modules/connect (configure.ac): Likewise. * modules/flock (configure.ac): Likewise. * modules/getpeername (configure.ac): Likewise. * modules/getsockname (configure.ac): Likewise. * modules/getsockopt (configure.ac): Likewise. * modules/listen (configure.ac): Likewise. * modules/recv (configure.ac): Likewise. * modules/recvfrom (configure.ac): Likewise. * modules/send (configure.ac): Likewise. * modules/sendto (configure.ac): Likewise. * modules/setsockopt (configure.ac): Likewise. * modules/shutdown (configure.ac): Likewise. * modules/socket (configure.ac): Likewise. Use the gl_*_H_REQUIRE_DEFAULTS macros. * modules/nonblocking (configure.ac): Use the gl_*_H_REQUIRE_DEFAULTS and gl_MODULE_INDICATOR_INIT_VARIABLE macros. * modules/sigpipe (configure.ac): Likewise. * modules/windows-stat-override (configure.ac): Likewise. * m4/nonblocking.m4: Update a comment. * m4/sigpipe.m4: Likewise.
Diffstat (limited to 'modules')
-rw-r--r--modules/accept2
-rw-r--r--modules/arpa_inet3
-rw-r--r--modules/bind2
-rw-r--r--modules/connect2
-rw-r--r--modules/ctype1
-rw-r--r--modules/dirent1
-rw-r--r--modules/fcntl-h1
-rw-r--r--modules/flock2
-rw-r--r--modules/fnmatch-h1
-rw-r--r--modules/getpeername2
-rw-r--r--modules/getsockname2
-rw-r--r--modules/getsockopt2
-rw-r--r--modules/glob-h1
-rw-r--r--modules/iconv-h1
-rw-r--r--modules/inttypes-incomplete1
-rw-r--r--modules/langinfo1
-rw-r--r--modules/listen2
-rw-r--r--modules/locale1
-rw-r--r--modules/malloc-h1
-rw-r--r--modules/math1
-rw-r--r--modules/monetary1
-rw-r--r--modules/netdb3
-rw-r--r--modules/nonblocking8
-rw-r--r--modules/poll-h1
-rw-r--r--modules/pthread-h1
-rw-r--r--modules/pty1
-rw-r--r--modules/recv2
-rw-r--r--modules/recvfrom2
-rw-r--r--modules/sched1
-rw-r--r--modules/search1
-rw-r--r--modules/send2
-rw-r--r--modules/sendto2
-rw-r--r--modules/setsockopt2
-rw-r--r--modules/shutdown2
-rw-r--r--modules/signal-h1
-rw-r--r--modules/sigpipe12
-rw-r--r--modules/socket6
-rw-r--r--modules/spawn1
-rw-r--r--modules/stddef1
-rw-r--r--modules/stdio1
-rw-r--r--modules/stdlib1
-rw-r--r--modules/string3
-rw-r--r--modules/strings3
-rw-r--r--modules/sys_file3
-rw-r--r--modules/sys_ioctl1
-rw-r--r--modules/sys_random3
-rw-r--r--modules/sys_resource3
-rw-r--r--modules/sys_select3
-rw-r--r--modules/sys_socket3
-rw-r--r--modules/sys_stat3
-rw-r--r--modules/sys_time3
-rw-r--r--modules/sys_times1
-rw-r--r--modules/sys_types1
-rw-r--r--modules/sys_uio3
-rw-r--r--modules/sys_utsname1
-rw-r--r--modules/sys_wait1
-rw-r--r--modules/termios1
-rw-r--r--modules/threads-h3
-rw-r--r--modules/time3
-rw-r--r--modules/uchar1
-rw-r--r--modules/unistd1
-rw-r--r--modules/utime-h1
-rw-r--r--modules/wchar1
-rw-r--r--modules/wctype-h1
-rw-r--r--modules/windows-stat-override4
65 files changed, 90 insertions, 43 deletions
diff --git a/modules/accept b/modules/accept
index b997566d57..d95c8295f7 100644
--- a/modules/accept
+++ b/modules/accept
@@ -13,7 +13,7 @@ errno [test "$ac_cv_header_winsock2_h" = yes]
msvc-nothrow [test "$ac_cv_header_winsock2_h" = yes]
configure.ac:
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+AC_REQUIRE([gl_SYS_SOCKET_H])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([accept])
fi
diff --git a/modules/arpa_inet b/modules/arpa_inet
index 317bf8d7ce..7e630427eb 100644
--- a/modules/arpa_inet
+++ b/modules/arpa_inet
@@ -15,7 +15,8 @@ snippet/warn-on-use
sys_socket
configure.ac:
-gl_HEADER_ARPA_INET
+gl_ARPA_INET_H
+gl_ARPA_INET_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
Makefile.am:
diff --git a/modules/bind b/modules/bind
index e46bd267a7..bd0ef9d649 100644
--- a/modules/bind
+++ b/modules/bind
@@ -12,7 +12,7 @@ errno [test "$ac_cv_header_winsock2_h" = yes]
msvc-nothrow [test "$ac_cv_header_winsock2_h" = yes]
configure.ac:
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+AC_REQUIRE([gl_SYS_SOCKET_H])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([bind])
fi
diff --git a/modules/connect b/modules/connect
index c77632ca61..91e1534c43 100644
--- a/modules/connect
+++ b/modules/connect
@@ -12,7 +12,7 @@ errno [test "$ac_cv_header_winsock2_h" = yes]
msvc-nothrow [test "$ac_cv_header_winsock2_h" = yes]
configure.ac:
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+AC_REQUIRE([gl_SYS_SOCKET_H])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([connect])
fi
diff --git a/modules/ctype b/modules/ctype
index 36a1760f20..0196dfadf6 100644
--- a/modules/ctype
+++ b/modules/ctype
@@ -13,6 +13,7 @@ snippet/warn-on-use
configure.ac:
gl_CTYPE_H
+gl_CTYPE_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += ctype.h
diff --git a/modules/dirent b/modules/dirent
index 08a6326cf1..80e3843ce4 100644
--- a/modules/dirent
+++ b/modules/dirent
@@ -15,6 +15,7 @@ snippet/warn-on-use
configure.ac:
gl_DIRENT_H
+gl_DIRENT_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += dirent.h
diff --git a/modules/fcntl-h b/modules/fcntl-h
index 429c283ae4..2277789d93 100644
--- a/modules/fcntl-h
+++ b/modules/fcntl-h
@@ -18,6 +18,7 @@ unistd
configure.ac:
gl_FCNTL_H
+gl_FCNTL_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += fcntl.h
diff --git a/modules/flock b/modules/flock
index 73d27c6221..f45f616370 100644
--- a/modules/flock
+++ b/modules/flock
@@ -15,7 +15,7 @@ if test $HAVE_FLOCK = 0; then
AC_LIBOBJ([flock])
gl_PREREQ_FLOCK
fi
-gl_HEADER_SYS_FILE_MODULE_INDICATOR([flock])
+gl_SYS_FILE_MODULE_INDICATOR([flock])
Makefile.am:
diff --git a/modules/fnmatch-h b/modules/fnmatch-h
index 31832d40ed..43800764c5 100644
--- a/modules/fnmatch-h
+++ b/modules/fnmatch-h
@@ -14,6 +14,7 @@ snippet/warn-on-use
configure.ac:
gl_FNMATCH_H
+gl_FNMATCH_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += $(FNMATCH_H)
diff --git a/modules/getpeername b/modules/getpeername
index 53f077b735..c03e3244fa 100644
--- a/modules/getpeername
+++ b/modules/getpeername
@@ -14,7 +14,7 @@ errno [test "$ac_cv_header_winsock2_h" = yes]
msvc-nothrow [test "$ac_cv_header_winsock2_h" = yes]
configure.ac:
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+AC_REQUIRE([gl_SYS_SOCKET_H])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([getpeername])
fi
diff --git a/modules/getsockname b/modules/getsockname
index 8a8ffe0bde..7bb278be8b 100644
--- a/modules/getsockname
+++ b/modules/getsockname
@@ -14,7 +14,7 @@ errno [test "$ac_cv_header_winsock2_h" = yes]
msvc-nothrow [test "$ac_cv_header_winsock2_h" = yes]
configure.ac:
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+AC_REQUIRE([gl_SYS_SOCKET_H])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([getsockname])
fi
diff --git a/modules/getsockopt b/modules/getsockopt
index adb4b87b2f..d5d7310812 100644
--- a/modules/getsockopt
+++ b/modules/getsockopt
@@ -14,7 +14,7 @@ errno [test "$ac_cv_header_winsock2_h" = yes]
msvc-nothrow [test "$ac_cv_header_winsock2_h" = yes]
configure.ac:
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+AC_REQUIRE([gl_SYS_SOCKET_H])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([getsockopt])
fi
diff --git a/modules/glob-h b/modules/glob-h
index b490a73276..40df48f130 100644
--- a/modules/glob-h
+++ b/modules/glob-h
@@ -18,6 +18,7 @@ sys_stat
configure.ac:
gl_GLOB_H
+gl_GLOB_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += $(GLOB_H)
diff --git a/modules/iconv-h b/modules/iconv-h
index c5f353ad63..b7a6045270 100644
--- a/modules/iconv-h
+++ b/modules/iconv-h
@@ -13,6 +13,7 @@ snippet/warn-on-use
configure.ac:
gl_ICONV_H
+gl_ICONV_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += $(ICONV_H)
diff --git a/modules/inttypes-incomplete b/modules/inttypes-incomplete
index 3fd886f85a..0e73c90020 100644
--- a/modules/inttypes-incomplete
+++ b/modules/inttypes-incomplete
@@ -15,6 +15,7 @@ stdint
configure.ac:
gl_INTTYPES_INCOMPLETE
+gl_INTTYPES_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += inttypes.h
diff --git a/modules/langinfo b/modules/langinfo
index 6be975da36..0e4aa964ad 100644
--- a/modules/langinfo
+++ b/modules/langinfo
@@ -13,6 +13,7 @@ snippet/warn-on-use
configure.ac:
gl_LANGINFO_H
+gl_LANGINFO_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += langinfo.h
diff --git a/modules/listen b/modules/listen
index baaadc21ad..5f96dae9be 100644
--- a/modules/listen
+++ b/modules/listen
@@ -12,7 +12,7 @@ errno [test "$ac_cv_header_winsock2_h" = yes]
msvc-nothrow [test "$ac_cv_header_winsock2_h" = yes]
configure.ac:
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+AC_REQUIRE([gl_SYS_SOCKET_H])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([listen])
fi
diff --git a/modules/locale b/modules/locale
index cd045c3781..b2773c8a19 100644
--- a/modules/locale
+++ b/modules/locale
@@ -15,6 +15,7 @@ stddef
configure.ac:
gl_LOCALE_H
+gl_LOCALE_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += locale.h
diff --git a/modules/malloc-h b/modules/malloc-h
index 115b870642..f79fa3ed82 100644
--- a/modules/malloc-h
+++ b/modules/malloc-h
@@ -12,6 +12,7 @@ snippet/warn-on-use
configure.ac:
gl_MALLOC_H
+gl_MALLOC_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += malloc.h
diff --git a/modules/math b/modules/math
index aa46293737..3041609125 100644
--- a/modules/math
+++ b/modules/math
@@ -16,6 +16,7 @@ float
configure.ac:
gl_MATH_H
+gl_MATH_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += math.h
diff --git a/modules/monetary b/modules/monetary
index 8afe1d811e..451323b6ac 100644
--- a/modules/monetary
+++ b/modules/monetary
@@ -13,6 +13,7 @@ snippet/warn-on-use
configure.ac:
gl_MONETARY_H
+gl_MONETARY_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += $(MONETARY_H)
diff --git a/modules/netdb b/modules/netdb
index 89408fa919..8c589df669 100644
--- a/modules/netdb
+++ b/modules/netdb
@@ -13,7 +13,8 @@ snippet/warn-on-use
sys_socket
configure.ac:
-gl_HEADER_NETDB
+gl_NETDB_H
+gl_NETDB_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += netdb.h
diff --git a/modules/nonblocking b/modules/nonblocking
index bc89371928..b4ddb78f81 100644
--- a/modules/nonblocking
+++ b/modules/nonblocking
@@ -24,12 +24,12 @@ gl_FCNTL_MODULE_INDICATOR([nonblocking])
dnl Define the C macro GNULIB_NONBLOCKING to 1.
gl_MODULE_INDICATOR([nonblocking])
dnl Define the substituted variable GNULIB_STDIO_H_NONBLOCKING to 1.
-AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+gl_STDIO_H_REQUIRE_DEFAULTS
AC_REQUIRE([gl_ASM_SYMBOL_PREFIX])
-GNULIB_STDIO_H_NONBLOCKING=1
+gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STDIO_H_NONBLOCKING], [1])
dnl Define the substituted variable GNULIB_UNISTD_H_NONBLOCKING to 1.
-AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
-GNULIB_UNISTD_H_NONBLOCKING=1
+gl_UNISTD_H_REQUIRE_DEFAULTS
+gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_NONBLOCKING], [1])
Makefile.am:
lib_SOURCES += nonblocking.c
diff --git a/modules/poll-h b/modules/poll-h
index 3c68758991..998607dc38 100644
--- a/modules/poll-h
+++ b/modules/poll-h
@@ -14,6 +14,7 @@ snippet/warn-on-use
configure.ac:
gl_POLL_H
+gl_POLL_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += poll.h
diff --git a/modules/pthread-h b/modules/pthread-h
index 3fe5527658..dec17389e6 100644
--- a/modules/pthread-h
+++ b/modules/pthread-h
@@ -21,6 +21,7 @@ gl_ANYTHREADLIB_EARLY
configure.ac:
gl_PTHREAD_H
+gl_PTHREAD_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += pthread.h
diff --git a/modules/pty b/modules/pty
index d523d142ca..ae0790089c 100644
--- a/modules/pty
+++ b/modules/pty
@@ -12,6 +12,7 @@ snippet/warn-on-use
configure.ac:
gl_PTY_H
+gl_PTY_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += pty.h
diff --git a/modules/recv b/modules/recv
index b47d8f532f..6972de7b97 100644
--- a/modules/recv
+++ b/modules/recv
@@ -12,7 +12,7 @@ errno [test "$ac_cv_header_winsock2_h" = yes]
msvc-nothrow [test "$ac_cv_header_winsock2_h" = yes]
configure.ac:
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+AC_REQUIRE([gl_SYS_SOCKET_H])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([recv])
fi
diff --git a/modules/recvfrom b/modules/recvfrom
index 590f6fecb8..afc3961b39 100644
--- a/modules/recvfrom
+++ b/modules/recvfrom
@@ -14,7 +14,7 @@ getpeername [test "$ac_cv_header_winsock2_h" = yes]
msvc-nothrow [test "$ac_cv_header_winsock2_h" = yes]
configure.ac:
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+AC_REQUIRE([gl_SYS_SOCKET_H])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([recvfrom])
fi
diff --git a/modules/sched b/modules/sched
index 572c57b0c0..995dfb95e2 100644
--- a/modules/sched
+++ b/modules/sched
@@ -13,6 +13,7 @@ snippet/warn-on-use
configure.ac:
gl_SCHED_H
+gl_SCHED_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += sched.h
diff --git a/modules/search b/modules/search
index 58ca086e72..364107485b 100644
--- a/modules/search
+++ b/modules/search
@@ -13,6 +13,7 @@ snippet/warn-on-use
configure.ac:
gl_SEARCH_H
+gl_SEARCH_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += search.h
diff --git a/modules/send b/modules/send
index 5e115c3f85..e6e63f7c1d 100644
--- a/modules/send
+++ b/modules/send
@@ -12,7 +12,7 @@ errno [test "$ac_cv_header_winsock2_h" = yes]
msvc-nothrow [test "$ac_cv_header_winsock2_h" = yes]
configure.ac:
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+AC_REQUIRE([gl_SYS_SOCKET_H])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([send])
fi
diff --git a/modules/sendto b/modules/sendto
index 924818e313..b78ed8c760 100644
--- a/modules/sendto
+++ b/modules/sendto
@@ -12,7 +12,7 @@ errno [test "$ac_cv_header_winsock2_h" = yes]
msvc-nothrow [test "$ac_cv_header_winsock2_h" = yes]
configure.ac:
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+AC_REQUIRE([gl_SYS_SOCKET_H])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([sendto])
fi
diff --git a/modules/setsockopt b/modules/setsockopt
index bfe8acdae9..63c02d336a 100644
--- a/modules/setsockopt
+++ b/modules/setsockopt
@@ -13,7 +13,7 @@ errno [test "$ac_cv_header_winsock2_h" = yes]
msvc-nothrow [test "$ac_cv_header_winsock2_h" = yes]
configure.ac:
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+AC_REQUIRE([gl_SYS_SOCKET_H])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([setsockopt])
fi
diff --git a/modules/shutdown b/modules/shutdown
index 64f3dc397b..e34892358e 100644
--- a/modules/shutdown
+++ b/modules/shutdown
@@ -12,7 +12,7 @@ errno [test "$ac_cv_header_winsock2_h" = yes]
msvc-nothrow [test "$ac_cv_header_winsock2_h" = yes]
configure.ac:
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+AC_REQUIRE([gl_SYS_SOCKET_H])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([shutdown])
fi
diff --git a/modules/signal-h b/modules/signal-h
index 2f38e9bf7d..cca349d7c1 100644
--- a/modules/signal-h
+++ b/modules/signal-h
@@ -15,6 +15,7 @@ extensions
configure.ac:
gl_SIGNAL_H
+gl_SIGNAL_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += signal.h
diff --git a/modules/sigpipe b/modules/sigpipe
index 32214f9b13..2cb22d5c58 100644
--- a/modules/sigpipe
+++ b/modules/sigpipe
@@ -24,15 +24,15 @@ gl_SIGNAL_SIGPIPE
dnl Define the C macro GNULIB_SIGPIPE to 1.
gl_MODULE_INDICATOR([sigpipe])
dnl Define the substituted variable GNULIB_SIGNAL_H_SIGPIPE to 1.
-AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
-GNULIB_SIGNAL_H_SIGPIPE=1
+gl_SIGNAL_H_REQUIRE_DEFAULTS
+gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGNAL_H_SIGPIPE], [1])
dnl Define the substituted variable GNULIB_STDIO_H_SIGPIPE to 1.
-AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+gl_STDIO_H_REQUIRE_DEFAULTS
AC_REQUIRE([gl_ASM_SYMBOL_PREFIX])
-GNULIB_STDIO_H_SIGPIPE=1
+gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STDIO_H_SIGPIPE], [1])
dnl Define the substituted variable GNULIB_UNISTD_H_SIGPIPE to 1.
-AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
-GNULIB_UNISTD_H_SIGPIPE=1
+gl_UNISTD_H_REQUIRE_DEFAULTS
+gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_SIGPIPE], [1])
Makefile.am:
diff --git a/modules/socket b/modules/socket
index 49625494ab..b1c73bc860 100644
--- a/modules/socket
+++ b/modules/socket
@@ -13,14 +13,14 @@ sockets [test "$ac_cv_header_winsock2_h" = yes]
msvc-nothrow [test "$ac_cv_header_winsock2_h" = yes]
configure.ac:
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+AC_REQUIRE([gl_SYS_SOCKET_H])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([socket])
fi
# When this module is used, sockets may actually occur as file descriptors,
# hence it is worth warning if the modules 'close' and 'ioctl' are not used.
-m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])])
-m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])])
+m4_ifdef([gl_UNISTD_H_DEFAULTS], [gl_UNISTD_H_REQUIRE_DEFAULTS])
+m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [gl_SYS_IOCTL_H_REQUIRE_DEFAULTS])
AC_REQUIRE([gl_PREREQ_SYS_H_WINSOCK2])
if test "$ac_cv_header_winsock2_h" = yes; then
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
diff --git a/modules/spawn b/modules/spawn
index 1828d37bf4..312c5ec9bd 100644
--- a/modules/spawn
+++ b/modules/spawn
@@ -16,6 +16,7 @@ snippet/warn-on-use
configure.ac:
gl_SPAWN_H
+gl_SPAWN_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += spawn.h
diff --git a/modules/stddef b/modules/stddef
index 91d6bac662..c17523cac8 100644
--- a/modules/stddef
+++ b/modules/stddef
@@ -12,6 +12,7 @@ extensions
configure.ac:
gl_STDDEF_H
+gl_STDDEF_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += $(STDDEF_H)
diff --git a/modules/stdio b/modules/stdio
index 4932327e32..18c24d71d1 100644
--- a/modules/stdio
+++ b/modules/stdio
@@ -17,6 +17,7 @@ sys_types
configure.ac:
gl_STDIO_H
+gl_STDIO_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += stdio.h
diff --git a/modules/stdlib b/modules/stdlib
index ad04ede819..47f3af752a 100644
--- a/modules/stdlib
+++ b/modules/stdlib
@@ -16,6 +16,7 @@ unistd
configure.ac:
gl_STDLIB_H
+gl_STDLIB_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += stdlib.h
diff --git a/modules/string b/modules/string
index 6c87229e4c..e1d9980bbd 100644
--- a/modules/string
+++ b/modules/string
@@ -15,7 +15,8 @@ snippet/warn-on-use
stddef
configure.ac:
-gl_HEADER_STRING_H
+gl_STRING_H
+gl_STRING_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += string.h
diff --git a/modules/strings b/modules/strings
index 919b49de4f..d705ac9e5f 100644
--- a/modules/strings
+++ b/modules/strings
@@ -13,7 +13,8 @@ snippet/warn-on-use
sys_types
configure.ac:
-gl_HEADER_STRINGS_H
+gl_STRINGS_H
+gl_STRINGS_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += strings.h
diff --git a/modules/sys_file b/modules/sys_file
index 509c1da099..a5d98013e4 100644
--- a/modules/sys_file
+++ b/modules/sys_file
@@ -10,7 +10,8 @@ include_next
snippet/warn-on-use
configure.ac:
-gl_HEADER_SYS_FILE_H
+gl_SYS_FILE_H
+gl_SYS_FILE_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
Makefile.am:
diff --git a/modules/sys_ioctl b/modules/sys_ioctl
index a008f212ac..06b85c7f47 100644
--- a/modules/sys_ioctl
+++ b/modules/sys_ioctl
@@ -13,6 +13,7 @@ unistd
configure.ac:
gl_SYS_IOCTL_H
+gl_SYS_IOCTL_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
Makefile.am:
diff --git a/modules/sys_random b/modules/sys_random
index b88507bb92..5044baa4ec 100644
--- a/modules/sys_random
+++ b/modules/sys_random
@@ -12,7 +12,8 @@ snippet/c++defs
snippet/warn-on-use
configure.ac:
-gl_HEADER_SYS_RANDOM
+gl_SYS_RANDOM_H
+gl_SYS_RANDOM_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
Makefile.am:
diff --git a/modules/sys_resource b/modules/sys_resource
index ab35ddd16a..83caef5028 100644
--- a/modules/sys_resource
+++ b/modules/sys_resource
@@ -13,7 +13,8 @@ snippet/warn-on-use
sys_time
configure.ac:
-gl_HEADER_SYS_RESOURCE
+gl_SYS_RESOURCE_H
+gl_SYS_RESOURCE_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
Makefile.am:
diff --git a/modules/sys_select b/modules/sys_select
index ab062a0990..89f07b26ee 100644
--- a/modules/sys_select
+++ b/modules/sys_select
@@ -14,7 +14,8 @@ snippet/warn-on-use
sys_time
configure.ac:
-AC_REQUIRE([gl_HEADER_SYS_SELECT])
+gl_SYS_SELECT_H
+gl_SYS_SELECT_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
Makefile.am:
diff --git a/modules/sys_socket b/modules/sys_socket
index 3bb0bfc2b3..72a6a4a7ee 100644
--- a/modules/sys_socket
+++ b/modules/sys_socket
@@ -20,7 +20,8 @@ stdalign
sys_uio
configure.ac:
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+gl_SYS_SOCKET_H
+gl_SYS_SOCKET_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
Makefile.am:
diff --git a/modules/sys_stat b/modules/sys_stat
index 26971975e4..36bc9567f8 100644
--- a/modules/sys_stat
+++ b/modules/sys_stat
@@ -16,7 +16,8 @@ sys_types
time
configure.ac:
-gl_HEADER_SYS_STAT_H
+gl_SYS_STAT_H
+gl_SYS_STAT_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
Makefile.am:
diff --git a/modules/sys_time b/modules/sys_time
index cfb7ddd2d9..b24e68e6c5 100644
--- a/modules/sys_time
+++ b/modules/sys_time
@@ -13,7 +13,8 @@ snippet/c++defs
snippet/warn-on-use
configure.ac:
-gl_HEADER_SYS_TIME_H
+gl_SYS_TIME_H
+gl_SYS_TIME_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
Makefile.am:
diff --git a/modules/sys_times b/modules/sys_times
index 66a36f135d..96c16e475f 100644
--- a/modules/sys_times
+++ b/modules/sys_times
@@ -12,6 +12,7 @@ snippet/warn-on-use
configure.ac:
gl_SYS_TIMES_H
+gl_SYS_TIMES_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
Makefile.am:
diff --git a/modules/sys_types b/modules/sys_types
index c00862c9b1..38823d890d 100644
--- a/modules/sys_types
+++ b/modules/sys_types
@@ -13,6 +13,7 @@ ssize_t
configure.ac:
gl_SYS_TYPES_H
+gl_SYS_TYPES_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
Makefile.am:
diff --git a/modules/sys_uio b/modules/sys_uio
index 45b15eee6c..460e0ebebb 100644
--- a/modules/sys_uio
+++ b/modules/sys_uio
@@ -11,7 +11,8 @@ ssize_t
sys_types
configure.ac:
-gl_HEADER_SYS_UIO
+gl_SYS_UIO_H
+gl_SYS_UIO_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
Makefile.am:
diff --git a/modules/sys_utsname b/modules/sys_utsname
index befd0d3457..05f3b5cc8f 100644
--- a/modules/sys_utsname
+++ b/modules/sys_utsname
@@ -12,6 +12,7 @@ snippet/warn-on-use
configure.ac:
gl_SYS_UTSNAME_H
+gl_SYS_UTSNAME_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
Makefile.am:
diff --git a/modules/sys_wait b/modules/sys_wait
index 73ce50b6e7..0ae9b4f929 100644
--- a/modules/sys_wait
+++ b/modules/sys_wait
@@ -13,6 +13,7 @@ snippet/warn-on-use
configure.ac:
gl_SYS_WAIT_H
+gl_SYS_WAIT_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
Makefile.am:
diff --git a/modules/termios b/modules/termios
index 8cb73e4174..59cd4489ac 100644
--- a/modules/termios
+++ b/modules/termios
@@ -13,6 +13,7 @@ snippet/warn-on-use
configure.ac:
gl_TERMIOS_H
+gl_TERMIOS_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += termios.h
diff --git a/modules/threads-h b/modules/threads-h
index 927a057967..37cc6d8db1 100644
--- a/modules/threads-h
+++ b/modules/threads-h
@@ -29,7 +29,8 @@ configure.ac-early:
gl_ANYTHREADLIB_EARLY
configure.ac:
-AC_REQUIRE([gl_THREADS_H])
+gl_THREADS_H
+gl_THREADS_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += threads.h
diff --git a/modules/time b/modules/time
index c0fb27dc4c..236b5ea25e 100644
--- a/modules/time
+++ b/modules/time
@@ -14,7 +14,8 @@ snippet/warn-on-use
stddef
configure.ac:
-gl_HEADER_TIME_H
+gl_TIME_H
+gl_TIME_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += time.h
diff --git a/modules/uchar b/modules/uchar
index e449dd9613..a65fce2afa 100644
--- a/modules/uchar
+++ b/modules/uchar
@@ -14,6 +14,7 @@ wchar
configure.ac:
gl_UCHAR_H
+gl_UCHAR_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += uchar.h
diff --git a/modules/unistd b/modules/unistd
index 442678b88c..281924f02d 100644
--- a/modules/unistd
+++ b/modules/unistd
@@ -20,6 +20,7 @@ sys_types
configure.ac:
gl_UNISTD_H
+gl_UNISTD_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += unistd.h
diff --git a/modules/utime-h b/modules/utime-h
index 489eab935f..beb5159cb1 100644
--- a/modules/utime-h
+++ b/modules/utime-h
@@ -13,6 +13,7 @@ snippet/warn-on-use
configure.ac:
gl_UTIME_H
+gl_UTIME_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += utime.h
diff --git a/modules/wchar b/modules/wchar
index 7ec1c02b35..d4e6d6933b 100644
--- a/modules/wchar
+++ b/modules/wchar
@@ -17,6 +17,7 @@ stddef
configure.ac:
gl_WCHAR_H
+gl_WCHAR_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += wchar.h
diff --git a/modules/wctype-h b/modules/wctype-h
index 8da4b8f324..24b5fe68fe 100644
--- a/modules/wctype-h
+++ b/modules/wctype-h
@@ -15,6 +15,7 @@ snippet/warn-on-use
configure.ac:
gl_WCTYPE_H
+gl_WCTYPE_H_REQUIRE_DEFAULTS
Makefile.am:
BUILT_SOURCES += wctype.h
diff --git a/modules/windows-stat-override b/modules/windows-stat-override
index 027fa92760..d8fb4eb032 100644
--- a/modules/windows-stat-override
+++ b/modules/windows-stat-override
@@ -12,10 +12,10 @@ Depends-on:
sys_stat
configure.ac:
-AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+gl_SYS_STAT_H_REQUIRE_DEFAULTS
AC_REQUIRE([AC_CANONICAL_HOST])
case "$host_os" in
- mingw*) GNULIB_OVERRIDES_STRUCT_STAT=1 ;;
+ mingw*) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OVERRIDES_STRUCT_STAT], [1]) ;;
esac
Makefile.am: