[Top][All Lists]

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

Re: *_LDFLAGS vs. *_LDADD vs. *_LIBADD

From: Bruno Haible
Subject: Re: *_LDFLAGS vs. *_LDADD vs. *_LIBADD
Date: Sat, 9 Sep 2006 21:03:26 +0200
User-agent: KMail/1.9.1

Ralf Wildenhues wrote:
> Actually, you should not put `-l*' into LDFLAGS at all,
> those belong into LIBS, *LDADD, or lib*_LIBADD (the latter being useful
> for libtool libraries only).

This is not how automake documents these variables. The doc (node
"Libtool Flags") says that I can augment only two variables:
  - libgnu_la_LIBADD, reserved for .lo or .la files, not -L, -l, -rpath options,
  - libgnu_la_LDFLAGS.

So, for libraries, there is no *_LDADD variable.

And for executables, an *_LDADD variable exists, but the automake doc says
the opposite of what you say:

   `PROG_LDADD' is inappropriate for passing program-specific linker
   flags (except for `-l', `-L', `-dlopen' and `-dlpreopen').  So, use the
   `PROG_LDFLAGS' variable for this purpose.


reply via email to

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