From ca10bd45cd6a8a6e92a96398999cf82453364c29 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 27 Sep 2020 21:56:10 +0200 Subject: [PATCH] Avoid "warning: The macro `AC_PROG_CC_STDC' is obsolete". Reported by Gavin Smith in . * m4/gnulib-common.m4 (gl_PROG_CC_C99): Use AC_PROG_CC_C99 or AC_PROG_CC, depending on the Autoconf version. --- ChangeLog | 8 ++++++++ m4/gnulib-common.m4 | 26 ++++++++++---------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 428187f419..cf7859dd95 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2020-09-27 Bruno Haible + + Avoid "warning: The macro `AC_PROG_CC_STDC' is obsolete". + Reported by Gavin Smith in + . + * m4/gnulib-common.m4 (gl_PROG_CC_C99): Use AC_PROG_CC_C99 or + AC_PROG_CC, depending on the Autoconf version. + 2020-09-27 Gavin Smith Avoid "warning: The macro `AC_HELP_STRING' is obsolete". diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index a036454dbd..8a40713c07 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -1,4 +1,4 @@ -# gnulib-common.m4 serial 61 +# gnulib-common.m4 serial 62 dnl Copyright (C) 2007-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, @@ -483,23 +483,17 @@ AC_DEFUN([gl_FEATURES_H], # gl_PROG_CC_C99 # Modifies the value of the shell variable CC in an attempt to make $CC # understand ISO C99 source code. -# This is like AC_PROG_CC_C99, except that -# - AC_PROG_CC_C99 does not mix well with AC_PROG_CC_STDC -# , -# but many more packages use AC_PROG_CC_STDC than AC_PROG_CC_C99 -# . -# Remaining problems: -# - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options -# to CC twice -# . -# - AC_PROG_CC_STDC is likely to change now that C11 is an ISO standard. AC_DEFUN([gl_PROG_CC_C99], [ - dnl Change that version number to the minimum Autoconf version that supports - dnl mixing AC_PROG_CC_C99 calls with AC_PROG_CC_STDC calls. - m4_version_prereq([9.0], - [AC_REQUIRE([AC_PROG_CC_C99])], - [AC_REQUIRE([AC_PROG_CC_STDC])]) + dnl Just use AC_PROG_CC_C99. + dnl When AC_PROG_CC_C99 and AC_PROG_CC_STDC are used together, the substituted + dnl value of CC will contain the C99 enabling options twice. But this is only + dnl a cosmetic problem. + dnl With Autoconf >= 2.69c, use AC_PROG_CC since it implies AC_PROG_CC_C99; + dnl this avoids a "warning: The macro `AC_PROG_CC_C99' is obsolete." + m4_version_prereq([2.69c], + [AC_REQUIRE([AC_PROG_CC])], + [AC_REQUIRE([AC_PROG_CC_C99])]) ]) # gl_PROG_AR_RANLIB -- 2.39.5