[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Iterating over variable using AC_DEFINE to get HAVE_FOO_varitem (sim
From: |
Daniel Leidert |
Subject: |
Re: Iterating over variable using AC_DEFINE to get HAVE_FOO_varitem (similar to AC_CHECK_HEADERS) |
Date: |
Mon, 17 May 2010 23:16:14 +0200 |
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