autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Improve AC_CACHE_VAL


From: Paolo Bonzini
Subject: Re: Improve AC_CACHE_VAL
Date: Mon, 02 Mar 2009 18:04:01 +0100
User-agent: Thunderbird 2.0.0.19 (Macintosh/20081209)

Eric Blake wrote:
> As discussed on the bug-autoconf list.  The heuristics cannot be made perfect 
> (code commonly calls AC_MSG_RESULT more often than AC_MSG_CHECKING; and 
> scenarios like the obsolete AC_COMPILE_CHECK, or improperly nested 
> AC_CACHE_CHECK, can alter the balance), but should be decent enough for most 
> well-written configure.ac.  And, as was pointed out, the presence or absence 
> of "(cached)" on stdout doesn't impact the correctness of the configure 
> results.

But it makes them confusing.  I really dislike this patch.  Isuggest
instead including macros for

  exec AS_MESSAGE_FD([])>/dev/null

and

  test "$silent" != yes && exec AS_MESSAGE_FD([])>&1

like this:

# AC_SILENT_PUSH
# --------------
# Silence AS_MESSAGE_FD up to the next AC_SILENT_POP.
AC_DEFINE([AC_SILENT_PUSH],
[_AC_SILENT_PUSH[]dnl
m4_pushdef([_AC_SILENT_PUSH, [:]])m4_pushdef([_AC_SILENT_POP], [:])])

AC_DEFINE([_AC_SILENT_PUSH],
[exec AS_MESSAGE_FD>/dev/null])

# AC_SILENT_PUSH
# --------------
# Stop silencing AS_MESSAGE_FD if this is the outermost AC_SILENT_POP.
AC_DEFINE([AC_SILENT_POP],
[m4_popdef([_AC_SILENT_PUSH])m4_popdef([_AC_SILENT_POP])dnl
_AC_SILENT_POP])

AC_DEFINE([_AC_SILENT_POP],
[test "$silent" != yes && exec AS_MESSAGE_FD>&1])

and let the user decide what to silence.

Paolo





reply via email to

[Prev in Thread] Current Thread [Next in Thread]