[Top][All Lists]

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

Re: LT_* equivalent to AC_CHECK_LIB?

From: Bob Friesenhahn
Subject: Re: LT_* equivalent to AC_CHECK_LIB?
Date: Mon, 3 Jul 2006 16:31:47 -0500 (CDT)

support it.

For example, specifying just -lpng might not cause the linker to
implicitly add -lz.

Note that the linker that needs to figure this out is actually the dynamic
linker as such dependencies should be resolved at run-time, *not* at link
time.  A linker that does such resolution at link time actually re-adds
most of the problems that libtool currently causes.

Right. The linker needs to record that is dependent on when is built. When a library or application links using -lpng, a system with full dependency support does not require (or want) -lz to be specified. On the other hand, when using static libraries, or on systems lacking the dependency support, all the libraries involved need to be specified. Usually the configure script has no reliable way to know if a library is static or shared.

Under Microsoft Windows (and versions of AIX) it is definitely necessary for all libraries to be specified.

libpng is an interesting case because some users of libpng will use libz functions directly (e.g. to compute a PNG chunk CRC). In such cases, libz is also a direct dependency.

Bob Friesenhahn
GraphicsMagick Maintainer,

reply via email to

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