autoconf
[Top][All Lists]
Advanced

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

Re: Negation semantics for LD_FLAGS?


From: Brian Dessent
Subject: Re: Negation semantics for LD_FLAGS?
Date: Fri, 21 Mar 2008 18:56:30 -0700

Bill McGonigle wrote:

> I'm looking for a way to tell configure _not_ to look in a directory
> for libraries, in this case /usr/local/lib.  This would be the

I think you're attributing a behavior to autoconf that doesn't exist. 
Nowhere does autoconf add -L/usr/local/lib unless you explicitly code it
as such in a test.  That the linker searches /usr/local/lib by default
is an aspect of how it was built and configured.  If you're using the
GNU linker, look at the default link scripts.  For example on a linux
system, the top of /usr/lib/ldscripts/elf_i386.x contains:

SEARCH_DIR("/usr/i386-linux/lib"); SEARCH_DIR("/usr/local/lib");
SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");

These are the locations the linker searches by default with no options
specified.  This is outside of the domain of autoconf.  If you want to
keep the linker from searching the dirs specified in the link script,
you could use -nostdlib followed by the list of dirs to use, e.g.
LDFLAGS='-Wl,-nostdlib -L/usr/lib -L/lib'.

Brian




reply via email to

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