autoconf
[Top][All Lists]
Advanced

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

Re: using builddir/srcdir at configure time


From: David Fang
Subject: Re: using builddir/srcdir at configure time
Date: Sat, 25 Nov 2006 13:42:08 -0500 (EST)

> I am wondering if there's a reasonable way to use the top_builddir and
> top_srcdir values at configure time.  As in:
> CPPFLAGS="$CPPFLAGS -I$top_builddir/whatever"
>
> When simply used as above, the value is not defined.  It seems that the
> value for these variables only gets defined at the end, for output (or
> for recursive --help's).
>
> I guess I could simply duplicate the code which computes them, but of
> course that is not very appealing.  Is there a better way?

Hi,
        Do you really need those directory variables at configure time, or
will having them available in the Makefiles suffice?  I can't help but
guess, It almost looks like you want to use them like so (in automake):

AM_CPPFLAGS = -I$(top_builddir)/whatever -I$(top_srcdir)/whatever

If you're using those variables for something else other than compiling,
it may just be simpler to use what's available at make-time.

David Fang
Computer Systems Laboratory
Electrical & Computer Engineering
Cornell University
http://www.csl.cornell.edu/~fang/
        -- (2400 baud? Netscape 3.0?? lynx??? No problem!)





reply via email to

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