
Both the C++ implementation and the Java implementation of SAGA use the environment variable SAGA_LOCATION to point to the location of the SAGA installation. Right now, it is therefore impossible to use both the C++ and Java SAGA implementation simultaneously without changing SAGA_LOCATION all the time. Even worse, future SAGA implementations may also reuse SAGA_LOCATION.
It seems desirable to avoid such clashes between multiple SAGA installations in general. What would be the best generic way to accomplish that? Should the SAGA spec define a global environment variable namespace (e.g. LSU_C++_SAGA_LOCATION, VU_JAVA_SAGA_LOCATION)? And are such environment variables really needed in all implementations in the first place?
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. I now, this doesn't answer your general question. But if all implementations went this way we wouldn't have the initial problem, no? HTH Regards Hartmut