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