automake
[Top][All Lists]
Advanced

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

Re: Using and detecting environment variables as flags


From: Bruce Korb
Subject: Re: Using and detecting environment variables as flags
Date: Tue, 25 May 2004 19:42:47 -0700

John Ling wrote:
> 
> I think I've figured out the way to do it:
> 
> In my Makefile.am I put in a line like 'export CONFIGURE-TIME_LIBS=$(LIBS)'
> 
> Then in my Makefile.loader I put in my LIBS definition:
> 
> LIBS = $(CONFIGURE-TIME_LIBS) ...

You might have better luck with CONFIGURE_TIME_LIBS ;-)

>>How do I reference such a variable?
>>
>>In addition, depending on the value of this variable, I then want to
>>pass a signal from my Makefile.am to yet another Makefile which is
>>called from Makefile.am.  This signal is to tell the second Makefile to
>>add an -lz in its LIBS definition.
>>
>>How do I do this?  In what way can I send such a flag/signal?

Methinks what you want is along the lines of:

  AC_CHECKLIB(z, gzopen)

and that will add -lz to LIBS if gzopen() is found in it.
%LIBS% will be inserted by automake in all your Makefile.in files.

Good luck. - Bruce




reply via email to

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