Nick Bowler and Paul Eggert wrote:
> >    AS_VAR_SET_IF([my_cv_no_printing], [my_cv_no_printing=hello])
> 
>    AS_VAR_SET_IF([my_cv_no_printing], [], [my_cv_no_printing=hello])

But then I lose
  - the various AC_DIAGNOSE checks that are in AC_CACHE_VAL,
  - possible future improvements / changes to the caching mechanism.
    (I find it a dangerous bet to assume that the caching will only
    be based on a shell variable lookup and not something else.)

I would prefer to define gl_CACHE_VAL_SILENT as an invocation of
AC_CACHE_VAL that merely neutralizes the _AS_ECHO_N call. Such as
(untested):

AC_DEFUN([gl_CACHE_VAL_SILENT],
[
  m4_pushdef([_AS_ECHO_N], [])
  AC_CACHE_VAL([$1], [$2])
  m4_popdef([_AS_ECHO_N])
])

Bruno


Reply via email to