[prev in list] [next in list] [prev in thread] [next in thread] 

List:       autoconf
Subject:    Re: Iterating over variable using AC_DEFINE to get HAVE_FOO_varitem (similar to AC_CHECK_HEADERS)
From:       Daniel Leidert <daniel.leidert.spam () gmx ! net>
Date:       2010-05-17 21:16:14
Message-ID: 1274130974.24581.26.camel () haktar ! wgdd ! de
[Download RAW message or body]

Am Montag, den 17.05.2010, 14:30 -0600 schrieb Eric Blake:
> On 05/17/2010 01:44 PM, Daniel Leidert wrote:

[..]
> I meant that it would be worth writing an open-coded shell for loop:
> 
> for lingua in $ALL_LINGUAS; do
>   AC_MSG_NOTICE([...])
>   ...
> end
[..]
> > Unfortunately the shell loop didn't work for me. I tried this:
> > 
> >> ALL_LINGUAS="de fr nl"
> >> for lang in $ALL_LINGUAS
> >> do
> >> 	AC_MSG_NOTICE([Having lingua $lang])dnl debugging
> >> 	AH_TEMPLATE(AS_TR_CPP([HAVE_LINGUA_$lang]), [Define to 1 for $lang lingua support.])
> >> 	AC_DEFINE(AS_TR_CPP([HAVE_LINGUA_$lang]))
> >> done
> > 
> > It did split the variable correctly, but AH_TEMPLATES didn't seem to
> > work. Maybe I did something wrong (quotation maybe?)?
> 
> Ah - to use an indirect variable (as in the value of HAVE_LINGUA_$lang),
> you have to us AS_VAR_PUSHDEF and AS_VAR_POPDEF.  AH_TEMPLATE is a no-op
> unless it has a literal argument, but you gave it an indirect argument.

Many thanks for your explanations. I will check AS_VAR_PUSHDEF and
AS_VAR_POPDEF asap. ATM I have a working solution :)

Regards, Daniel



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic