[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_CACHE_CHECK enhancement
From: |
Noah Misch |
Subject: |
Re: AC_CACHE_CHECK enhancement |
Date: |
Sat, 29 Jan 2005 04:53:57 -0800 |
User-agent: |
Mutt/1.5.6i |
On Sat, Jan 29, 2005 at 01:14:06PM +0100, Stepan Kasal wrote:
> * lib/autoconf/general.m4 (AC_CACHE_CHECK): Use `no' as the
> default result to print, of the variable remains unset.
Perhaps `(empty)' or `(unset)' instead? `no' is a value folks use, so we should
use a different value to indicate this condition.
> m4_defun([AC_CACHE_CHECK],
> [AC_MSG_CHECKING([$1])
> AC_CACHE_VAL([$2], [$3])dnl
> -AC_MSG_RESULT_UNQUOTED([AS_VAR_GET([$2])])])
> +AC_MSG_RESULT_UNQUOTED([AS_VAR_GET([$2], [no])])])
Would it be clearer and more flexible to write `AS_VAR_GET($2-some_default)'
here and just
> -# AS_VAR_GET(VARIABLE)
> -# --------------------
> +# AS_VAR_GET(VARIABLE, [DEFAULT])
> +# -------------------------------
> # Get the value of the shell VARIABLE.
> # Evaluates to $VARIABLE if there are no indirection in VARIABLE,
> # else into the appropriate `eval' sequence.
> +# If the VARIABLE is unset, DEFAULT is used.
modify this comment to indicate that AS_VAR_GET evaluates to ${VARIABLE}, so
readers know they can use `FOO-BAR', `FOO+BAR', `10', etc?