[Distutils] How to find out the default include path

Pearu Peterson pearu@cens.ioc.ee
Thu Oct 24 06:13:01 2002


On Thu, 24 Oct 2002, M.-A. Lemburg wrote:

> Mats Wichmann wrote:
> > 
> > Depends on what you mean by "default" :-)
> 
> What I'm working on is an automatic system for finding 3rd
> party libs to link against, e.g. say I have an extension
> which links against OpenSSL I want the setup.py to
> automatically find the .so and .h files.

Have you looked at scipy/scipy_distutils/system_info.py?
It does exactly this thing for various 3rd party software like
atlas,blas,lapack,X11,fftw,etc. and is meant to be easily extendable.
See

http://scipy.net/cgi-bin/viewcvsx.cgi/*checkout*/scipy/scipy_distutils/system_info.py?content-type=text/plain

> > For any given Linux system, the linker will search
> > libraries in locations built in to the compilation
> > system (I think your list is correct there), plus
> > whatever's listed in /etc/ld.so.conf.  Sometimes
> > assisted or hampered by what's in /etc/ld.so.cache :-{
> 
> Does the linker search there too or only the dynamic
> one at load time ?

I think /etc/ld.so.conf is looked during the load time, linker never uses
it.

HTH,
Pearu