autoconf
[Top][All Lists]
Advanced

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

Re: AC_SUBST for variables with AS_SET_VAR


From: Ralf Wildenhues
Subject: Re: AC_SUBST for variables with AS_SET_VAR
Date: Sat, 21 Aug 2010 08:12:26 +0200
User-agent: Mutt/1.5.20 (2010-04-22)

Hi Jason,

* Jason Curl wrote on Thu, Aug 19, 2010 at 09:50:18PM CEST:
> I'm trying to write a macro that will iterate through a list of
> libraries looking for a function. If it is found, I wish to do a
> AC_SUBST on a variable dependent on the name of the library.

The missing bit is that AC_SUBST wants its first argument to be an
m4-time literal.  A shell variable doesn't fit the bill.  Likewise
for AC_DEFINE.  This is because other tools like autoheader and
automake need to know the variable/define names.

So, you can either move the AC_SUBST out of the loop and do them in the
callers of the macro, where you know the literal name of the variable,
or replace the 'for lxlib' shell loop with an m4 AC_FOREACH loop and
adjust loop contents.

Hope that helps.

Cheers,
Ralf



reply via email to

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