]> Savannah Git Hosting - gnulib.git/commitdiff
Move .h file names out of the *.m4 files.
authorBruno Haible <bruno@clisp.org>
Wed, 15 Dec 2021 18:18:25 +0000 (19:18 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 15 Dec 2021 18:18:25 +0000 (19:18 +0100)
This is useful because Autoconf macros defined in *.m4 files can be
AC_REQUIREd. In the configure file, they are then expanded before
gl_INIT, i.e. at a place where it is not known whether they are required
for the lib/ or for the tests/ directory (or both).

* m4/gnulib-common.m4 (gl_CONDITIONAL_HEADER): New macro.
* m4/alloca.m4 (gl_FUNC_ALLOCA): Set GL_GENERATE_ALLOCA_H instead of
ALLOCA_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/alloca-opt (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/argz.m4 (gl_FUNC_ARGZ): Set GL_GENERATE_ARGZ_H instead of ARGZ_H.
Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/argz (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/assert_h.m4 (gl_ASSERT_H): Set GL_GENERATE_ASSERT_H instead of
ASSERT_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/assert-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/byteswap.m4 (gl_BYTESWAP): Set GL_GENERATE_BYTESWAP_H instead of
BYTESWAP_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/byteswap (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/errno_h.m4 (gl_HEADER_ERRNO_H): Set GL_GENERATE_ERRNO_H instead of
ERRNO_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
(gl_REPLACE_ERRNO_VALUE): Update.
* m4/perror.m4 (gl_FUNC_PERROR): Update.
* m4/strerror.m4 (gl_FUNC_STRERROR): Update.
* m4/strerror_r.m4 (gl_FUNC_STRERROR_R, gl_FUNC_STRERROR_R_WORKS):
Update.
* modules/errno (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/execinfo.m4 (gl_EXECINFO_H): Set GL_GENERATE_EXECINFO_H instead of
EXECINFO_H. Drop AC_SUBST and AM_CONDITIONAL invocations. Drop AC_LIBOBJ
invocation.
* modules/execinfo (configure.ac): Invoke gl_CONDITIONAL_HEADER and
AC_LIBOBJ.
* m4/float_h.m4 (gl_FLOAT_H): Set GL_GENERATE_FLOAT_H instead of
FLOAT_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/float (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/fnmatch_h.m4 (gl_FNMATCH_H, gl_REPLACE_FNMATCH_H): Set
GL_GENERATE_FNMATCH_H instead of FNMATCH_H. Drop AC_SUBST and
AM_CONDITIONAL invocations.
* modules/fnmatch-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* modules/fnmatch (configure.ac): Likewise.
* m4/getopt.m4 (gl_FUNC_GETOPT_POSIX, gl_GETOPT_SUBSTITUTE_HEADER): Set
GL_GENERATE_GETOPT_H instead of GETOPT_H. Set GL_GENERATE_GETOPT_CDEFS_H
instead of GETOPT_CDEFS_H. Drop AC_SUBST invocations.
* modules/getopt-posix (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/glob_h.m4 (gl_GLOB_H, gl_REPLACE_GLOB_H): Set GL_GENERATE_GLOB_H
instead of GLOB_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/glob-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* modules/glob (configure.ac): Likewise.
* m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS, gl_REPLACE_ICONV_H): Set
GL_GENERATE_ICONV_H instead of ICONV_H. Drop AC_SUBST and AM_CONDITIONAL
invocations.
(gl_ICONV_H): Update.
* modules/iconv-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* modules/iconv_open (configure.ac): Likewise.
* m4/ieee754-h.m4 (gl_IEEE754_H): Set GL_GENERATE_IEEE754_H instead of
IEEE754_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/ieee754-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/libgmp.m4 (gl_LIBGMP): Set GL_GENERATE_GMP_H instead of GMP_H. Drop
AC_SUBST invocation.
* modules/libgmp (configure.ac): Invoke gl_CONDITIONAL_HEADER.
(Makefile.am): Use GL_GENERATE_GMP_H.
* m4/libtextstyle-optional.m4 (gl_LIBTEXTSTYLE_OPTIONAL): Set
GL_GENERATE_TEXTSTYLE_H instead of TEXTSTYLE_H. Drop AC_SUBST and
AM_CONDITIONAL invocations.
* modules/libtextstyle-optional (configure.ac): Invoke
gl_CONDITIONAL_HEADER.
* m4/limits-h.m4 (gl_LIMITS_H, gl_REPLACE_LIMITS_H): Set
GL_GENERATE_LIMITS_H instead of LIMITS_H. Drop AC_SUBST and
AM_CONDITIONAL invocations.
* modules/limits-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/monetary_h.m4 (gl_MONETARY_H): Set GL_GENERATE_MONETARY_H instead
of MONETARY_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/monetary (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/net_if_h.m4 (gl_HEADER_NET_IF): Set GL_GENERATE_NET_IF_H instead of
NET_IF_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/net_if (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Set
GL_GENERATE_NETINET_IN_H instead of NETINET_IN_H. Drop AC_SUBST and
AM_CONDITIONAL invocations.
* modules/netinet_in (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/selinux-context-h.m4 (gl_HEADERS_SELINUX_CONTEXT_H): Set
GL_GENERATE_SELINUX_CONTEXT_H instead of SELINUX_CONTEXT_H. Drop
AC_SUBST and AM_CONDITIONAL invocations.
* m4/selinux-label-h.m4 (gl_HEADERS_SELINUX_LABEL_H): Set
GL_GENERATE_SELINUX_LABEL_H instead of SELINUX_LABEL_H. Drop AC_SUBST
and AM_CONDITIONAL invocations.
* modules/selinux-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/stdalign.m4 (gl_STDALIGN_H): Set GL_GENERATE_STDALIGN_H instead of
STDALIGN_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/stdalign (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/stdarg.m4 (gl_STDARG_H): Set GL_GENERATE_STDARG_H instead of
STDARG_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/stdarg (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/stdbool.m4 (gl_STDBOOL_H): Renamed from AM_STDBOOL_H. Set
GL_GENERATE_STDBOOL_H instead of STDBOOL_H. Drop AC_SUBST and
AM_CONDITIONAL invocations.
* m4/parse-datetime.m4 (gl_PARSE_DATETIME): Don't require AM_STDBOOL_H.
* modules/stdbool (configure.ac): Invoke gl_STDBOOL_H instead of
AM_STDBOOL_H. Invoke gl_CONDITIONAL_HEADER.
* m4/stddef_h.m4 (gl_STDDEF_H): Set GL_GENERATE_STDDEF_H instead of
STDDEF_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/stddef (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/stdint.m4 (gl_STDINT_H): Set GL_GENERATE_STDINT_H instead of
STDINT_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* m4/inttypes.m4 (gl_INTTYPES_PRI_SCN): Update.
* modules/stdint (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/stdnoreturn.m4 (gl_STDNORETURN_H): Set GL_GENERATE_STDNORETURN_H
instead of STDNORETURN_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/stdnoreturn (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/sys_socket_h.m4 (gl_SYS_SOCKET_H): Set GL_GENERATE_SYS_SOCKET_H
instead of SYS_SOCKET_H.
* m4/sysexits.m4 (gl_SYSEXITS): Set GL_GENERATE_SYSEXITS_H instead of
SYSEXITS_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/sysexits (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* modules/sigsegv (configure.ac): Set GL_GENERATE_SIGSEGV_H instead of
SIGSEGV_H. Drop AC_SUBST and AM_CONDITIONAL invocations. Invoke
gl_CONDITIONAL_HEADER.

65 files changed:
ChangeLog
m4/alloca.m4
m4/argz.m4
m4/assert_h.m4
m4/byteswap.m4
m4/errno_h.m4
m4/execinfo.m4
m4/float_h.m4
m4/fnmatch_h.m4
m4/getopt.m4
m4/glob_h.m4
m4/gnulib-common.m4
m4/iconv_h.m4
m4/ieee754-h.m4
m4/inttypes.m4
m4/libgmp.m4
m4/libtextstyle-optional.m4
m4/limits-h.m4
m4/monetary_h.m4
m4/net_if_h.m4
m4/netinet_in_h.m4
m4/parse-datetime.m4
m4/perror.m4
m4/selinux-context-h.m4
m4/selinux-label-h.m4
m4/stdalign.m4
m4/stdarg.m4
m4/stdbool.m4
m4/stddef_h.m4
m4/stdint.m4
m4/stdnoreturn.m4
m4/strerror.m4
m4/strerror_r.m4
m4/sys_socket_h.m4
m4/sysexits.m4
modules/alloca-opt
modules/argz
modules/assert-h
modules/byteswap
modules/errno
modules/execinfo
modules/float
modules/fnmatch
modules/fnmatch-h
modules/getopt-posix
modules/glob
modules/glob-h
modules/iconv-h
modules/iconv_open
modules/ieee754-h
modules/libgmp
modules/libtextstyle-optional
modules/limits-h
modules/monetary
modules/net_if
modules/netinet_in
modules/selinux-h
modules/sigsegv
modules/stdalign
modules/stdarg
modules/stdbool
modules/stddef
modules/stdint
modules/stdnoreturn
modules/sysexits

index 29296575b10dea0529645d1368436ac1f0549c66..193405c6a2f785a1c286ba5e195b5f95e8e1e55c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,122 @@
+2021-12-15  Bruno Haible  <bruno@clisp.org>
+
+       Move .h file names out of the *.m4 files.
+       This is useful because Autoconf macros defined in *.m4 files can be
+       AC_REQUIREd. In the configure file, they are then expanded before
+       gl_INIT, i.e. at a place where it is not known whether they are required
+       for the lib/ or for the tests/ directory (or both).
+       * m4/gnulib-common.m4 (gl_CONDITIONAL_HEADER): New macro.
+       * m4/alloca.m4 (gl_FUNC_ALLOCA): Set GL_GENERATE_ALLOCA_H instead of
+       ALLOCA_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
+       * modules/alloca-opt (configure.ac): Invoke gl_CONDITIONAL_HEADER.
+       * m4/argz.m4 (gl_FUNC_ARGZ): Set GL_GENERATE_ARGZ_H instead of ARGZ_H.
+       Drop AC_SUBST and AM_CONDITIONAL invocations.
+       * modules/argz (configure.ac): Invoke gl_CONDITIONAL_HEADER.
+       * m4/assert_h.m4 (gl_ASSERT_H): Set GL_GENERATE_ASSERT_H instead of
+       ASSERT_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
+       * modules/assert-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
+       * m4/byteswap.m4 (gl_BYTESWAP): Set GL_GENERATE_BYTESWAP_H instead of
+       BYTESWAP_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
+       * modules/byteswap (configure.ac): Invoke gl_CONDITIONAL_HEADER.
+       * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Set GL_GENERATE_ERRNO_H instead of
+       ERRNO_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
+       (gl_REPLACE_ERRNO_VALUE): Update.
+       * m4/perror.m4 (gl_FUNC_PERROR): Update.
+       * m4/strerror.m4 (gl_FUNC_STRERROR): Update.
+       * m4/strerror_r.m4 (gl_FUNC_STRERROR_R, gl_FUNC_STRERROR_R_WORKS):
+       Update.
+       * modules/errno (configure.ac): Invoke gl_CONDITIONAL_HEADER.
+       * m4/execinfo.m4 (gl_EXECINFO_H): Set GL_GENERATE_EXECINFO_H instead of
+       EXECINFO_H. Drop AC_SUBST and AM_CONDITIONAL invocations. Drop AC_LIBOBJ
+       invocation.
+       * modules/execinfo (configure.ac): Invoke gl_CONDITIONAL_HEADER and
+       AC_LIBOBJ.
+       * m4/float_h.m4 (gl_FLOAT_H): Set GL_GENERATE_FLOAT_H instead of
+       FLOAT_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
+       * modules/float (configure.ac): Invoke gl_CONDITIONAL_HEADER.
+       * m4/fnmatch_h.m4 (gl_FNMATCH_H, gl_REPLACE_FNMATCH_H): Set
+       GL_GENERATE_FNMATCH_H instead of FNMATCH_H. Drop AC_SUBST and
+       AM_CONDITIONAL invocations.
+       * modules/fnmatch-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
+       * modules/fnmatch (configure.ac): Likewise.
+       * m4/getopt.m4 (gl_FUNC_GETOPT_POSIX, gl_GETOPT_SUBSTITUTE_HEADER): Set
+       GL_GENERATE_GETOPT_H instead of GETOPT_H. Set GL_GENERATE_GETOPT_CDEFS_H
+       instead of GETOPT_CDEFS_H. Drop AC_SUBST invocations.
+       * modules/getopt-posix (configure.ac): Invoke gl_CONDITIONAL_HEADER.
+       * m4/glob_h.m4 (gl_GLOB_H, gl_REPLACE_GLOB_H): Set GL_GENERATE_GLOB_H
+       instead of GLOB_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
+       * modules/glob-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
+       * modules/glob (configure.ac): Likewise.
+       * m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS, gl_REPLACE_ICONV_H): Set
+       GL_GENERATE_ICONV_H instead of ICONV_H. Drop AC_SUBST and AM_CONDITIONAL
+       invocations.
+       (gl_ICONV_H): Update.
+       * modules/iconv-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
+       * modules/iconv_open (configure.ac): Likewise.
+       * m4/ieee754-h.m4 (gl_IEEE754_H): Set GL_GENERATE_IEEE754_H instead of
+       IEEE754_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
+       * modules/ieee754-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
+       * m4/libgmp.m4 (gl_LIBGMP): Set GL_GENERATE_GMP_H instead of GMP_H. Drop
+       AC_SUBST invocation.
+       * modules/libgmp (configure.ac): Invoke gl_CONDITIONAL_HEADER.
+       (Makefile.am): Use GL_GENERATE_GMP_H.
+       * m4/libtextstyle-optional.m4 (gl_LIBTEXTSTYLE_OPTIONAL): Set
+       GL_GENERATE_TEXTSTYLE_H instead of TEXTSTYLE_H. Drop AC_SUBST and
+       AM_CONDITIONAL invocations.
+       * modules/libtextstyle-optional (configure.ac): Invoke
+       gl_CONDITIONAL_HEADER.
+       * m4/limits-h.m4 (gl_LIMITS_H, gl_REPLACE_LIMITS_H): Set
+       GL_GENERATE_LIMITS_H instead of LIMITS_H. Drop AC_SUBST and
+       AM_CONDITIONAL invocations.
+       * modules/limits-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
+       * m4/monetary_h.m4 (gl_MONETARY_H): Set GL_GENERATE_MONETARY_H instead
+       of MONETARY_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
+       * modules/monetary (configure.ac): Invoke gl_CONDITIONAL_HEADER.
+       * m4/net_if_h.m4 (gl_HEADER_NET_IF): Set GL_GENERATE_NET_IF_H instead of
+       NET_IF_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
+       * modules/net_if (configure.ac): Invoke gl_CONDITIONAL_HEADER.
+       * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Set
+       GL_GENERATE_NETINET_IN_H instead of NETINET_IN_H. Drop AC_SUBST and
+       AM_CONDITIONAL invocations.
+       * modules/netinet_in (configure.ac): Invoke gl_CONDITIONAL_HEADER.
+       * m4/selinux-context-h.m4 (gl_HEADERS_SELINUX_CONTEXT_H): Set
+       GL_GENERATE_SELINUX_CONTEXT_H instead of SELINUX_CONTEXT_H. Drop
+       AC_SUBST and AM_CONDITIONAL invocations.
+       * m4/selinux-label-h.m4 (gl_HEADERS_SELINUX_LABEL_H): Set
+       GL_GENERATE_SELINUX_LABEL_H instead of SELINUX_LABEL_H. Drop AC_SUBST
+       and AM_CONDITIONAL invocations.
+       * modules/selinux-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
+       * m4/stdalign.m4 (gl_STDALIGN_H): Set GL_GENERATE_STDALIGN_H instead of
+       STDALIGN_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
+       * modules/stdalign (configure.ac): Invoke gl_CONDITIONAL_HEADER.
+       * m4/stdarg.m4 (gl_STDARG_H): Set GL_GENERATE_STDARG_H instead of
+       STDARG_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
+       * modules/stdarg (configure.ac): Invoke gl_CONDITIONAL_HEADER.
+       * m4/stdbool.m4 (gl_STDBOOL_H): Renamed from AM_STDBOOL_H. Set
+       GL_GENERATE_STDBOOL_H instead of STDBOOL_H. Drop AC_SUBST and
+       AM_CONDITIONAL invocations.
+       * m4/parse-datetime.m4 (gl_PARSE_DATETIME): Don't require AM_STDBOOL_H.
+       * modules/stdbool (configure.ac): Invoke gl_STDBOOL_H instead of
+       AM_STDBOOL_H. Invoke gl_CONDITIONAL_HEADER.
+       * m4/stddef_h.m4 (gl_STDDEF_H): Set GL_GENERATE_STDDEF_H instead of
+       STDDEF_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
+       * modules/stddef (configure.ac): Invoke gl_CONDITIONAL_HEADER.
+       * m4/stdint.m4 (gl_STDINT_H): Set GL_GENERATE_STDINT_H instead of
+       STDINT_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
+       * m4/inttypes.m4 (gl_INTTYPES_PRI_SCN): Update.
+       * modules/stdint (configure.ac): Invoke gl_CONDITIONAL_HEADER.
+       * m4/stdnoreturn.m4 (gl_STDNORETURN_H): Set GL_GENERATE_STDNORETURN_H
+       instead of STDNORETURN_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
+       * modules/stdnoreturn (configure.ac): Invoke gl_CONDITIONAL_HEADER.
+       * m4/sys_socket_h.m4 (gl_SYS_SOCKET_H): Set GL_GENERATE_SYS_SOCKET_H
+       instead of SYS_SOCKET_H.
+       * m4/sysexits.m4 (gl_SYSEXITS): Set GL_GENERATE_SYSEXITS_H instead of
+       SYSEXITS_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
+       * modules/sysexits (configure.ac): Invoke gl_CONDITIONAL_HEADER.
+       * modules/sigsegv (configure.ac): Set GL_GENERATE_SIGSEGV_H instead of
+       SIGSEGV_H. Drop AC_SUBST and AM_CONDITIONAL invocations. Invoke
+       gl_CONDITIONAL_HEADER.
+
 2021-12-15  Bruno Haible  <bruno@clisp.org>
 
        Fix creation of build directories with non-recursive-gnulib-prefix-hack.
index ba2f679d8e0dea36b83f221c336fee8ef95956e3..7e474aa681b8aa192ab22f8d6d65243414d84cb8 100644 (file)
@@ -1,4 +1,4 @@
-# alloca.m4 serial 20
+# alloca.m4 serial 21
 dnl Copyright (C) 2002-2004, 2006-2007, 2009-2021 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -26,17 +26,15 @@ AC_DEFUN([gl_FUNC_ALLOCA],
       AC_DEFINE([HAVE_ALLOCA], [1],
         [Define to 1 if you have 'alloca' after including <alloca.h>,
          a header that may be supplied by this distribution.])
-      ALLOCA_H=alloca.h
+      GL_GENERATE_ALLOCA_H=true
     else
       dnl alloca exists as a library function, i.e. it is slow and probably
       dnl a memory leak. Don't define HAVE_ALLOCA in this case.
-      ALLOCA_H=
+      GL_GENERATE_ALLOCA_H=false
     fi
   else
-    ALLOCA_H=alloca.h
+    GL_GENERATE_ALLOCA_H=true
   fi
-  AC_SUBST([ALLOCA_H])
-  AM_CONDITIONAL([GL_GENERATE_ALLOCA_H], [test -n "$ALLOCA_H"])
 
   if test $ac_cv_working_alloca_h = yes; then
     HAVE_ALLOCA_H=1
index d587bd8c4052f0f167fff1a9768b1a8f397777e6..3959d6eb2b7d81869ebf0f2acac332532630969d 100644 (file)
@@ -7,7 +7,7 @@
 # unlimited permission to copy and/or distribute it, with or without
 # modifications, as long as this notice is preserved.
 
-# serial 13 argz.m4
+# serial 14 argz.m4
 
 AC_DEFUN([gl_FUNC_ARGZ],
 [gl_PREREQ_ARGZ
@@ -27,8 +27,8 @@ AC_CHECK_TYPES([error_t],
 #  include <argz.h>
 #endif])
 
-ARGZ_H=
-AC_CHECK_FUNC([argz_replace], [], [ARGZ_H=argz.h])
+GL_GENERATE_ARGZ_H=false
+AC_CHECK_FUNC([argz_replace], [], [GL_GENERATE_ARGZ_H=true])
 
 dnl if have system argz functions, allow forced use of
 dnl libltdl-supplied implementation (and default to do so
@@ -39,7 +39,7 @@ dnl     provides them, yet they are broken, is cygwin
 dnl     releases prior to 5-May-2007 (1.5.24 and earlier)
 dnl So, it's more straightforward simply to special case
 dnl this for known bad systems.
-AS_IF([test -z "$ARGZ_H"],
+AS_IF([! $GL_GENERATE_ARGZ_H],
     [AC_CACHE_CHECK(
         [if argz actually works],
         [lt_cv_sys_argz_works],
@@ -71,10 +71,7 @@ AS_IF([test -z "$ARGZ_H"],
      AS_IF([test "$lt_cv_sys_argz_works" = yes],
         [AC_DEFINE([HAVE_WORKING_ARGZ], [1],
                    [This value is set to 1 to indicate that the system argz facility works])],
-        [ARGZ_H=argz.h])])
-
-AC_SUBST([ARGZ_H])
-AM_CONDITIONAL([GL_GENERATE_ARGZ_H], [test -n "$ARGZ_H"])
+        [GL_GENERATE_ARGZ_H=true])])
 ])
 
 # Prerequisites of lib/argz.c.
index 40bb0ea0f43f8ba10a09b0d563a6b0d8fd7f1faf..d3df1f3ae2d71e8f1ab410bb32c06f2c079027d4 100644 (file)
@@ -8,7 +8,7 @@ dnl From Paul Eggert.
 
 AC_DEFUN([gl_ASSERT_H],
 [
-  ASSERT_H=
+  GL_GENERATE_ASSERT_H=false
   AC_CACHE_CHECK([for static_assert], [gl_cv_static_assert],
     [AC_COMPILE_IFELSE(
        [AC_LANG_PROGRAM(
@@ -23,9 +23,7 @@ AC_DEFUN([gl_ASSERT_H],
        [gl_cv_static_assert=yes],
        [gl_cv_static_assert=no])])
   if test $gl_cv_static_assert = no; then
-    ASSERT_H=assert.h
+    GL_GENERATE_ASSERT_H=true
     gl_NEXT_HEADERS([assert.h])
   fi
-  AC_SUBST([ASSERT_H])
-  AM_CONDITIONAL([GL_GENERATE_ASSERT_H], [test -n "$ASSERT_H"])
 ])
index 1083b4c9e24c858e4fcf7ef991a2b859333acf45..db35b527a6977f227f5e772ff24f21176553c122 100644 (file)
@@ -1,4 +1,4 @@
-# byteswap.m4 serial 4
+# byteswap.m4 serial 5
 dnl Copyright (C) 2005, 2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,10 +10,8 @@ AC_DEFUN([gl_BYTESWAP],
 [
   dnl Prerequisites of lib/byteswap.in.h.
   AC_CHECK_HEADERS([byteswap.h], [
-    BYTESWAP_H=''
+    GL_GENERATE_BYTESWAP_H=false
   ], [
-    BYTESWAP_H='byteswap.h'
+    GL_GENERATE_BYTESWAP_H=true
   ])
-  AC_SUBST([BYTESWAP_H])
-  AM_CONDITIONAL([GL_GENERATE_BYTESWAP_H], [test -n "$BYTESWAP_H"])
 ])
index 51dfe92938d77cc08ea155e96b4a4906d2b480f0..7f5feabb2b8d6f9fe3418c4f136560c6c87937a5 100644 (file)
@@ -1,4 +1,4 @@
-# errno_h.m4 serial 13
+# errno_h.m4 serial 14
 dnl Copyright (C) 2004, 2006, 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -68,13 +68,11 @@ booboo
       [gl_cv_header_errno_h_complete=yes])
   ])
   if test $gl_cv_header_errno_h_complete = yes; then
-    ERRNO_H=''
+    GL_GENERATE_ERRNO_H=false
   else
     gl_NEXT_HEADERS([errno.h])
-    ERRNO_H='errno.h'
+    GL_GENERATE_ERRNO_H=true
   fi
-  AC_SUBST([ERRNO_H])
-  AM_CONDITIONAL([GL_GENERATE_ERRNO_H], [test -n "$ERRNO_H"])
   gl_REPLACE_ERRNO_VALUE([EMULTIHOP])
   gl_REPLACE_ERRNO_VALUE([ENOLINK])
   gl_REPLACE_ERRNO_VALUE([EOVERFLOW])
@@ -88,7 +86,7 @@ booboo
 # Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE.
 AC_DEFUN([gl_REPLACE_ERRNO_VALUE],
 [
-  if test -n "$ERRNO_H"; then
+  if $GL_GENERATE_ERRNO_H; then
     AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [
       AC_EGREP_CPP([yes],[
 #include <errno.h>
index 75ab44beeea4ec2f67b21ba88a130dff222fc273..581b173a23a34acfd5cc7843199136e5a5c7ab7e 100644 (file)
@@ -10,7 +10,7 @@ AC_DEFUN([gl_EXECINFO_H],
   AC_CHECK_HEADERS_ONCE([execinfo.h])
 
   LIB_EXECINFO=''
-  EXECINFO_H='execinfo.h'
+  GL_GENERATE_EXECINFO_H=true
 
   if test $ac_cv_header_execinfo_h = yes; then
     gl_saved_libs=$LIBS
@@ -18,14 +18,10 @@ AC_DEFUN([gl_EXECINFO_H],
         [test "$ac_cv_search_backtrace_symbols_fd" = "none required" ||
          LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd])
     LIBS=$gl_saved_libs
-    test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H=''
+    if test "$ac_cv_search_backtrace_symbols_fd" != no; then
+      GL_GENERATE_EXECINFO_H=false
+    fi
   fi
 
-  if test -n "$EXECINFO_H"; then
-    AC_LIBOBJ([execinfo])
-  fi
-
-  AC_SUBST([EXECINFO_H])
   AC_SUBST([LIB_EXECINFO])
-  AM_CONDITIONAL([GL_GENERATE_EXECINFO_H], [test -n "$EXECINFO_H"])
 ])
index ba38a28901bbc656ea3015929d9410d3cad9d412..c6a37d90968097f4d50abf8ddea485d929026056 100644 (file)
@@ -1,4 +1,4 @@
-# float_h.m4 serial 12
+# float_h.m4 serial 13
 dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,18 +8,18 @@ AC_DEFUN([gl_FLOAT_H],
 [
   AC_REQUIRE([AC_PROG_CC])
   AC_REQUIRE([AC_CANONICAL_HOST])
-  FLOAT_H=
+  GL_GENERATE_FLOAT_H=false
   REPLACE_FLOAT_LDBL=0
   case "$host_os" in
     aix* | beos* | openbsd* | mirbsd* | irix*)
-      FLOAT_H=float.h
+      GL_GENERATE_FLOAT_H=true
       ;;
     freebsd* | dragonfly*)
       case "$host_cpu" in
 changequote(,)dnl
         i[34567]86 )
 changequote([,])dnl
-          FLOAT_H=float.h
+          GL_GENERATE_FLOAT_H=true
           ;;
         x86_64 )
           # On x86_64 systems, the C compiler may still be generating
@@ -33,21 +33,21 @@ changequote([,])dnl
                  #endif
                ]])],
             [],
-            [FLOAT_H=float.h])
+            [GL_GENERATE_FLOAT_H=true])
           ;;
       esac
       ;;
     linux*)
       case "$host_cpu" in
         powerpc*)
-          FLOAT_H=float.h
+          GL_GENERATE_FLOAT_H=true
           ;;
       esac
       ;;
   esac
   case "$host_os" in
     aix* | freebsd* | dragonfly* | linux*)
-      if test -n "$FLOAT_H"; then
+      if $GL_GENERATE_FLOAT_H; then
         REPLACE_FLOAT_LDBL=1
       fi
       ;;
@@ -95,14 +95,12 @@ int main ()
       REPLACE_ITOLD=1
       dnl We add the workaround to <float.h> but also to <math.h>,
       dnl to increase the chances that the fix function gets pulled in.
-      FLOAT_H=float.h
+      GL_GENERATE_FLOAT_H=true
       ;;
   esac
 
-  if test -n "$FLOAT_H"; then
+  if $GL_GENERATE_FLOAT_H; then
     gl_NEXT_HEADERS([float.h])
   fi
-  AC_SUBST([FLOAT_H])
-  AM_CONDITIONAL([GL_GENERATE_FLOAT_H], [test -n "$FLOAT_H"])
   AC_SUBST([REPLACE_ITOLD])
 ])
index e9bcb66c696c7af84aafd540738be0ef6ad36956..0d75d6a59497bb011539fb658830de0a4c264619 100644 (file)
@@ -1,4 +1,4 @@
-# fnmatch_h.m4 serial 7
+# fnmatch_h.m4 serial 8
 dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -27,20 +27,18 @@ AC_DEFUN_ONCE([gl_FNMATCH_H],
   AC_SUBST([HAVE_FNMATCH_H])
 
   m4_ifdef([gl_POSIXCHECK],
-    [FNMATCH_H=fnmatch.h],
-    [FNMATCH_H=''
+    [GL_GENERATE_FNMATCH_H=true],
+    [GL_GENERATE_FNMATCH_H=false
      if m4_ifdef([gl_ANSI_CXX], [test "$CXX" != no], [false]); then
        dnl Override <fnmatch.h> always, to support the C++ GNULIB_NAMESPACE.
-       FNMATCH_H=fnmatch.h
+       GL_GENERATE_FNMATCH_H=true
      else
        if test $ac_cv_header_fnmatch_h != yes; then
          dnl Provide a substitute <fnmatch.h> file.
-         FNMATCH_H=fnmatch.h
+         GL_GENERATE_FNMATCH_H=true
        fi
      fi
     ])
-  AC_SUBST([FNMATCH_H])
-  AM_CONDITIONAL([GL_GENERATE_FNMATCH_H], [test -n "$FNMATCH_H"])
 
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use.
@@ -53,8 +51,7 @@ dnl Unconditionally enables the replacement of <fnmatch.h>.
 AC_DEFUN([gl_REPLACE_FNMATCH_H],
 [
   gl_FNMATCH_H_REQUIRE_DEFAULTS
-  FNMATCH_H='fnmatch.h'
-  AM_CONDITIONAL([GL_GENERATE_FNMATCH_H], [test -n "$FNMATCH_H"])
+  GL_GENERATE_FNMATCH_H=true
 ])
 
 # gl_FNMATCH_MODULE_INDICATOR([modulename])
index bb95c5ea28ea7bfc62901ef8586c3e97f4fde8c7..9b71159bc5719d9b04275b8073951fc7a8d49d95 100644 (file)
@@ -1,4 +1,4 @@
-# getopt.m4 serial 47
+# getopt.m4 serial 48
 dnl Copyright (C) 2002-2006, 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -21,6 +21,8 @@ AC_DEFUN([gl_FUNC_GETOPT_POSIX],
       REPLACE_GETOPT=1
     fi
   ])
+  GL_GENERATE_GETOPT_H=false
+  GL_GENERATE_GETOPT_CDEFS_H=false
   if test $REPLACE_GETOPT = 1; then
     dnl Arrange for getopt.h to be created.
     gl_GETOPT_SUBSTITUTE_HEADER
@@ -374,8 +376,6 @@ AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
   AC_DEFINE([__GETOPT_PREFIX], [[rpl_]],
     [Define to rpl_ if the getopt replacement functions and variables
      should be used.])
-  GETOPT_H=getopt.h
-  GETOPT_CDEFS_H=getopt-cdefs.h
-  AC_SUBST([GETOPT_H])
-  AC_SUBST([GETOPT_CDEFS_H])
+  GL_GENERATE_GETOPT_H=true
+  GL_GENERATE_GETOPT_CDEFS_H=true
 ])
index 5332c814bca63a764d3121952ba2372dd694ecd5..62b17a7b5af9b7c477c3212b4a1c2b49e7839b7a 100644 (file)
@@ -1,4 +1,4 @@
-# glob_h.m4 serial 8
+# glob_h.m4 serial 9
 dnl Copyright (C) 2018-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -22,20 +22,18 @@ AC_DEFUN_ONCE([gl_GLOB_H],
   AC_SUBST([HAVE_GLOB_H])
 
   m4_ifdef([gl_POSIXCHECK],
-    [GLOB_H=glob.h],
-    [GLOB_H=''
+    [GL_GENERATE_GLOB_H=true],
+    [GL_GENERATE_GLOB_H=false
      if m4_ifdef([gl_ANSI_CXX], [test "$CXX" != no], [false]); then
        dnl Override <glob.h> always, to support the C++ GNULIB_NAMESPACE.
-       GLOB_H=glob.h
+       GL_GENERATE_GLOB_H=true
      else
        if test $ac_cv_header_glob_h != yes; then
          dnl Provide a substitute <glob.h> file.
-         GLOB_H=glob.h
+         GL_GENERATE_GLOB_H=true
        fi
      fi
     ])
-  AC_SUBST([GLOB_H])
-  AM_CONDITIONAL([GL_GENERATE_GLOB_H], [test -n "$GLOB_H"])
 
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use.
@@ -48,8 +46,7 @@ dnl Unconditionally enables the replacement of <glob.h>.
 AC_DEFUN([gl_REPLACE_GLOB_H],
 [
   gl_GLOB_H_REQUIRE_DEFAULTS
-  GLOB_H='glob.h'
-  AM_CONDITIONAL([GL_GENERATE_GLOB_H], [test -n "$GLOB_H"])
+  GL_GENERATE_GLOB_H=true
 ])
 
 # gl_GLOB_MODULE_INDICATOR([modulename])
index 12b19dbcb4432ad01e48c0bf57187560b2dff7b2..9061efb5197e6e88d995bcb907c9b0ab3764f688 100644 (file)
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 67
+# gnulib-common.m4 serial 68
 dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -879,6 +879,30 @@ AC_DEFUN([gl_CXX_ALLOW_WARNINGS],
   AC_SUBST([GL_CXXFLAG_ALLOW_WARNINGS])
 ])
 
+dnl gl_CONDITIONAL_HEADER([foo.h])
+dnl takes a shell variable GL_GENERATE_FOO_H (with value true or false) as input
+dnl and produces
+dnl   - an AC_SUBSTed variable FOO_H that is either a file name or empty, based
+dnl     on whether GL_GENERATE_FOO_H is true or false,
+dnl   - an Automake conditional GL_GENERATE_FOO_H that evaluates to the value of
+dnl     the shell variable GL_GENERATE_FOO_H.
+AC_DEFUN([gl_CONDITIONAL_HEADER],
+[
+  m4_pushdef([gl_header_name], AS_TR_SH(m4_toupper($1)))
+  m4_pushdef([gl_generate_var], [GL_GENERATE_]AS_TR_SH(m4_toupper($1)))
+  m4_pushdef([gl_generate_cond], [GL_GENERATE_]AS_TR_SH(m4_toupper($1)))
+  case "$gl_generate_var" in
+    false) gl_header_name='' ;;
+    true) gl_header_name='$1' ;;
+    *) echo "*** gl_generate_var is not set correctly" 1>&2; exit 1 ;;
+  esac
+  AC_SUBST(gl_header_name)
+  AM_CONDITIONAL(gl_generate_cond, [$gl_generate_var])
+  m4_popdef([gl_generate_cond])
+  m4_popdef([gl_generate_var])
+  m4_popdef([gl_header_name])
+])
+
 dnl Expands to some code for use in .c programs that, on native Windows, defines
 dnl the Microsoft deprecated alias function names to the underscore-prefixed
 dnl actual function names. With this macro, these function names are available
index 2940988297b353891f279e8307cf481e61bab623..bf15f3d5cdadb4d63cc9bc274c3efb2fa0fdad8b 100644 (file)
@@ -1,4 +1,4 @@
-# iconv_h.m4 serial 15
+# iconv_h.m4 serial 16
 dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,8 +8,8 @@ AC_DEFUN_ONCE([gl_ICONV_H],
 [
   AC_REQUIRE([gl_ICONV_H_DEFAULTS])
 
-  dnl Execute this unconditionally, because ICONV_H may be set by other
-  dnl modules, after this code is executed.
+  dnl Execute this unconditionally, because GL_GENERATE_ICONV_H may be set to
+  dnl true by other modules, after this code is executed.
   gl_CHECK_NEXT_HEADERS([iconv.h])
 
   dnl Check for declarations of anything we want to poison if the
@@ -25,8 +25,7 @@ dnl Unconditionally enables the replacement of <iconv.h>.
 AC_DEFUN([gl_REPLACE_ICONV_H],
 [
   gl_ICONV_H_REQUIRE_DEFAULTS
-  ICONV_H='iconv.h'
-  AM_CONDITIONAL([GL_GENERATE_ICONV_H], [test -n "$ICONV_H"])
+  GL_GENERATE_ICONV_H=true
 ])
 
 # gl_ICONV_MODULE_INDICATOR([modulename])
@@ -60,13 +59,12 @@ AC_DEFUN([gl_ICONV_H_DEFAULTS],
   REPLACE_ICONV=0;      AC_SUBST([REPLACE_ICONV])
   REPLACE_ICONV_OPEN=0; AC_SUBST([REPLACE_ICONV_OPEN])
   REPLACE_ICONV_UTF=0;  AC_SUBST([REPLACE_ICONV_UTF])
-  ICONV_H='';           AC_SUBST([ICONV_H])
+  GL_GENERATE_ICONV_H=false
   m4_ifdef([gl_POSIXCHECK],
-    [ICONV_H='iconv.h'],
+    [GL_GENERATE_ICONV_H=true],
     [if m4_ifdef([gl_ANSI_CXX], [test "$CXX" != no], [false]); then
        dnl Override <fnmatch.h> always, to support the C++ GNULIB_NAMESPACE.
-       ICONV_H='iconv.h'
+       GL_GENERATE_ICONV_H=true
      fi
     ])
-  AM_CONDITIONAL([GL_GENERATE_ICONV_H], [test -n "$ICONV_H"])
 ])
index 68af3bd7ebe1e34277118817518867cf262834ab..0712613b6f2c61dc782fe208fd18feb2f4c593c6 100644 (file)
@@ -10,12 +10,10 @@ AC_DEFUN([gl_IEEE754_H],
   AC_REQUIRE([AC_C_BIGENDIAN])
   AC_CHECK_HEADERS_ONCE([ieee754.h])
   if test $ac_cv_header_ieee754_h = yes; then
-    IEEE754_H=
+    GL_GENERATE_IEEE754_H=false
   else
-    IEEE754_H=ieee754.h
+    GL_GENERATE_IEEE754_H=true
     AC_DEFINE([_GL_REPLACE_IEEE754_H], 1,
               [Define to 1 if <ieee754.h> is missing.])
   fi
-  AC_SUBST([IEEE754_H])
-  AM_CONDITIONAL([GL_GENERATE_IEEE754_H], [test -n "$IEEE754_H"])
 ])
index 64b1de5c42a2d9f1b48dae87223f1280c07a5fc8..c446aa82773284aa7c37ea6a915f11654cc16020 100644 (file)
@@ -1,4 +1,4 @@
-# inttypes.m4 serial 35
+# inttypes.m4 serial 36
 dnl Copyright (C) 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -36,7 +36,7 @@ AC_DEFUN_ONCE([gl_INTTYPES_INCOMPLETE],
 AC_DEFUN([gl_INTTYPES_PRI_SCN],
 [
   PRIPTR_PREFIX=
-  if test -n "$STDINT_H"; then
+  if $GL_GENERATE_STDINT_H; then
     dnl Using the gnulib <stdint.h>. It defines intptr_t to 'long' or
     dnl 'long long', depending on _WIN64.
     AC_COMPILE_IFELSE(
index c630a19e640a551571a268877e19e86b72f2e114..a2103dde88d421a86d63ab173298c07907b9fba2 100644 (file)
@@ -1,4 +1,4 @@
-# libgmp.m4 serial 5
+# libgmp.m4 serial 6
 # Configure the GMP library or a replacement.
 dnl Copyright 2020-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
@@ -59,11 +59,10 @@ AC_DEFUN([gl_LIBGMP],
             [ Try specifying --with-libgmp-prefix=DIR.])])
      fi])
   if test $HAVE_LIBGMP = yes && test "$ac_cv_header_gmp_h" = yes; then
-    GMP_H=
+    GL_GENERATE_GMP_H=false
   else
-    GMP_H=gmp.h
+    GL_GENERATE_GMP_H=true
   fi
-  AC_SUBST([GMP_H])
   AM_CONDITIONAL([GL_GENERATE_MINI_GMP_H],
     [test $HAVE_LIBGMP != yes])
   AM_CONDITIONAL([GL_GENERATE_GMP_GMP_H],
index 2422de152890805504c83c6dc86b4a20e1ddc5c1..74a5aeaf2804d07898b118d3d21aa865e8ccac7a 100644 (file)
@@ -1,4 +1,4 @@
-# libtextstyle-optional.m4 serial 2
+# libtextstyle-optional.m4 serial 3
 dnl Copyright (C) 2019-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -23,12 +23,10 @@ AC_DEFUN([gl_LIBTEXTSTYLE_OPTIONAL],
 [
   gl_LIBTEXTSTYLE([$1])
   if test $HAVE_LIBTEXTSTYLE = yes; then
-    TEXTSTYLE_H=
+    GL_GENERATE_TEXTSTYLE_H=false
   else
-    TEXTSTYLE_H=textstyle.h
+    GL_GENERATE_TEXTSTYLE_H=true
     AC_REQUIRE([AC_C_INLINE])
     AC_CHECK_FUNCS_ONCE([tcdrain])
   fi
-  AC_SUBST([TEXTSTYLE_H])
-  AM_CONDITIONAL([GL_GENERATE_TEXTSTYLE_H], [test -n "$TEXTSTYLE_H"])
 ])
index 00c9fe9e50a162cffbb83d926793d6bcb0d9c44d..c82f6c67813b966de704992046dc036094e9079f 100644 (file)
@@ -27,18 +27,15 @@ AC_DEFUN_ONCE([gl_LIMITS_H],
        [gl_cv_header_limits_width=yes],
        [gl_cv_header_limits_width=no])])
   if test "$gl_cv_header_limits_width" = yes; then
-    LIMITS_H=
+    GL_GENERATE_LIMITS_H=false
   else
-    LIMITS_H=limits.h
+    GL_GENERATE_LIMITS_H=true
   fi
-  AC_SUBST([LIMITS_H])
-  AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])
 ])
 
 dnl Unconditionally enables the replacement of <limits.h>.
 AC_DEFUN([gl_REPLACE_LIMITS_H],
 [
   AC_REQUIRE([gl_LIMITS_H])
-  LIMITS_H='limits.h'
-  AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])
+  GL_GENERATE_LIMITS_H=true
 ])
index 8ffa2af113140202d4f9fa83f338891b866272c0..1f3877566f514303a4a4b0526d8aa4bac98ce08e 100644 (file)
@@ -1,4 +1,4 @@
-# monetary_h.m4 serial 8
+# monetary_h.m4 serial 9
 dnl Copyright (C) 2017-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,7 @@ AC_DEFUN_ONCE([gl_MONETARY_H],
   dnl - C++ GNULIB_NAMESPACE support may be requested, or
   dnl - the system already has a <monetary.h>.
   if m4_ifdef([gl_POSIXCHECK], [true], [m4_ifdef([gl_ANSI_CXX], [test "$CXX" != no], [false]) || test $ac_cv_header_monetary_h = yes]); then
-    MONETARY_H='monetary.h'
+    GL_GENERATE_MONETARY_H=true
 
     gl_CHECK_NEXT_HEADERS([monetary.h])
     if test $ac_cv_header_monetary_h = yes; then
@@ -41,10 +41,8 @@ AC_DEFUN_ONCE([gl_MONETARY_H],
 
     AC_REQUIRE([AC_C_RESTRICT])
   else
-    MONETARY_H=''
+    GL_GENERATE_MONETARY_H=false
   fi
-  AC_SUBST([MONETARY_H])
-  AM_CONDITIONAL([GL_GENERATE_MONETARY_H], [test -n "$MONETARY_H"])
 ])
 
 # gl_MONETARY_MODULE_INDICATOR([modulename])
index dfc5b6f6db65493c8415a84d31eaa76d12bc8e7a..489241c4225ef590919467f009f2aa43b02688dd 100644 (file)
@@ -1,4 +1,4 @@
-# net_if_h.m4 serial 1
+# net_if_h.m4 serial 2
 dnl Copyright (C) 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -15,9 +15,9 @@ AC_DEFUN([gl_HEADER_NET_IF],
         [gl_cv_header_net_if_h_selfcontained=no])
     ])
   if test $gl_cv_header_net_if_h_selfcontained = yes; then
-    NET_IF_H=''
+    GL_GENERATE_NET_IF_H=false
   else
-    NET_IF_H='net/if.h'
+    GL_GENERATE_NET_IF_H=true
     AC_CHECK_HEADERS([net/if.h], [], [], [[#include <sys/socket.h>]])
     gl_NEXT_HEADERS([net/if.h])
     if test $ac_cv_header_net_if_h = yes; then
@@ -27,6 +27,4 @@ AC_DEFUN([gl_HEADER_NET_IF],
     fi
     AC_SUBST([HAVE_NET_IF_H])
   fi
-  AC_SUBST([NET_IF_H])
-  AM_CONDITIONAL([GL_GENERATE_NET_IF_H], [test -n "$NET_IF_H"])
 ])
index c555596434900dace3fdcfcb01986038967174a5..6579c8332aeb2aff9a25eb03255be81a0a922599 100644 (file)
@@ -1,4 +1,4 @@
-# netinet_in_h.m4 serial 5
+# netinet_in_h.m4 serial 6
 dnl Copyright (C) 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -14,9 +14,9 @@ AC_DEFUN([gl_HEADER_NETINET_IN],
         [gl_cv_header_netinet_in_h_selfcontained=no])
     ])
   if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
-    NETINET_IN_H=''
+    GL_GENERATE_NETINET_IN_H=false
   else
-    NETINET_IN_H='netinet/in.h'
+    GL_GENERATE_NETINET_IN_H=true
     AC_CHECK_HEADERS([netinet/in.h])
     gl_CHECK_NEXT_HEADERS([netinet/in.h])
     if test $ac_cv_header_netinet_in_h = yes; then
@@ -26,6 +26,4 @@ AC_DEFUN([gl_HEADER_NETINET_IN],
     fi
     AC_SUBST([HAVE_NETINET_IN_H])
   fi
-  AC_SUBST([NETINET_IN_H])
-  AM_CONDITIONAL([GL_GENERATE_NETINET_IN_H], [test -n "$NETINET_IN_H"])
 ])
index ebcd25e2a4d600a7e4dbd05b51eacb8147d52d87..760d2ee9dbaf14329adf653330fffe9fdff76eb1 100644 (file)
@@ -1,4 +1,4 @@
-# parse-datetime.m4 serial 26
+# parse-datetime.m4 serial 27
 dnl Copyright (C) 2002-2006, 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -42,7 +42,6 @@ AC_DEFUN([gl_PARSE_DATETIME],
   gl_PROG_BISON([PARSE_DATETIME_BISON], [2.4])
 
   dnl Prerequisites of lib/parse-datetime.h.
-  AC_REQUIRE([AM_STDBOOL_H])
   AC_REQUIRE([gl_TIMESPEC])
   AC_REQUIRE([AC_C_RESTRICT])
 
index 9f2ac2daec1483fd4caa48557b1a85b4c8e45c64..8fe60b1a814e0eb37dbc744dac3bb721122e2517 100644 (file)
@@ -1,4 +1,4 @@
-# perror.m4 serial 9
+# perror.m4 serial 10
 dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,7 @@ AC_DEFUN([gl_FUNC_PERROR],
   dnl since on glibc systems, strerror_r is replaced only for signature
   dnl issues, and perror is just fine.  Rather, we only want to
   dnl replace perror if strerror_r was replaced for a content fix.
-  if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
+  if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" != false:0; then
     dnl The system's perror() cannot know about the new errno values we add
     dnl to <errno.h>, or any fix for strerror(0). Replace it.
     REPLACE_PERROR=1
index bfe91d16d8110a50f0e98f1096e1f5604f49e632..a1a8cfe65530242934c4558683548ecbd1960190 100644 (file)
@@ -1,4 +1,4 @@
-# serial 3   -*- Autoconf -*-
+# serial 4   -*- Autoconf -*-
 # Copyright (C) 2006-2007, 2009-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -12,11 +12,9 @@ AC_DEFUN([gl_HEADERS_SELINUX_CONTEXT_H],
   AC_REQUIRE([gl_LIBSELINUX])
   if test "$with_selinux" != no; then
     AC_CHECK_HEADERS([selinux/context.h],
-                     [SELINUX_CONTEXT_H=],
-                     [SELINUX_CONTEXT_H=selinux/context.h])
+                     [GL_GENERATE_SELINUX_CONTEXT_H=false],
+                     [GL_GENERATE_SELINUX_CONTEXT_H=true])
   else
-    SELINUX_CONTEXT_H=selinux/context.h
+    GL_GENERATE_SELINUX_CONTEXT_H=true
   fi
-  AC_SUBST([SELINUX_CONTEXT_H])
-  AM_CONDITIONAL([GL_GENERATE_SELINUX_CONTEXT_H], [test -n "$SELINUX_CONTEXT_H"])
 ])
index 4bf070f2e879065e5d49c39d108fc54f060186b5..89113687b806f2b6a0a1c9e552a3ed1faf36916f 100644 (file)
@@ -9,11 +9,9 @@
 AC_DEFUN([gl_HEADERS_SELINUX_LABEL_H],
 [
   AC_REQUIRE([gl_LIBSELINUX])
-  SELINUX_LABEL_H=selinux/label.h
+  GL_GENERATE_SELINUX_LABEL_H=true
   if test "$with_selinux" != no; then
     AC_CHECK_HEADERS([selinux/label.h],
-                     [SELINUX_LABEL_H=])
+                     [GL_GENERATE_SELINUX_LABEL_H=false])
   fi
-  AC_SUBST([SELINUX_LABEL_H])
-  AM_CONDITIONAL([GL_GENERATE_SELINUX_LABEL_H], [test -n "$SELINUX_LABEL_H"])
 ])
index e22d7f78c06e73d8ac422b40510bc949cb24caf4..fd57cdd47f2b40ef80af36f7f596dd9311ad78a7 100644 (file)
@@ -49,11 +49,8 @@ AC_DEFUN([gl_STDALIGN_H],
        [gl_cv_header_working_stdalign_h=no])])
 
   if test $gl_cv_header_working_stdalign_h = yes; then
-    STDALIGN_H=''
+    GL_GENERATE_STDALIGN_H=false
   else
-    STDALIGN_H='stdalign.h'
+    GL_GENERATE_STDALIGN_H=true
   fi
-
-  AC_SUBST([STDALIGN_H])
-  AM_CONDITIONAL([GL_GENERATE_STDALIGN_H], [test -n "$STDALIGN_H"])
 ])
index 0b5fb637b4716bdbf04ec817b9660627f0d53479..9987343ebe27b65e3ecdfa573beb3d71563b234e 100644 (file)
@@ -1,4 +1,4 @@
-# stdarg.m4 serial 7
+# stdarg.m4 serial 8
 dnl Copyright (C) 2006, 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,7 +9,7 @@ dnl Provide a working va_copy in combination with <stdarg.h>.
 
 AC_DEFUN([gl_STDARG_H],
 [
-  STDARG_H=''
+  GL_GENERATE_STDARG_H=false
   NEXT_STDARG_H='<stdarg.h>'
   AC_CACHE_CHECK([for va_copy],
     [gl_cv_func_va_copy],
@@ -40,7 +40,7 @@ void (*func) (va_list, va_list) = va_copy;
       ], [gl_aixcc=yes], [gl_aixcc=no])
     if test $gl_aixcc = yes; then
       dnl Provide a substitute <stdarg.h> file.
-      STDARG_H=stdarg.h
+      GL_GENERATE_STDARG_H=true
       gl_NEXT_HEADERS([stdarg.h])
       dnl Fallback for the case when <stdarg.h> contains only macro definitions.
       if test "$gl_cv_next_stdarg_h" = '""'; then
@@ -72,7 +72,5 @@ error, bail out
       fi
     fi
   fi
-  AC_SUBST([STDARG_H])
-  AM_CONDITIONAL([GL_GENERATE_STDARG_H], [test -n "$STDARG_H"])
   AC_SUBST([NEXT_STDARG_H])
 ])
index 3169779d43c9b5dd6c7648140a71e7ec1f03ccd6..cacb48c821d9549885993f1fcf76be87f0ef0db0 100644 (file)
@@ -5,11 +5,11 @@ dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-#serial 8
+#serial 9
 
 # Prepare for substituting <stdbool.h> if it is not supported.
 
-AC_DEFUN([AM_STDBOOL_H],
+AC_DEFUN([gl_STDBOOL_H],
 [
   AC_REQUIRE([AC_CHECK_HEADER_STDBOOL])
   AC_REQUIRE([AC_CANONICAL_HOST])
@@ -22,20 +22,18 @@ AC_DEFUN([AM_STDBOOL_H],
     case "$host_os" in
       solaris*)
         if test -z "$GCC"; then
-          STDBOOL_H='stdbool.h'
+          GL_GENERATE_STDBOOL_H=true
         else
-          STDBOOL_H=''
+          GL_GENERATE_STDBOOL_H=false
         fi
         ;;
       *)
-        STDBOOL_H=''
+        GL_GENERATE_STDBOOL_H=false
         ;;
     esac
   else
-    STDBOOL_H='stdbool.h'
+    GL_GENERATE_STDBOOL_H=true
   fi
-  AC_SUBST([STDBOOL_H])
-  AM_CONDITIONAL([GL_GENERATE_STDBOOL_H], [test -n "$STDBOOL_H"])
 
   if test "$ac_cv_type__Bool" = yes; then
     HAVE__BOOL=1
@@ -45,9 +43,6 @@ AC_DEFUN([AM_STDBOOL_H],
   AC_SUBST([HAVE__BOOL])
 ])
 
-# AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future.
-AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H])
-
 # This version of the macro is needed in autoconf <= 2.68.
 
 AC_DEFUN([AC_CHECK_HEADER_STDBOOL],
index 1303d2e06c7e698c97f6fa3152fb7a95461788d4..0b160cde08b42a49d6897b12b6f93d02fa58ef0f 100644 (file)
@@ -1,4 +1,4 @@
-# stddef_h.m4 serial 11
+# stddef_h.m4 serial 12
 dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,7 @@ AC_DEFUN_ONCE([gl_STDDEF_H],
   dnl Persuade OpenBSD <stddef.h> to declare max_align_t.
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
 
-  STDDEF_H=
+  GL_GENERATE_STDDEF_H=false
 
   dnl Test whether the type max_align_t exists and whether its alignment
   dnl "is as great as is supported by the implementation in all contexts".
@@ -41,12 +41,12 @@ AC_DEFUN_ONCE([gl_STDDEF_H],
     ])
   if test $gl_cv_type_max_align_t = no; then
     HAVE_MAX_ALIGN_T=0
-    STDDEF_H=stddef.h
+    GL_GENERATE_STDDEF_H=true
   fi
 
   if test $gt_cv_c_wchar_t = no; then
     HAVE_WCHAR_T=0
-    STDDEF_H=stddef.h
+    GL_GENERATE_STDDEF_H=true
   fi
 
   AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions],
@@ -58,12 +58,10 @@ AC_DEFUN_ONCE([gl_STDDEF_H],
       [gl_cv_decl_null_works=no])])
   if test $gl_cv_decl_null_works = no; then
     REPLACE_NULL=1
-    STDDEF_H=stddef.h
+    GL_GENERATE_STDDEF_H=true
   fi
 
-  AC_SUBST([STDDEF_H])
-  AM_CONDITIONAL([GL_GENERATE_STDDEF_H], [test -n "$STDDEF_H"])
-  if test -n "$STDDEF_H"; then
+  if $GL_GENERATE_STDDEF_H; then
     gl_NEXT_HEADERS([stddef.h])
   fi
 ])
index 2eb1652d8e2b1eeeb02dbe9e46fa78f770fcfa90..61fb8ca696f77dad5d28d7f0f4c541e29609b558 100644 (file)
@@ -1,4 +1,4 @@
-# stdint.m4 serial 60
+# stdint.m4 serial 61
 dnl Copyright (C) 2001-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -296,7 +296,7 @@ static const char *macro_values[] =
   HAVE_C99_STDINT_H=0
   HAVE_SYS_BITYPES_H=0
   HAVE_SYS_INTTYPES_H=0
-  STDINT_H=stdint.h
+  GL_GENERATE_STDINT_H=true
   case "$gl_cv_header_working_stdint_h" in
     *yes)
       HAVE_C99_STDINT_H=1
@@ -341,7 +341,7 @@ int32_t i32 = INT32_C (0x7fffffff);
               ]])],
            [gl_cv_header_stdint_width=yes])])
       if test "$gl_cv_header_stdint_width" = yes; then
-        STDINT_H=
+        GL_GENERATE_STDINT_H=false
       fi
       ;;
     *)
@@ -364,8 +364,6 @@ int32_t i32 = INT32_C (0x7fffffff);
   AC_SUBST([HAVE_C99_STDINT_H])
   AC_SUBST([HAVE_SYS_BITYPES_H])
   AC_SUBST([HAVE_SYS_INTTYPES_H])
-  AC_SUBST([STDINT_H])
-  AM_CONDITIONAL([GL_GENERATE_STDINT_H], [test -n "$STDINT_H"])
 ])
 
 dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES)
index 207aa249b4cbd4727febfdaaa186a262a42a94f3..fe11c8abb32fbbf040d81038d2e534cf626cfd78 100644 (file)
@@ -15,7 +15,7 @@ AC_DEFUN([gl_STDNORETURN_H],
       dnl Regardless whether a working <stdnoreturn.h> exists or not,
       dnl we need our own <stdnoreturn.h>, because of the definition
       dnl of _Noreturn done by gnulib-common.m4.
-      STDNORETURN_H='stdnoreturn.h'
+      GL_GENERATE_STDNORETURN_H=true
       ;;
     *)
       AC_CACHE_CHECK([for working stdnoreturn.h],
@@ -43,12 +43,10 @@ AC_DEFUN([gl_STDNORETURN_H],
            [gl_cv_header_working_stdnoreturn_h=yes],
            [gl_cv_header_working_stdnoreturn_h=no])])
       if test $gl_cv_header_working_stdnoreturn_h = yes; then
-        STDNORETURN_H=''
+        GL_GENERATE_STDNORETURN_H=false
       else
-        STDNORETURN_H='stdnoreturn.h'
+        GL_GENERATE_STDNORETURN_H=true
       fi
       ;;
   esac
-  AC_SUBST([STDNORETURN_H])
-  AM_CONDITIONAL([GL_GENERATE_STDNORETURN_H], [test -n "$STDNORETURN_H"])
 ])
index 438ba920c419736abc6d2c647cb915ca3cdcd6c4..d068a40647a68f59cfddeecabdfde69d52d89f72 100644 (file)
@@ -1,4 +1,4 @@
-# strerror.m4 serial 22
+# strerror.m4 serial 23
 dnl Copyright (C) 2002, 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -13,7 +13,7 @@ AC_DEFUN([gl_FUNC_STRERROR],
   m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [
     AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS])
   ])
-  if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
+  if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
     AC_CACHE_CHECK([for working strerror function],
      [gl_cv_func_working_strerror],
      [AC_RUN_IFELSE(
index bc40ec294bb1ec78f51e3893c4a34ed7cdabbd58..3ec2d4eae219abe4fdba68fa65bdd0e627960dbe 100644 (file)
@@ -1,4 +1,4 @@
-# strerror_r.m4 serial 23
+# strerror_r.m4 serial 24
 dnl Copyright (C) 2002, 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,7 @@ AC_DEFUN([gl_FUNC_STRERROR_R],
   fi
 
   if test $ac_cv_func_strerror_r = yes; then
-    if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
+    if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
       if test $gl_cv_func_strerror_r_posix_signature = yes; then
         case "$gl_cv_func_strerror_r_works" in
           dnl The system's strerror_r has bugs.  Replace it.
@@ -59,7 +59,7 @@ AC_DEFUN([gl_FUNC_STRERROR_R_WORKS],
 
   AC_CHECK_FUNCS_ONCE([strerror_r])
   if test $ac_cv_func_strerror_r = yes; then
-    if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
+    if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
       dnl The POSIX prototype is:  int strerror_r (int, char *, size_t);
       dnl glibc, Cygwin:           char *strerror_r (int, char *, size_t);
       dnl AIX 5.1, OSF/1 5.1:      int strerror_r (int, char *, int);
index 5676a0d2170abb8085aa6dd1c492d15fd22ded1e..1f9a06f09cb12245e3bc30521527d419ebbfc2bd 100644 (file)
@@ -1,4 +1,4 @@
-# sys_socket_h.m4 serial 28
+# sys_socket_h.m4 serial 29
 dnl Copyright (C) 2005-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -22,6 +22,7 @@ AC_DEFUN_ONCE([gl_SYS_SOCKET_H],
       ;;
   esac
 
+  GL_GENERATE_SYS_SOCKET_H=false
   AC_CACHE_CHECK([whether <sys/socket.h> is self-contained],
     [gl_cv_header_sys_socket_h_selfcontained],
     [
@@ -44,7 +45,7 @@ AC_DEFUN_ONCE([gl_SYS_SOCKET_H],
             [gl_cv_header_sys_socket_h_shut=no])
         ])
       if test $gl_cv_header_sys_socket_h_shut = no; then
-        SYS_SOCKET_H='sys/socket.h'
+        GL_GENERATE_SYS_SOCKET_H=true
       fi
     fi
   fi
@@ -83,7 +84,7 @@ AC_DEFUN_ONCE([gl_SYS_SOCKET_H],
   fi
   if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
      || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
-    SYS_SOCKET_H='sys/socket.h'
+    GL_GENERATE_SYS_SOCKET_H=true
   fi
   gl_PREREQ_SYS_H_WINSOCK2
 
index d5d2254c9ef6ce143897ed3de73bd523f89e122b..7e84ac894cbafc55d5d267381c879fa68bcd3ce6 100644 (file)
@@ -1,4 +1,4 @@
-# sysexits.m4 serial 6
+# sysexits.m4 serial 7
 dnl Copyright (C) 2003, 2005, 2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -32,13 +32,11 @@ AC_DEFUN([gl_SYSEXITS],
             break;
           }
         ]])],
-      [SYSEXITS_H=],
-      [SYSEXITS_H=sysexits.h])
+      [GL_GENERATE_SYSEXITS_H=false],
+      [GL_GENERATE_SYSEXITS_H=true])
   else
     HAVE_SYSEXITS_H=0
-    SYSEXITS_H=sysexits.h
+    GL_GENERATE_SYSEXITS_H=true
   fi
   AC_SUBST([HAVE_SYSEXITS_H])
-  AC_SUBST([SYSEXITS_H])
-  AM_CONDITIONAL([GL_GENERATE_SYSEXITS_H], [test -n "$SYSEXITS_H"])
 ])
index ec3250dc4e036b5d782755542881bcbad99577b0..30d0ad4e76b58c6aa6f40c266f9292abc39448a4 100644 (file)
@@ -11,6 +11,7 @@ Depends-on:
 
 configure.ac:
 gl_FUNC_ALLOCA
+gl_CONDITIONAL_HEADER([alloca.h])
 AC_PROG_MKDIR_P
 
 Makefile.am:
index a20a214d4847e5d188fefb93e8abdefe2bbc82d0..bfa630ca5f0aa55c9c5c9fb9e4d905878cc9cd67 100644 (file)
@@ -16,6 +16,7 @@ strstr          [test -n "$ARGZ_H"]
 
 configure.ac:
 gl_FUNC_ARGZ
+gl_CONDITIONAL_HEADER([argz.h])
 AC_PROG_MKDIR_P
 if test -n "$ARGZ_H"; then
   AC_LIBOBJ([argz])
index aec3aae7d1fe95f673112355f46145c1f31b529c..b5bed41ebd5e6efea436b821c1ff406cda1d205b 100644 (file)
@@ -11,6 +11,7 @@ include_next
 
 configure.ac:
 gl_ASSERT_H
+gl_CONDITIONAL_HEADER([assert.h])
 AC_PROG_MKDIR_P
 
 Makefile.am:
index 43391572f281a308a136022af0f3595c319bb12d..ef48fac2d01844f5947e691025d95941c2961d7f 100644 (file)
@@ -9,6 +9,7 @@ Depends-on:
 
 configure.ac:
 gl_BYTESWAP
+gl_CONDITIONAL_HEADER([byteswap.h])
 AC_PROG_MKDIR_P
 
 Makefile.am:
index 35fe9ada9cecc62ace90ee7e040aec2d2da4d3e8..e8c3bede0a597b370979245cbab9f91344b9a70b 100644 (file)
@@ -10,6 +10,7 @@ include_next
 
 configure.ac:
 gl_HEADER_ERRNO_H
+gl_CONDITIONAL_HEADER([errno.h])
 AC_PROG_MKDIR_P
 
 Makefile.am:
index 89426bb55d530ea1003f3357f685e5614faf22bb..184637779651d542d2f8c9aa8c6e6c3478262d0a 100644 (file)
@@ -11,7 +11,11 @@ extern-inline
 
 configure.ac:
 gl_EXECINFO_H
+gl_CONDITIONAL_HEADER([execinfo.h])
 AC_PROG_MKDIR_P
+if $GL_GENERATE_EXECINFO_H; then
+  AC_LIBOBJ([execinfo])
+fi
 
 Makefile.am:
 BUILT_SOURCES += $(EXECINFO_H)
index ff68615a2f40480e2e1aa6b6219f329f37150324..4dcab5a76129602d8f70f7b21bf1daabbb53786b 100644 (file)
@@ -12,6 +12,7 @@ include_next
 
 configure.ac:
 gl_FLOAT_H
+gl_CONDITIONAL_HEADER([float.h])
 AC_PROG_MKDIR_P
 if test $REPLACE_FLOAT_LDBL = 1; then
   AC_LIBOBJ([float])
index 2cb69a7e9424d48d7684a7b71f595afcbeb90584..37ebfe2250d96c0a4bfead0fd0b87ba58ed0ef0a 100644 (file)
@@ -33,6 +33,8 @@ mbsinit         [test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1]
 
 configure.ac:
 gl_FUNC_FNMATCH_POSIX
+dnl Because of gl_REPLACE_FNMATCH_H:
+gl_CONDITIONAL_HEADER([fnmatch.h])
 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
   AC_LIBOBJ([fnmatch])
   gl_PREREQ_FNMATCH
index cfabc8cd51407eddfc256e33e28fcb9624e313a1..a0cca9e942a725fa6f94aa671181c782a5949bd1 100644 (file)
@@ -15,6 +15,7 @@ snippet/warn-on-use
 configure.ac:
 gl_FNMATCH_H
 gl_FNMATCH_H_REQUIRE_DEFAULTS
+gl_CONDITIONAL_HEADER([fnmatch.h])
 AC_PROG_MKDIR_P
 
 Makefile.am:
index 0e8e667d5a591b11a4e2079792a57a0fb1fda87f..bac9dc57c9f28ce6c4f91dd8ee41557730462b04 100644 (file)
@@ -22,6 +22,7 @@ snippet/arg-nonnull
 
 configure.ac:
 gl_FUNC_GETOPT_POSIX
+gl_CONDITIONAL_HEADER([getopt.h])
 AC_PROG_MKDIR_P
 if test $REPLACE_GETOPT = 1; then
   AC_LIBOBJ([getopt])
index eb1bd9e5aee54dae35f4048b1509b1a873bd1e9f..7e66b478442a2e986b99fdda4d72dbcd421cf833 100644 (file)
@@ -35,6 +35,8 @@ malloc-posix    [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
 
 configure.ac:
 gl_GLOB
+dnl Because of gl_REPLACE_GLOB_H:
+gl_CONDITIONAL_HEADER([glob.h])
 if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
   AC_LIBOBJ([glob])
   AC_LIBOBJ([globfree])
index 891db9d10cb54f09a39b40f86bfec41dc67216bd..549a9bb6284e94e3607b546ab82e896632a2c762 100644 (file)
@@ -19,6 +19,7 @@ sys_stat
 configure.ac:
 gl_GLOB_H
 gl_GLOB_H_REQUIRE_DEFAULTS
+gl_CONDITIONAL_HEADER([glob.h])
 AC_PROG_MKDIR_P
 
 Makefile.am:
index 66faaed5dd4e3d2fce5e8956d0487ff03bd734a2..c3aed0bf49bf19b92a9e90b0486b294e33dd9f01 100644 (file)
@@ -14,6 +14,7 @@ snippet/warn-on-use
 configure.ac:
 gl_ICONV_H
 gl_ICONV_H_REQUIRE_DEFAULTS
+gl_CONDITIONAL_HEADER([iconv.h])
 AC_PROG_MKDIR_P
 
 Makefile.am:
index dba45920add3ca3ca354d8c7047180ad60d1639f..e7e7a762a898655d73e24c1a4493866627f0a5a6 100644 (file)
@@ -25,6 +25,8 @@ unistr/u8-uctomb  [test $REPLACE_ICONV_UTF = 1]
 
 configure.ac:
 gl_FUNC_ICONV_OPEN
+dnl Because of gl_REPLACE_ICONV_H:
+gl_CONDITIONAL_HEADER([iconv.h])
 if test $REPLACE_ICONV_OPEN = 1; then
   AC_LIBOBJ([iconv_open])
 fi
index 4ccf4208fadea754156c9c3f6eeb908e2eb5f768..343db6c994fd0e4c44cfd048e47b45eb5164e489 100644 (file)
@@ -9,6 +9,7 @@ Depends-on:
 
 configure.ac:
 gl_IEEE754_H
+gl_CONDITIONAL_HEADER([ieee754.h])
 AC_PROG_MKDIR_P
 
 Makefile.am:
index 1c347617bb4ed74cce2bda23c94bf7cc13b1694d..c8e497026456f3dd6c729ed7d0f03f13ab9e0a10 100644 (file)
@@ -11,6 +11,7 @@ Depends-on:
 
 configure.ac:
 gl_LIBGMP
+gl_CONDITIONAL_HEADER([gmp.h])
 AC_PROG_MKDIR_P
 if test $HAVE_LIBGMP != yes; then
   AC_LIBOBJ([mini-gmp-gnulib])
@@ -19,24 +20,25 @@ fi
 Makefile.am:
 BUILT_SOURCES += $(GMP_H)
 
+if GL_GENERATE_GMP_H
 if GL_GENERATE_MINI_GMP_H
 # Build gmp.h as a wrapper for mini-gmp.h when using mini-gmp.
 gmp.h: $(top_builddir)/config.status
        $(MKDIR_P) '%reldir%'
        echo '#include "mini-gmp.h"' > $@-t
        mv $@-t $@
-else
+endif
 if GL_GENERATE_GMP_GMP_H
 # Build gmp.h as a wrapper for gmp/gmp.h.
 gmp.h: $(top_builddir)/config.status
        $(MKDIR_P) '%reldir%'
        echo '#include <gmp/gmp.h>' > $@-t
        mv $@-t $@
+endif
 else
 gmp.h: $(top_builddir)/config.status
        rm -f $@
 endif
-endif
 MOSTLYCLEANFILES += gmp.h gmp.h-t
 
 Include:
index 342d718890e8ee25cd68a71244b3577287c87e9f..a9656803a5fdcc36bedc3dc4fc49b19981320b4d 100644 (file)
@@ -15,6 +15,10 @@ vasprintf-posix
 
 configure.ac:
 # You need to invoke gl_LIBTEXTSTYLE_OPTIONAL yourself, possibly with arguments.
+if test -z "$GL_GENERATE_TEXTSTYLE_H"; then
+  GL_GENERATE_TEXTSTYLE_H=false
+fi
+gl_CONDITIONAL_HEADER([textstyle.h])
 AC_PROG_MKDIR_P
 
 Makefile.am:
index 3f5dcf9e305ce7860fe4ff3d44eabf867a74342b..14205e457d27b2af846afba214b94b71e31eeda4 100644 (file)
@@ -10,6 +10,7 @@ include_next
 
 configure.ac:
 gl_LIMITS_H
+gl_CONDITIONAL_HEADER([limits.h])
 AC_PROG_MKDIR_P
 
 Makefile.am:
index 645062c68d1caeabef4bfeb40498759fb368b92d..63d36e920944a35582f8e1a3cc45f40de4101f30 100644 (file)
@@ -14,6 +14,7 @@ snippet/warn-on-use
 configure.ac:
 gl_MONETARY_H
 gl_MONETARY_H_REQUIRE_DEFAULTS
+gl_CONDITIONAL_HEADER([monetary.h])
 AC_PROG_MKDIR_P
 
 Makefile.am:
index 467544e4d08ba9a185d2b3d1c06e704686bfc95a..092116bcb47f1f1bc189dba95d52823f66ad78f7 100644 (file)
@@ -11,6 +11,7 @@ sys_socket
 
 configure.ac:
 gl_HEADER_NET_IF
+gl_CONDITIONAL_HEADER([net/if.h])
 AC_PROG_MKDIR_P
 
 Makefile.am:
index da21e0d6bd63122c0a680e401ed5982de33bda3e..29b26c906e28069df1608493ca4711417e66679a 100644 (file)
@@ -11,6 +11,7 @@ sys_socket
 
 configure.ac:
 gl_HEADER_NETINET_IN
+gl_CONDITIONAL_HEADER([netinet/in.h])
 AC_PROG_MKDIR_P
 
 Makefile.am:
index d0e3b29dbb9359fae388e3f1a7f3d0951f954ee9..d6304e8ffba42df7fd35b4bba95055c575af8f13 100644 (file)
@@ -21,6 +21,8 @@ configure.ac:
 gl_HEADERS_SELINUX_SELINUX_H
 gl_HEADERS_SELINUX_CONTEXT_H
 gl_HEADERS_SELINUX_LABEL_H
+gl_CONDITIONAL_HEADER([selinux/context.h])
+gl_CONDITIONAL_HEADER([selinux/label.h])
 AC_PROG_MKDIR_P
 if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then
   AC_LIBOBJ([getfilecon])
index fa0a1d526318301945d7c3139dad0d2c67afd96f..ef0a5fcd5518f87e17d9d3f44d6a874a36c42bfd 100644 (file)
@@ -31,14 +31,13 @@ getpagesize
 configure.ac:
 AC_REQUIRE([gl_SIGSEGV])
 if test $gl_sigsegv_uses_libsigsegv = yes; then
-  SIGSEGV_H=
+  GL_GENERATE_SIGSEGV_H=false
 else
-  SIGSEGV_H=sigsegv.h
+  GL_GENERATE_SIGSEGV_H=true
 fi
-AC_SUBST([SIGSEGV_H])
-AM_CONDITIONAL([GL_GENERATE_SIGSEGV_H], [test -n "$SIGSEGV_H"])
+gl_CONDITIONAL_HEADER([sigsegv.h])
 AC_PROG_MKDIR_P
-if test -n "$SIGSEGV_H"; then
+if $GL_GENERATE_SIGSEGV_H; then
   dnl Persuade glibc <sys/ucontext.h> to declare macros designating register
   dnl indices: REG_RSP on x86_64, REG_ESP on i386.
   dnl Persuade Solaris OpenIndiana <ucontext.h> to include <sys/regset.h>,
index af25b34b884e56de09923852fdcf365b7d9d5c3d..b17c8eff19282bf2b99f543556231c46e65a0bdc 100644 (file)
@@ -9,6 +9,7 @@ Depends-on:
 
 configure.ac:
 gl_STDALIGN_H
+gl_CONDITIONAL_HEADER([stdalign.h])
 AC_PROG_MKDIR_P
 
 Makefile.am:
index f4f37abac5c68ec72e9f373b2dbe0baf8b7d901b..5bfd500b63b62656ce93b42fdcfa7569d135eabd 100644 (file)
@@ -15,6 +15,7 @@ gl_PROG_CC_C99
 
 configure.ac:
 gl_STDARG_H
+gl_CONDITIONAL_HEADER([stdarg.h])
 AC_PROG_MKDIR_P
 
 Makefile.am:
index d3f434cc5581f81760bc38985aa4acafa46f0ffb..9128b453e5cdf8bff438a2c46dfcc4e789ee6815 100644 (file)
@@ -9,7 +9,8 @@ m4/stdbool.m4
 Depends-on:
 
 configure.ac:
-AM_STDBOOL_H
+gl_STDBOOL_H
+gl_CONDITIONAL_HEADER([stdbool.h])
 AC_PROG_MKDIR_P
 
 Makefile.am:
index d69b861f6bf8550415277a367524cd4b34f668d2..0967bc14297f80606b74a80402c9a3de24aac9a8 100644 (file)
@@ -13,6 +13,7 @@ extensions
 configure.ac:
 gl_STDDEF_H
 gl_STDDEF_H_REQUIRE_DEFAULTS
+gl_CONDITIONAL_HEADER([stddef.h])
 AC_PROG_MKDIR_P
 
 Makefile.am:
index ea38736bfa1d8c52fac42ee5afa573555939eb8b..bdec953df5a24e948cb83f9b5e7a7febe50cd3dd 100644 (file)
@@ -20,6 +20,9 @@ sys_types
 
 configure.ac:
 gl_STDINT_H
+gl_CONDITIONAL_HEADER([stdint.h])
+dnl Because of gl_REPLACE_LIMITS_H:
+gl_CONDITIONAL_HEADER([limits.h])
 AC_PROG_MKDIR_P
 
 Makefile.am:
index d2b9566255c1342e5e9f482f5f712d6eeefb0817..963a6926dba24b1369506a00fa24cdb00db2a62e 100644 (file)
@@ -10,6 +10,7 @@ snippet/_Noreturn
 
 configure.ac:
 gl_STDNORETURN_H
+gl_CONDITIONAL_HEADER([stdnoreturn.h])
 AC_PROG_MKDIR_P
 
 Makefile.am:
index 715a2e55d9dd475d31704dce8e3d4cb293f0f264..a3958332a7909abde0206c542fb5d6b95855fe12 100644 (file)
@@ -11,6 +11,7 @@ stdlib
 
 configure.ac:
 gl_SYSEXITS
+gl_CONDITIONAL_HEADER([sysexits.h])
 AC_PROG_MKDIR_P
 
 Makefile.am: