+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.
-# 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
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
# 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
# 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
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],
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.
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(
[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"])
])
-# 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,
[
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"])
])
-# 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,
[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])
# 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>
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
[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"])
])
-# 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,
[
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
#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
;;
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])
])
-# 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,
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.
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])
-# 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,
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
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
])
-# 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,
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.
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])
-# 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,
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
-# 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,
[
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
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])
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"])
])
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"])
])
-# 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,
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(
-# 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
[ 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],
-# 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,
[
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"])
])
[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
])
-# 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,
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
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])
-# 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,
[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
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"])
])
-# 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,
[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
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"])
])
-# 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,
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])
-# 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,
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
-# 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,
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"])
])
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"])
])
[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"])
])
-# 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,
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],
], [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
fi
fi
fi
- AC_SUBST([STDARG_H])
- AM_CONDITIONAL([GL_GENERATE_STDARG_H], [test -n "$STDARG_H"])
AC_SUBST([NEXT_STDARG_H])
])
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])
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
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],
-# 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,
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".
])
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],
[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
])
-# 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,
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
]])],
[gl_cv_header_stdint_width=yes])])
if test "$gl_cv_header_stdint_width" = yes; then
- STDINT_H=
+ GL_GENERATE_STDINT_H=false
fi
;;
*)
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)
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],
[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"])
])
-# 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,
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(
-# 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,
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.
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);
-# 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,
;;
esac
+ GL_GENERATE_SYS_SOCKET_H=false
AC_CACHE_CHECK([whether <sys/socket.h> is self-contained],
[gl_cv_header_sys_socket_h_selfcontained],
[
[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
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
-# 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,
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"])
])
configure.ac:
gl_FUNC_ALLOCA
+gl_CONDITIONAL_HEADER([alloca.h])
AC_PROG_MKDIR_P
Makefile.am:
configure.ac:
gl_FUNC_ARGZ
+gl_CONDITIONAL_HEADER([argz.h])
AC_PROG_MKDIR_P
if test -n "$ARGZ_H"; then
AC_LIBOBJ([argz])
configure.ac:
gl_ASSERT_H
+gl_CONDITIONAL_HEADER([assert.h])
AC_PROG_MKDIR_P
Makefile.am:
configure.ac:
gl_BYTESWAP
+gl_CONDITIONAL_HEADER([byteswap.h])
AC_PROG_MKDIR_P
Makefile.am:
configure.ac:
gl_HEADER_ERRNO_H
+gl_CONDITIONAL_HEADER([errno.h])
AC_PROG_MKDIR_P
Makefile.am:
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)
configure.ac:
gl_FLOAT_H
+gl_CONDITIONAL_HEADER([float.h])
AC_PROG_MKDIR_P
if test $REPLACE_FLOAT_LDBL = 1; then
AC_LIBOBJ([float])
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
configure.ac:
gl_FNMATCH_H
gl_FNMATCH_H_REQUIRE_DEFAULTS
+gl_CONDITIONAL_HEADER([fnmatch.h])
AC_PROG_MKDIR_P
Makefile.am:
configure.ac:
gl_FUNC_GETOPT_POSIX
+gl_CONDITIONAL_HEADER([getopt.h])
AC_PROG_MKDIR_P
if test $REPLACE_GETOPT = 1; then
AC_LIBOBJ([getopt])
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])
configure.ac:
gl_GLOB_H
gl_GLOB_H_REQUIRE_DEFAULTS
+gl_CONDITIONAL_HEADER([glob.h])
AC_PROG_MKDIR_P
Makefile.am:
configure.ac:
gl_ICONV_H
gl_ICONV_H_REQUIRE_DEFAULTS
+gl_CONDITIONAL_HEADER([iconv.h])
AC_PROG_MKDIR_P
Makefile.am:
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
configure.ac:
gl_IEEE754_H
+gl_CONDITIONAL_HEADER([ieee754.h])
AC_PROG_MKDIR_P
Makefile.am:
configure.ac:
gl_LIBGMP
+gl_CONDITIONAL_HEADER([gmp.h])
AC_PROG_MKDIR_P
if test $HAVE_LIBGMP != yes; then
AC_LIBOBJ([mini-gmp-gnulib])
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:
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:
configure.ac:
gl_LIMITS_H
+gl_CONDITIONAL_HEADER([limits.h])
AC_PROG_MKDIR_P
Makefile.am:
configure.ac:
gl_MONETARY_H
gl_MONETARY_H_REQUIRE_DEFAULTS
+gl_CONDITIONAL_HEADER([monetary.h])
AC_PROG_MKDIR_P
Makefile.am:
configure.ac:
gl_HEADER_NET_IF
+gl_CONDITIONAL_HEADER([net/if.h])
AC_PROG_MKDIR_P
Makefile.am:
configure.ac:
gl_HEADER_NETINET_IN
+gl_CONDITIONAL_HEADER([netinet/in.h])
AC_PROG_MKDIR_P
Makefile.am:
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])
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>,
configure.ac:
gl_STDALIGN_H
+gl_CONDITIONAL_HEADER([stdalign.h])
AC_PROG_MKDIR_P
Makefile.am:
configure.ac:
gl_STDARG_H
+gl_CONDITIONAL_HEADER([stdarg.h])
AC_PROG_MKDIR_P
Makefile.am:
Depends-on:
configure.ac:
-AM_STDBOOL_H
+gl_STDBOOL_H
+gl_CONDITIONAL_HEADER([stdbool.h])
AC_PROG_MKDIR_P
Makefile.am:
configure.ac:
gl_STDDEF_H
gl_STDDEF_H_REQUIRE_DEFAULTS
+gl_CONDITIONAL_HEADER([stddef.h])
AC_PROG_MKDIR_P
Makefile.am:
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:
configure.ac:
gl_STDNORETURN_H
+gl_CONDITIONAL_HEADER([stdnoreturn.h])
AC_PROG_MKDIR_P
Makefile.am:
configure.ac:
gl_SYSEXITS
+gl_CONDITIONAL_HEADER([sysexits.h])
AC_PROG_MKDIR_P
Makefile.am: