From ce5bb78ce626da4c2c9c3a33911f678e3a22febc Mon Sep 17 00:00:00 2001 From: fitzsim Date: Mon, 12 Sep 2005 23:50:01 +0000 Subject: 2005-09-12 Thomas Fitzsimmons PR libgcj/23762 * shlibpath.m4: New file. * configure.ac: If libltdl is being used call AC_LTDL_SHLIBPATH macro. * gnu/classpath/natSystemProperties.cc (insertSystemProperties) [USE_LTDL]: If it was not defined with -D set java.library.path to the value of LTDL_SHLIBPATH_VAR. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104198 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/gnu/classpath/natSystemProperties.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'libjava/gnu/classpath/natSystemProperties.cc') diff --git a/libjava/gnu/classpath/natSystemProperties.cc b/libjava/gnu/classpath/natSystemProperties.cc index 7e00595c6d7..5d230254d9b 100644 --- a/libjava/gnu/classpath/natSystemProperties.cc +++ b/libjava/gnu/classpath/natSystemProperties.cc @@ -352,9 +352,16 @@ gnu::classpath::SystemProperties::insertSystemProperties (java::util::Properties else { // Set a value for user code to see. - // FIXME: JDK sets this to the actual path used, including - // LD_LIBRARY_PATH, etc. +#ifdef USE_LTDL + char *libpath = getenv (LTDL_SHLIBPATH_VAR); + if (libpath) + newprops->put(JvNewStringLatin1 ("java.library.path"), + JvNewStringLatin1 (libpath)); + else + SET ("java.library.path", ""); +#else SET ("java.library.path", ""); +#endif } // If java.class.path is still not set then set it according to the -- cgit v1.2.3