summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2021-12-18 16:12:38 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2021-12-18 16:15:49 -0800
commitf05a93e8232e6f56458ac16d733b03e96a63e930 (patch)
treeb6b95198cf4b5e0b2969b7a427db1c5146a7d856 /m4
parent35da3ed05212e0222841becf614c109011f9ad80 (diff)
downloademacs-f05a93e8232e6f56458ac16d733b03e96a63e930.tar.gz
Update from gnulib
Make the following changes by hand, and run ‘admin/merge-gnulib’. * configure.ac (AM_CONDITIONAL): Adjust to new Gnulib convention.
Diffstat (limited to 'm4')
-rw-r--r--m4/alloca.m410
-rw-r--r--m4/byteswap.m48
-rw-r--r--m4/errno_h.m410
-rw-r--r--m4/execinfo.m412
-rw-r--r--m4/getopt.m410
-rw-r--r--m4/gnulib-common.m432
-rw-r--r--m4/gnulib-comp.m439
-rw-r--r--m4/ieee754-h.m46
-rw-r--r--m4/include_next.m46
-rw-r--r--m4/inttypes.m44
-rw-r--r--m4/libgmp.m47
-rw-r--r--m4/limits-h.m49
-rw-r--r--m4/stdalign.m47
-rw-r--r--m4/stddef_h.m414
-rw-r--r--m4/stdint.m48
-rw-r--r--m4/sys_socket_h.m47
16 files changed, 118 insertions, 71 deletions
diff --git a/m4/alloca.m4 b/m4/alloca.m4
index ba2f679d8e0..7e474aa681b 100644
--- a/m4/alloca.m4
+++ b/m4/alloca.m4
@@ -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
diff --git a/m4/byteswap.m4 b/m4/byteswap.m4
index 1083b4c9e24..db35b527a69 100644
--- a/m4/byteswap.m4
+++ b/m4/byteswap.m4
@@ -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"])
])
diff --git a/m4/errno_h.m4 b/m4/errno_h.m4
index 51dfe92938d..7f5feabb2b8 100644
--- a/m4/errno_h.m4
+++ b/m4/errno_h.m4
@@ -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>
diff --git a/m4/execinfo.m4 b/m4/execinfo.m4
index 75ab44beeea..581b173a23a 100644
--- a/m4/execinfo.m4
+++ b/m4/execinfo.m4
@@ -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"])
])
diff --git a/m4/getopt.m4 b/m4/getopt.m4
index bb95c5ea28e..9b71159bc57 100644
--- a/m4/getopt.m4
+++ b/m4/getopt.m4
@@ -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
])
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index 12b19dbcb44..f70ef4ea968 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 67
+# gnulib-common.m4 serial 69
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,36 @@ 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)
+ dnl It is OK to use a .h file in lib/ from within tests/, but not vice
+ dnl versa.
+ if test -z "$gl_header_name"; then
+ gl_header_name="${gl_source_base_prefix}$1"
+ fi
+ ;;
+ *) 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
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index e314edcfb53..a6810523ec9 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -224,10 +224,15 @@ AC_DEFUN([gl_INIT],
m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL])
gl_COMMON
gl_source_base='lib'
+ gl_source_base_prefix=
gl_FUNC_ACL
gl_FUNC_ALLOCA
+ gl_CONDITIONAL_HEADER([alloca.h])
+ AC_PROG_MKDIR_P
gl___BUILTIN_EXPECT
gl_BYTESWAP
+ gl_CONDITIONAL_HEADER([byteswap.h])
+ AC_PROG_MKDIR_P
gl_CANONICALIZE_LGPL
if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
AC_LIBOBJ([canonicalize-lgpl])
@@ -255,6 +260,7 @@ AC_DEFUN([gl_INIT],
gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE
gl_DIRENT_H
gl_DIRENT_H_REQUIRE_DEFAULTS
+ AC_PROG_MKDIR_P
gl_DOUBLE_SLASH_ROOT
gl_FUNC_DUP2
if test $REPLACE_DUP2 = 1; then
@@ -265,7 +271,14 @@ AC_DEFUN([gl_INIT],
gl_ENVIRON
gl_UNISTD_MODULE_INDICATOR([environ])
gl_HEADER_ERRNO_H
+ gl_CONDITIONAL_HEADER([errno.h])
+ AC_PROG_MKDIR_P
gl_EXECINFO_H
+ gl_CONDITIONAL_HEADER([execinfo.h])
+ AC_PROG_MKDIR_P
+ if $GL_GENERATE_EXECINFO_H; then
+ AC_LIBOBJ([execinfo])
+ fi
gl_FUNC_EXPLICIT_BZERO
if test $HAVE_EXPLICIT_BZERO = 0; then
AC_LIBOBJ([explicit_bzero])
@@ -293,6 +306,7 @@ AC_DEFUN([gl_INIT],
gl_FCNTL_MODULE_INDICATOR([fcntl])
gl_FCNTL_H
gl_FCNTL_H_REQUIRE_DEFAULTS
+ AC_PROG_MKDIR_P
gl_FUNC_FDOPENDIR
if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
AC_LIBOBJ([fdopendir])
@@ -345,6 +359,9 @@ AC_DEFUN([gl_INIT],
dnl mechanism), there is no need to do any AC_LIBOBJ or AC_SUBST here; they are
dnl done in the getopt-posix module.
gl_FUNC_GETOPT_POSIX
+ gl_CONDITIONAL_HEADER([getopt.h])
+ gl_CONDITIONAL_HEADER([getopt-cdefs.h])
+ AC_PROG_MKDIR_P
if test $REPLACE_GETOPT = 1; then
AC_LIBOBJ([getopt])
AC_LIBOBJ([getopt1])
@@ -367,15 +384,22 @@ AC_DEFUN([gl_INIT],
fi
gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
gl_IEEE754_H
+ gl_CONDITIONAL_HEADER([ieee754.h])
+ AC_PROG_MKDIR_P
gl_INTTYPES_INCOMPLETE
gl_INTTYPES_H_REQUIRE_DEFAULTS
+ AC_PROG_MKDIR_P
AC_REQUIRE([gl_LARGEFILE])
gl___INLINE
gl_LIBGMP
+ gl_CONDITIONAL_HEADER([gmp.h])
+ AC_PROG_MKDIR_P
if test $HAVE_LIBGMP != yes; then
AC_LIBOBJ([mini-gmp-gnulib])
fi
gl_LIMITS_H
+ gl_CONDITIONAL_HEADER([limits.h])
+ AC_PROG_MKDIR_P
gl_FUNC_LSTAT
if test $REPLACE_LSTAT = 1; then
AC_LIBOBJ([lstat])
@@ -458,16 +482,26 @@ AC_DEFUN([gl_INIT],
gl_STRING_MODULE_INDICATOR([sigdescr_np])
gl_SIGNAL_H
gl_SIGNAL_H_REQUIRE_DEFAULTS
+ AC_PROG_MKDIR_P
gl_TYPE_SOCKLEN_T
gt_TYPE_SSIZE_T
gl_STAT_TIME
gl_STAT_BIRTHTIME
gl_STDALIGN_H
+ gl_CONDITIONAL_HEADER([stdalign.h])
+ AC_PROG_MKDIR_P
gl_STDDEF_H
gl_STDDEF_H_REQUIRE_DEFAULTS
+ gl_CONDITIONAL_HEADER([stddef.h])
+ AC_PROG_MKDIR_P
gl_STDINT_H
+ gl_CONDITIONAL_HEADER([stdint.h])
+ dnl Because of gl_REPLACE_LIMITS_H:
+ gl_CONDITIONAL_HEADER([limits.h])
+ AC_PROG_MKDIR_P
gl_STDIO_H
gl_STDIO_H_REQUIRE_DEFAULTS
+ AC_PROG_MKDIR_P
dnl No need to create extra modules for these functions. Everyone who uses
dnl <stdio.h> likely needs them.
gl_STDIO_MODULE_INDICATOR([fscanf])
@@ -493,6 +527,7 @@ AC_DEFUN([gl_INIT],
gl_STDIO_MODULE_INDICATOR([fwrite])
gl_STDLIB_H
gl_STDLIB_H_REQUIRE_DEFAULTS
+ AC_PROG_MKDIR_P
gl_FUNC_STPCPY
if test $HAVE_STPCPY = 0; then
AC_LIBOBJ([stpcpy])
@@ -501,6 +536,7 @@ AC_DEFUN([gl_INIT],
gl_STRING_MODULE_INDICATOR([stpcpy])
gl_STRING_H
gl_STRING_H_REQUIRE_DEFAULTS
+ AC_PROG_MKDIR_P
gl_FUNC_STRNLEN
if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
AC_LIBOBJ([strnlen])
@@ -537,6 +573,7 @@ AC_DEFUN([gl_INIT],
gl_MODULE_INDICATOR([tempname])
gl_TIME_H
gl_TIME_H_REQUIRE_DEFAULTS
+ AC_PROG_MKDIR_P
gl_TIME_R
if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
AC_LIBOBJ([time_r])
@@ -558,6 +595,7 @@ AC_DEFUN([gl_INIT],
gl_TIMESPEC
gl_UNISTD_H
gl_UNISTD_H_REQUIRE_DEFAULTS
+ AC_PROG_MKDIR_P
AC_DEFINE([GNULIB_STDIO_SINGLE_THREAD], [1],
[Define to 1 if you want the FILE stream functions getc, putc, etc.
to use unlocked I/O if available, throughout the package.
@@ -993,6 +1031,7 @@ AC_DEFUN([gl_INIT],
m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL])
gl_COMMON
gl_source_base='tests'
+ gl_source_base_prefix=
changequote(,)dnl
gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
changequote([, ])dnl
diff --git a/m4/ieee754-h.m4 b/m4/ieee754-h.m4
index 68af3bd7ebe..0712613b6f2 100644
--- a/m4/ieee754-h.m4
+++ b/m4/ieee754-h.m4
@@ -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"])
])
diff --git a/m4/include_next.m4 b/m4/include_next.m4
index bdd542bc64d..7dcd1cef0b3 100644
--- a/m4/include_next.m4
+++ b/m4/include_next.m4
@@ -193,9 +193,9 @@ AC_DEFUN([gl_NEXT_HEADERS_INTERNAL],
if test AS_VAR_GET([gl_header_exists]) = yes; then
AS_VAR_POPDEF([gl_header_exists])
])
- gl_ABSOLUTE_HEADER_ONE(gl_HEADER_NAME)
- AS_VAR_COPY([gl_header], [gl_cv_absolute_]AS_TR_SH(gl_HEADER_NAME))
- AS_VAR_SET([gl_next_header], ['"'$gl_header'"'])
+ gl_ABSOLUTE_HEADER_ONE(gl_HEADER_NAME)
+ AS_VAR_COPY([gl_header], [gl_cv_absolute_]AS_TR_SH(gl_HEADER_NAME))
+ AS_VAR_SET([gl_next_header], ['"'$gl_header'"'])
m4_if([$2], [check],
[else
AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
diff --git a/m4/inttypes.m4 b/m4/inttypes.m4
index 64b1de5c42a..c446aa82773 100644
--- a/m4/inttypes.m4
+++ b/m4/inttypes.m4
@@ -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(
diff --git a/m4/libgmp.m4 b/m4/libgmp.m4
index c630a19e640..a2103dde88d 100644
--- a/m4/libgmp.m4
+++ b/m4/libgmp.m4
@@ -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],
diff --git a/m4/limits-h.m4 b/m4/limits-h.m4
index 00c9fe9e50a..c82f6c67813 100644
--- a/m4/limits-h.m4
+++ b/m4/limits-h.m4
@@ -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
])
diff --git a/m4/stdalign.m4 b/m4/stdalign.m4
index e22d7f78c06..fd57cdd47f2 100644
--- a/m4/stdalign.m4
+++ b/m4/stdalign.m4
@@ -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"])
])
diff --git a/m4/stddef_h.m4 b/m4/stddef_h.m4
index 1303d2e06c7..0b160cde08b 100644
--- a/m4/stddef_h.m4
+++ b/m4/stddef_h.m4
@@ -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
])
diff --git a/m4/stdint.m4 b/m4/stdint.m4
index 2eb1652d8e2..61fb8ca696f 100644
--- a/m4/stdint.m4
+++ b/m4/stdint.m4
@@ -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)
diff --git a/m4/sys_socket_h.m4 b/m4/sys_socket_h.m4
index 5676a0d2170..1f9a06f09cb 100644
--- a/m4/sys_socket_h.m4
+++ b/m4/sys_socket_h.m4
@@ -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