bug-gnulib
[Top][All Lists]
Advanced

[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: Mon, 11 Sep 2006 15:10:11 +0200
User-agent: KMail/1.9.1

Ralf Wildenhues wrote:
> > 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.
> 
> In what way is this opposite to my statement?  -l is listed as exception
> in parentheses.

The options that I need to put there (from $(LTLIBICONV) or $(LIBICONV) etc.)
can contain -L, -l, and -rpath / -Wl,-rpath options. The latter should not
be added to PROG_LDADD, says the automake doc. So we must add them to
PROG_LDFLAGS.

It's not only the lib-link.m4 macros which produce -L, -l, -rpath options
together. pkgconfig descriptions (its 'Libs:' field) and xyz-config scripts
do the same (at least for -L and -l). Therefore it is unrealistic to ask
people to put the -L options into one variable and the -l options into
another variable.

Bruno




reply via email to

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