Gavin Smith wrote:
> %
> 
> AC_HELP_STRING from threadlib.m4.  Also used in libgcrypt.m4.  Running 
> autoupdate on those files and editing the result gives the patch I've 
> attached.
> 
> %
> 
> $as_echo_n is used in gnulib-common.m4 around a call to AC_CACHE_VAL:
> 
> # gl_CACHE_VAL_SILENT(cache-id, command-to-set-it)
> # is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not
> # output a spurious "(cached)" mark in the midst of other configure output.
> # This macro should be used instead of AC_CACHE_VAL when it is not surrounded
> # by an AC_MSG_CHECKING/AC_MSG_RESULT pair.
> AC_DEFUN([gl_CACHE_VAL_SILENT],
> [
>   saved_as_echo_n="$as_echo_n"
>   as_echo_n=':'
>   AC_CACHE_VAL([$1], [$2])
>   as_echo_n="$saved_as_echo_n"
> ])
> 
> AC_CACHE_VAL calls _AS_ECHO_N which is defined in m4sh.sh from autoconf.  
> The as_echo_n shell variable is not referred to at all, so this 
> redefinition appears to be ineffectual.  gl_CACHE_VAL_SILENT is not used 
> from gnulib-common.m4 itself but is used from a handful of other 
> modules.  It is used in the stdarg module, but the issue of spurious 
> output only arises if the "va_copy" function was not found.
> The other files using gl_CACHE_VAL_SILENT were
> 
> floorf.m4, floorl.m4, floor.m4, ceilf.m4, ceilr.m4, ceil.m4
> 
> but I haven't tested whether these can produce spurious output.
> 

I'm committing these patches, for these two problems.


2020-09-27  Gavin Smith  <gavinsmith0...@gmail.com>

        Avoid "warning: The macro `AC_HELP_STRING' is obsolete".
        * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Use AS_HELP_STRING instead
        of AC_HELP_STRING.
        * m4/libgcrypt.m4 (AM_PATH_LIBGCRYPT): Likewise.

2020-09-27  Bruno Haible  <br...@clisp.org>

        Avoid "warning: $as_echo_n is obsolete" from autoconf 2.69c.
        Reported by Gavin Smith <gavinsmith0...@gmail.com> in
        <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00151.html>.
        * m4/gnulib-common.m4 (gl_CACHE_VAL_SILENT): Use gl_SILENT.

>From a20f05df0897a66fcfca7aaaa637e9dd84722d65 Mon Sep 17 00:00:00 2001
From: Bruno Haible <br...@clisp.org>
Date: Sun, 27 Sep 2020 21:03:24 +0200
Subject: [PATCH 1/2] Avoid "warning: $as_echo_n is obsolete" from autoconf
 2.69c.

Reported by Gavin Smith <gavinsmith0...@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00151.html>.
* m4/gnulib-common.m4 (gl_CACHE_VAL_SILENT): Use gl_SILENT.
---
 ChangeLog           | 7 +++++++
 m4/gnulib-common.m4 | 9 ++++-----
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ec6ab91..43e84b5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2020-09-27  Bruno Haible  <br...@clisp.org>
 
+	Avoid "warning: $as_echo_n is obsolete" from autoconf 2.69c.
+	Reported by Gavin Smith <gavinsmith0...@gmail.com> in
+	<https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00151.html>.
+	* m4/gnulib-common.m4 (gl_CACHE_VAL_SILENT): Use gl_SILENT.
+
+2020-09-27  Bruno Haible  <br...@clisp.org>
+
 	extensions: Simplify last commit.
 	* m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't require
 	AC_GNU_SOURCE ever.
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index 57343e4..a036454 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 60
+# gnulib-common.m4 serial 61
 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,
@@ -653,10 +653,9 @@ AC_DEFUN([gl_SILENT],
 # by an AC_MSG_CHECKING/AC_MSG_RESULT pair.
 AC_DEFUN([gl_CACHE_VAL_SILENT],
 [
-  saved_as_echo_n="$as_echo_n"
-  as_echo_n=':'
-  AC_CACHE_VAL([$1], [$2])
-  as_echo_n="$saved_as_echo_n"
+  gl_SILENT([
+    AC_CACHE_VAL([$1], [$2])
+  ])
 ])
 
 dnl Expands to some code for use in .c programs that, on native Windows, defines
-- 
2.7.4

>From d1f529d63b71c25616269b2ed2dc429adc1b586d Mon Sep 17 00:00:00 2001
From: Gavin Smith <gavinsmith0...@gmail.com>
Date: Sun, 27 Sep 2020 21:06:51 +0200
Subject: [PATCH 2/2] Avoid "warning: The macro `AC_HELP_STRING' is obsolete".

* m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Use AS_HELP_STRING instead
of AC_HELP_STRING.
* m4/libgcrypt.m4 (AM_PATH_LIBGCRYPT): Likewise.
---
 ChangeLog       | 7 +++++++
 m4/libgcrypt.m4 | 6 +++---
 m4/threadlib.m4 | 6 +++---
 3 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 43e84b5..428187f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2020-09-27  Gavin Smith  <gavinsmith0...@gmail.com>
+
+	Avoid "warning: The macro `AC_HELP_STRING' is obsolete".
+	* m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Use AS_HELP_STRING instead
+	of AC_HELP_STRING.
+	* m4/libgcrypt.m4 (AM_PATH_LIBGCRYPT): Likewise.
+
 2020-09-27  Bruno Haible  <br...@clisp.org>
 
 	Avoid "warning: $as_echo_n is obsolete" from autoconf 2.69c.
diff --git a/m4/libgcrypt.m4 b/m4/libgcrypt.m4
index f56cc1b..19d514f 100644
--- a/m4/libgcrypt.m4
+++ b/m4/libgcrypt.m4
@@ -1,5 +1,5 @@
 # libgcrypt.m4 - Autoconf macros to detect libgcrypt
-# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2018 g10 Code GmbH
+# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2018, 2020 g10 Code GmbH
 #
 # This file is free software; as a special exception the author gives
 # unlimited permission to copy and/or distribute it, with or without
@@ -9,7 +9,7 @@
 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 #
-# Last-changed: 2018-11-13
+# Last-changed: 2020-09-27
 
 
 dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION,
@@ -30,7 +30,7 @@ dnl
 AC_DEFUN([AM_PATH_LIBGCRYPT],
 [ AC_REQUIRE([AC_CANONICAL_HOST])
   AC_ARG_WITH(libgcrypt-prefix,
-            AC_HELP_STRING([--with-libgcrypt-prefix=PFX],
+            AS_HELP_STRING([--with-libgcrypt-prefix=PFX],
                            [prefix where LIBGCRYPT is installed (optional)]),
      libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
   if test x"${LIBGCRYPT_CONFIG}" = x ; then
diff --git a/m4/threadlib.m4 b/m4/threadlib.m4
index 94441f6..1da5fc0 100644
--- a/m4/threadlib.m4
+++ b/m4/threadlib.m4
@@ -1,4 +1,4 @@
-# threadlib.m4 serial 27
+# threadlib.m4 serial 28
 dnl Copyright (C) 2005-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,
@@ -398,8 +398,8 @@ AC_DEFUN([gl_THREADLIB_EARLY_BODY],
     [m4_divert_text([DEFAULTS], [gl_use_threads_default=])])
   m4_divert_text([DEFAULTS], [gl_use_winpthreads_default=])
   AC_ARG_ENABLE([threads],
-AC_HELP_STRING([--enable-threads={isoc|posix|isoc+posix|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
-AC_HELP_STRING([--disable-threads], [build without multithread safety])]),
+AS_HELP_STRING([--enable-threads={isoc|posix|isoc+posix|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
+AS_HELP_STRING([--disable-threads], [build without multithread safety])]),
     [gl_use_threads=$enableval],
     [if test -n "$gl_use_threads_default"; then
        gl_use_threads="$gl_use_threads_default"
-- 
2.7.4

Reply via email to