[Top][All Lists]

[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

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 after AC_PATH_EXTRA or




>> Is there a  cleaner way?

Yes.  LIBS is a user variable.  You're not supposed to set it 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.


reply via email to

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