[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Specifying path to headers and libraries with configure
From: |
Dan Kegel |
Subject: |
RE: Specifying path to headers and libraries with configure |
Date: |
Fri, 5 Apr 2002 08:14:59 -0800 |
Ollie Cook wrote:
> I have an application which links against librrd
> and I'd like my configure script to find where the
> rrd.h header and librrd.a library files are so
> that it can pass the paths to the compiler with -I and -L
>
> I'm currently doing it with ...
> --with-includes=LIST
> LIST is a colon separated list of include paths
> --with-libraries=LIST
> LIST is a colon separated list of libraries paths
> ...
> would appreciate some advice on the proper way to check
> for libraries and header files in unusual
> directories (RRDtool keeps them in /usr/local/rrd-x.y.z/(include|lib)/).
I tend to do it with e.g. --with-rrd=PATH
where PATH might be /usr/local/rrd-x.y.z
That adds the right thing to both the include path and the library path.
PATH defaults to /usr.
This has worked well for me with, say, CORBA libraries.
The way I go about this is to write a single autoconf macro
for the package I want to support (say, rrd), then use that
macro in all apps I write that use that package. Check
out the (still ugly) corbaconf project for an example.
- Dan