[Distutils] How to find out the default include path
Pearu Peterson
pearu@cens.ioc.ee
Wed Oct 23 09:39:02 2002
On Wed, 23 Oct 2002, M.-A. Lemburg wrote:
> Pearu Peterson wrote:
> > On Wed, 23 Oct 2002, M.-A. Lemburg wrote:
> >
> >
> > Under Linux I would suggest the following defaults:
> >
> > libs: /usr/local/lib, /opt/lib, /usr/lib
> > headers: /usr/local/include, /opt/include, /usr/include
>
> Is /opt/include on the compiler's default include path or not ?
> Dito for /opt/lib ?
Depends on the compiler. For example, the default prefix for Intel
compiler is /opt/intel. Though, /opt is more often used on other unices
than on Linux, but still used also on Linux (depends on the background
of a local sysadmin).
> BTW, is there a way to query the default search path for
> header files in GCC ? I have so far only found the default
> path for libs.
In principle, one should let the compiler to take care of its paths.
Anyway, the answer depends on the version of the compiler. For example,
in the case of gcc-3.1, you can study the output of 'gcc -v'.
For earlier versions, 2.95 for instance, you can get the lib path and then
extrapolate from that the include path (by ../../../../include/g++-v or
something like that).
Pearu