Roumen Petrov <address@hidden> writes:
Russ Allbery wrote:
When you create a libtool library, libtool records every library
against which that library was linked into the *.la file. If you then
link another shared library against that shared library using libtool,
libtool reads that list of libraries from the *.la file and links the
new library against them as well.
But problem is not in the libtool.
Yes. It is.
This is not necessary. For distribution packages, it's actually
This depend from platform.
Yes. I said that. But it's harmful for the platforms that are in most
common use (anything that uses ELF, for example).
To see why, consider some library libfoo which uses readline. Suppose
that libreadline is linked and installed with libtool, so it has a *.la
file saying that it depends on libncurses. When you link libfoo
against libreadline using libtool, libtool will also link it against
libncurses, so it now acquires a dependency on libncurses as well.
This is one of the good samples. Libtool don't add dependency if is not
specified by project makefiles, i.e. LDFLAGS/LDADD.
But if readline project make rule specify that library has to linked
with a particular curses library, libtool has to use this rule, when
link an application with readline.
Only on non-ELF platforms.