From 15ce5a630b02af7c7104650dfb18e443b4111564 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 16 Aug 2020 12:12:32 +0200 Subject: Assume autoconf >= 2.64. * gnulib-tool (DEFAULT_AUTOCONF_MINVERSION): Set to 2.64. * DEPENDENCIES: Require Autoconf 2.64 or newer. * NEWS: Mention the changed requirement. * m4/00gnulib.m4 (_m4_divert_diversion, AC_DEFUN_ONCE): Remove macros. * m4/gnulib-common.m4 (AS_VAR_IF, AS_VAR_COPY): Remove macros. * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Quote pushdef'ed variables. * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Likewise. * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Likewise. * m4/warnings.m4 (gl_COMPILER_OPTION_IF): Likewise. (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C), gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++), gl_UNKNOWN_WARNINGS_ARE_ERRORS(Objective C)): Define through AC_DEFUN. * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C), gl_MANYWARN_ALL_GCC(C++)): Likewise. * m4/iconv.m4 (AM_ICONV): Define through AC_DEFUN_ONCE directly. * m4/libunistring.m4 (gl_LIBUNISTRING): Likewise. * m4/configmake.m4: Update comment. --- m4/warn-on-use.m4 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'm4/warn-on-use.m4') diff --git a/m4/warn-on-use.m4 b/m4/warn-on-use.m4 index 5c8ee45092..f36551c110 100644 --- a/m4/warn-on-use.m4 +++ b/m4/warn-on-use.m4 @@ -1,4 +1,4 @@ -# warn-on-use.m4 serial 6 +# warn-on-use.m4 serial 7 dnl Copyright (C) 2010-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -30,17 +30,15 @@ AC_DEFUN([gl_WARN_ON_USE_PREPARE], [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])), [Define to 1 if ]m4_defn([gl_decl])[ is declared even after undefining macros.])])dnl -dnl FIXME: gl_Symbol must be used unquoted until we can assume -dnl autoconf 2.64 or newer. for gl_func in m4_flatten([$2]); do AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl AC_CACHE_CHECK([whether $gl_func is declared without a macro], - gl_Symbol, + [gl_Symbol], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1], [@%:@undef $gl_func (void) $gl_func;])], - [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])]) - AS_VAR_IF(gl_Symbol, [yes], + [AS_VAR_SET([gl_Symbol], [yes])], [AS_VAR_SET([gl_Symbol], [no])])]) + AS_VAR_IF([gl_Symbol], [yes], [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1]) dnl shortcut - if the raw declaration exists, then set a cache dnl variable to allow skipping any later AC_CHECK_DECL efforts -- cgit v1.2.1