bug-autoconf
[Top][All Lists]
Advanced

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

Re: Bug #593838: AX_CFLAGS_GCC_OPTION misuses AS_VAR_PUSHDEF variable


From: Paolo Bonzini
Subject: Re: Bug #593838: AX_CFLAGS_GCC_OPTION misuses AS_VAR_PUSHDEF variable
Date: Fri, 01 Oct 2010 14:51:17 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100907 Fedora/3.1.3-1.fc13 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.3

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



reply via email to

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