|
From: | Bob Friesenhahn |
Subject: | Re: foo-config scripts and removed .la files |
Date: | Mon, 21 May 2012 08:51:54 -0500 (CDT) |
User-agent: | Alpine 2.01 (GSO 1266 2009-07-14) |
On Mon, 21 May 2012, Werner LEMBERG wrote:
The question is what happens for static linking. For example, in the FreeType case, I get the following: > pkg-config --libs --static freetype2 -L/usr/local/lib -lfreetype -lz -lbz2 > pkg-config --libs freetype2 -L/usr/local/lib -lfreetype If I specify the .la flag for `libtool --mode=link', the above two case are properly covered...
Without the .la file, libtool needs to primarily trust the behavior of the compiler and linker. Attempting to intuit what linking with -lfoo can and will do without a libfoo.la file is not reasonably possible. Due to this, libtool simply passes -lfoo to the compiler if libfoo.la is not found in the known linker search path.
While static linking is sometimes useful (and sometimes required), the trend is that libraries are always built as shared libraries and dynamic linking is used.
Bob -- Bob Friesenhahn address@hidden, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
[Prev in Thread] | Current Thread | [Next in Thread] |