[SAGA-RG] usage of SAGA_LOCATION

Hartmut Kaiser hkaiser at cct.lsu.edu
Wed Oct 15 09:32:59 CDT 2008


> > > In the latest release CCT's SAGA C++ implementation doesn't require
> a set
> > > SAGA_LOCATION environment variable anymore (at least as long as the
> > > installation has not been moved from the --prefix directory it was
> > > configured and built with). If no $SAGA_LOCATION is set it
> internally
> > > defaults to the directory used during ./configure --prefix=... This
> doesn't
> > > free you from the need to properly set your LD_LIBRARY_PATH, but
> that's
> > > another issue, I guess.
> 
> The makefiles in LSU's SAGA C++ implementation (e.g.
> $SAGA_LOCATION/share/saga/make/saga.application.mk) still need either
> SAGA_ROOT or SAGA_LOCATION to be set. A user that writes a SAGA app
> using an existing SAGA C++ installation therefore still needs to set
> SAGA_LOCATION, otherwise he cannot include saga.application.mk in the
> makefile of his own application. It's not clear to me whether that's a
> bug or not, but it seems to conflict with the quoted statement.

That's only at build time. And no that's not a bug. If you want to use the
saga makesystem you'll have to tell it where to look. 

Another option not requiring to have a set $SAGA_LOCATION is to use the
generated saga-config script which gives you the needed commandline
arguments for the compiler and linker to build a application:

  g++ `saga-config --cflags` -c your_saga_app.cpp
  g++ `saga-config --lflags` -o your_saga_app your_saga_app.o

Any ready built saga application doesn't need to have the SAGA_LOCATION set
(see my other post).

Regards Hartmut




More information about the saga-rg mailing list