Subject: Use of libtool in pkgs (correction)
To: None <tech-pkg@NetBSD.ORG>
From: Todd Vierling <>
List: tech-pkg
Date: 07/15/1998 07:15:29
One minor nit about the libtool instructions:

: When linking programs that depend on thse libraries _before_ they are
: installed, preface the cc or ld line with "${LIBTOOL} --mode=link", and it
: will find the correct libraries (static or shared).

I found that libtool will not allow you to specify a relative path in -L
(such as -L../somelib), because it is trying to force you to change that
argument to be the .la file.  For example:

${LIBTOOL} --mode=link ${CC} -o someprog -L../somelib -lsomelib

won't work; it needs to be changed to:

${LIBTOOL} --mode=link ${CC} -o someprog ../somelib/

and it will DTRT with the libraries.  If you *must* use a relative path with
-L, and you are not going to run this program before installing it, you can
omit the use of libtool during link and install of this program if you add
the subdirectory ".libs" in your -L command:

${CC} -o someprog -L../somelib/.libs -lsomelib

This is less preferable to the method above.

-- Todd Vierling (Personal; Bus.