autoconf
[Top][All Lists]
Advanced

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

Re: how to use libraries in /usr/local


From: Steven G. Johnson
Subject: Re: how to use libraries in /usr/local
Date: Thu, 24 May 2001 14:29:27 -0400 (EDT)

Russ Allbery writes:
> What I'd love to see is a way to pass the configure script a whole
> list of directories into which software may be installed, not just
> /usr/local and /usr/pubsw but also /usr/pubsw/apps/db3 and
> /usr/pubsw/apps/openssl and other directories that have a lib and
> include structure, ...

What's wrong with just doing:

./configure LDFLAGS="-L/usr/local/lib -L/usr/pubsw/lib"
CPPFLAGS="-I/usr/local/include -I/usr/pubsw/include"

and so on?  (You could also set these environment variables in your
config.site so that you don't have to do them for each configure run.)  
It boggles my mind to learn how many people don't know about this...

[ Note that the ./configure FOO=bar syntax is new in autoconf 2.50;
previously, you would do: env FOO=bar ./configure ]

I'm really inclined to dislike most of the --with-foo=PATH hacks that I
see (as you point out, many of them do the wrong thing).

Besides, anything other than specifying the -L and -I flags directly is
perhaps non-portable, since autoconf has no way of knowing whether your
compiler uses -L/-I or some other flags to specify paths.  (Although it's
conceivable that you could write a check for this by creating a directory
and putting some header/library file in it, and then trying to
compile/link.)

There needs to be some improvement, either in autoconf or in the manual or
in educating users/developers; getting users to tell autoconf where to
look for libraries has been one of the single biggest problems I have had.
(The fact that every package does something different doesn't help
matters.)

Steven




reply via email to

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