From: Bruno Haible Date: Fri, 18 Sep 2020 23:58:12 +0000 (+0200) Subject: Add back gl_SILENT. X-Git-Tag: v1.0~3623 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=edd319712bf17e8f2f55f782887573d52bf8d997;p=gnulib.git Add back gl_SILENT. * m4/gnulib-common.m4 (GL_TMP_FD, gl_SILENT): New macros. --- diff --git a/ChangeLog b/ChangeLog index 703da60585..eedff8894e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2020-09-18 Bruno Haible + + Add back gl_SILENT. + * m4/gnulib-common.m4 (GL_TMP_FD, gl_SILENT): New macros. + 2020-09-18 Paul Eggert c-stack-tests: fix -fsanitize=undefined false alarm diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index c9f8ca6db6..57343e440a 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -1,4 +1,4 @@ -# gnulib-common.m4 serial 59 +# gnulib-common.m4 serial 60 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, @@ -630,6 +630,22 @@ AC_DEFUN([gl_BIGENDIAN], AC_C_BIGENDIAN ]) +# A temporary file descriptor. +# Must be less than 10, because dash 0.5.8 does not support redirections +# with multi-digit file descriptors. +m4_define([GL_TMP_FD], 9) + +# gl_SILENT(command) +# executes command, but without the normal configure output. +# This is useful when you want to invoke AC_CACHE_CHECK (or AC_CHECK_FUNC etc.) +# inside another AC_CACHE_CHECK. +AC_DEFUN([gl_SILENT], +[ + exec GL_TMP_FD>&AS_MESSAGE_FD AS_MESSAGE_FD>/dev/null + $1 + exec AS_MESSAGE_FD>&GL_TMP_FD GL_TMP_FD>&- +]) + # 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.