Commit 16dab3e2 by Thomas Fitzsimmons Committed by Thomas Fitzsimmons

re PR libgcj/23762 (java.library.path should default to value of environment…

re PR libgcj/23762 (java.library.path should default to value of environment variable specified by LTDL_SHLIBPATH_VAR)

2005-09-12  Thomas Fitzsimmons  <fitzsim@redhat.com>

	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.

From-SVN: r104198
parent c35a51a5
2005-09-12 Thomas Fitzsimmons <fitzsim@redhat.com>
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.
2005-09-08 Andrew Haley <aph@redhat.com>
* java/net/URLClassLoader.java (addURLImpl): Synchronize on the
......
......@@ -83,7 +83,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
$(top_srcdir)/../config/lib-prefix.m4 \
$(top_srcdir)/../config/no-executables.m4 \
$(top_srcdir)/../libtool.m4 $(top_srcdir)/mingwld.m4 \
$(top_srcdir)/pkg.m4 $(top_srcdir)/configure.ac
$(top_srcdir)/pkg.m4 $(top_srcdir)/shlibpath.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
......
......@@ -1108,3 +1108,4 @@ m4_include([../config/no-executables.m4])
m4_include([../libtool.m4])
m4_include([mingwld.m4])
m4_include([pkg.m4])
m4_include([shlibpath.m4])
......@@ -142,8 +142,12 @@ AC_SUBST(LIBGCJ_CXXFLAGS)
AC_SUBST(LIBGCJ_JAVAFLAGS)
AC_SUBST(LIBGCJ_LD_SYMBOLIC)
AC_CONFIG_HEADERS([include/config.h gcj/libgcj-config.h])
# Only use libltdl for non-newlib builds.
if test "x${with_newlib}" = "x" || test "x${with_newlib}" = "xno"; then
AC_LTDL_SHLIBPATH
fi
AC_CONFIG_HEADERS([include/config.h gcj/libgcj-config.h])
# See if the user has requested runtime debugging.
LIBGCJDEBUG="disable"
......
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
......@@ -53,7 +53,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
$(top_srcdir)/../config/lib-prefix.m4 \
$(top_srcdir)/../config/no-executables.m4 \
$(top_srcdir)/../libtool.m4 $(top_srcdir)/mingwld.m4 \
$(top_srcdir)/pkg.m4 $(top_srcdir)/configure.ac
$(top_srcdir)/pkg.m4 $(top_srcdir)/shlibpath.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
CONFIG_HEADER = $(top_builddir)/include/config.h libgcj-config.h
......
......@@ -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
......
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
......@@ -52,7 +52,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
$(top_srcdir)/../config/lib-prefix.m4 \
$(top_srcdir)/../config/no-executables.m4 \
$(top_srcdir)/../libtool.m4 $(top_srcdir)/mingwld.m4 \
$(top_srcdir)/pkg.m4 $(top_srcdir)/configure.ac
$(top_srcdir)/pkg.m4 $(top_srcdir)/shlibpath.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
CONFIG_HEADER = config.h $(top_builddir)/gcj/libgcj-config.h
......
......@@ -378,6 +378,10 @@
/* Define if using POSIX threads on Linux. */
#undef LINUX_THREADS
/* Define to the name of the environment variable that determines the dynamic
library search path. */
#undef LTDL_SHLIBPATH_VAR
/* Define if MinGW libgcj uses the Windows UNICODE OS API. */
#undef MINGW_LIBGCJ_UNICODE
......
......@@ -50,7 +50,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
$(top_srcdir)/../config/lib-prefix.m4 \
$(top_srcdir)/../config/no-executables.m4 \
$(top_srcdir)/../libtool.m4 $(top_srcdir)/mingwld.m4 \
$(top_srcdir)/pkg.m4 $(top_srcdir)/configure.ac
$(top_srcdir)/pkg.m4 $(top_srcdir)/shlibpath.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
CONFIG_HEADER = $(top_builddir)/include/config.h \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment