autoconf
[Top][All Lists]
Advanced

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

Re: cascading variable resolution in AC_SUBST


From: Tim Van Holder
Subject: Re: cascading variable resolution in AC_SUBST
Date: 04 Oct 2001 12:53:31 +0200

On Wed, 2001-10-03 at 19:25, David Oleszkiewicz wrote:
> so i want to do something like this
> 
> configure.in:
> PROGNAME = "foo"
> DIR = "${bindir}/${PROG}"
> AC_SUBST(DIR)
> 
> myfile.h.in:
> #define DIR "@DIR@"
> 
> when things resolve out to myfile.h i get
> #define CONF_DIR "${exec_prefix}/foo"
> 
> this is because $bindir = ${exec_prefix}/bin
> i.e. we only get one level of variable resolution.
> Is there any way around this, or has anyone written a decently portable
> macro to make this work.

A typical way around is to leave such substitutions for the Makefile
(cfr. autoconf itself).
Using `eval' is not always advisable either; I think ${exec_prefix} and
the like are not guaranteed to have a value until some point near the
end of the configure script.





reply via email to

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