[GRASS-dev] How to specify custom include directories

Glynn Clements glynn at gclements.plus.com
Thu Jul 12 07:23:34 EDT 2007


David Finlayson wrote:

> First time compiling GRASS on SuSE. I do not have su privileges on this
> machine and so I am forced to build my entire tool chain in my home
> directory ($HOME)=/we/davidf).
> 
> So far fftw-3.1.2, gdal-1.4.2 and proj-4.5.0 have all compiled using the
> following:
> 
> ./configure --prefix=$HOME
> make
> make install
> 
> Which has built a directory tree in $HOME like this:
> 
> $HOME/bin
> $HOME/include
> $HOME/lib
> $HOME/man
> $HOME/share
> 
> Now, trying the same with grass results in a configure error:
> 
> albacore src/grass-6.2.cvs_src_snapshot_2007_07_07> ./configure
> --prefix=$HOME --enable-64bit --with-libs=/usr/lib64
> checking host system type... x86_64-unknown-linux-gnu
> checking for gcc... gcc
> checking whether the C compiler (gcc  ) works... yes
> ... etc ...
> checking for deflate in -lz... yes
> checking for location of External PROJ.4 includes...
> checking for proj_api.h... no
> configure: error: *** Unable to locate External PROJ.4 includes.
> 
> However, proj_api.h is in $HOME/include
> 
> I have tried adding --includedir=$HOME/include to the above but that didn't
> change anything.  I'm sure it's something simple. How do I tell configure
> where my local includes are (and why didn't --prefix=$HOME work?)

Use the --with-includes= and/or --with-libs= switches to specify
additional -I/-L switches to be used for all headers and libraries, or
use the package-specific --with-<package>-includes= and/or
--with-<package>-libs= switches to add directories for specific
packages.

Also, ensure that $LD_LIBRARY_PATH contains $HOME/lib.

The --includedir= switch indicates where to install the package's own
header files, not where it can find other packages' header files.

But GRASS' doesn't honour those switches; everything goes into
<prefix>/grass-<version>, except for the grass62 (etc) script which
goes into the directory specified by the --bindir= switch, or into
<prefix>/bin if not specified.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list