automake
[Top][All Lists]
Advanced

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

Re: Should automake add X_LIBS to LIBS automatically?


From: Richard Boulton
Subject: Re: Should automake add X_LIBS to LIBS automatically?
Date: Fri, 20 Jul 2001 02:44:46 +0100
User-agent: Mutt/1.2.5i

On Thu, Jul 19, 2001 at 07:39:27PM -0600, Tom Tromey wrote:
> Yes.  LIBS is a user variable.  You're not supposed to set it in
> configure.in or Makefile -- the user is supposed to be allowed to set
> it.  People break this rule, but really they shouldn't.
> 
> Instead you can use the `program_LDADD' variable.  This is
> documented.  I'll add @X_LIBS@ as an example in the docs, since it
> seems like a particularly useful one.

Is there any way to add extra values to the base LIBS variable in a
Makefile.am, then?  For CFLAGS, you can use AM_CFLAGS, but there doesn't
seem to be an equivalent for LIBS.

The above just about works, but I have a makefile with 35 entries in
_PROGRAMS, some of which are conditional, and I want to add the same value
to LIBS for each of them.  CVS automake gives errors of "LIBS was set
with `+=' and is now set with `=' ".

I don't really want to have 35 lines in my makefile saying
prog1_LDADD = $(MYLIBS)
prog2_LDADD = $(MYLIBS)
...
prog35_LDADD = $(MYLIBS)

Being able to do "AM_LIBS = $(MYLIBS)" would be much nicer.

In fact, I'll state this as a feature request: I'd like to be able to set
values for AM_LIBS and have these used wherever LIBS is used.

-- 
Richard



reply via email to

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