On 09/27/2010 07:46 PM, Eric Blake wrote:
I was able to reduce the problem
to the following trivial case:
--8<--------------------------cut here-------------------------->8--
AC_DEFUN([MY_MACRO],
[AS_VAR_PUSHDEF([VAR],[prefix_$1])
dnl This is the version used by AX_CFLAGS_GCC_OPTION.
dnl I believe that it is incorrect. It does not work on Autoconf>= 2.67.
VAR=the_value
You are correct that this will not work if VAR is an indirect variable
name. It all depends on whether $1 is determined to be an indirection.
The testcase with MY_MACRO([a=b]), which was in Ben's email, does point
out however a small efficiency regression. I think this is worth fixing
in Autoconf:
Up to 2.67, the AS_TR_SH would be evaluated at autoconf-time:
prefix_a_b=value
Now instead it is evaluated at configure-time:
as_VAR=`$as_echo "prefix_a=b" | $as_tr_sh`
eval "$as_VAR=value"
Paolo