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: Tom Tromey
Subject: Re: Should automake add X_LIBS to LIBS automatically?
Date: 19 Jul 2001 19:39:27 -0600

>>>>> ">" == address@hidden it <address@hidden> writes:

>> Hi! I'm trying automake. I can't understand why automake doesn't
>> add X_LIBS to LIBS automatically when it finds AC_PATH_XTRA in
>> confgigure.in

I considered this a long time ago, in the early days of automake.  I
decided against doing it, because I wanted it to be possible for a
package to include both a program that used the X libraries and one
that did not.  In general it is easier for the user to add options to
a build than to take them away.

>> And what's the correct way to do this manually? Either
>> export LIBS="$LIBS $X_LIBS"
>> in configure.in after AC_PATH_EXTRA or

Nope.

>> LIBS = @LIBS@ @X_LIBS@ MY_LIBS

Nope.

>> Is there a  cleaner way?

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.

Tom



reply via email to

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