Subject: Re: linking against libs in /usr/local
To: Andrew Basterfield <>
From: Matthias Buelow <>
List: netbsd-users
Date: 03/04/2002 01:43:07
Andrew Basterfield writes:

>forever? What is the correct procedure for getting round this? I should
>just download & install /usr/pkgsrc but I don't have the bandwidth & disk
>space available...

Specify -Wl,-R/usr/local/lib on the linker cc command line
(or just -R... if ld is invoked directly, which it normally isn't.)
I guess with autoconf you either have to edit generated
Makefiles manually or you might try setting the correct LDFLAGS
on configure invocation like
$ LDFLAGS=-L/usr/local/lib\ -Wl,-R/usr/local/lib\ additional_flags ./configure --blah-blah

(% env LDFLAGS=... ./configure with csh)
Unfortunately, to my knowledge, the autoconf configure script
doesn't really have a standard mechanism of _adding_ parameters
to common build variables...