This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFA, RFT: install JNI libraries in correct location


Hi,

We weren't installing the peer libraries in the right location on lib64 architectures. This patch passes the correct --with-native-libdir value to GNU Classpath's configure so that the JNI libraries are installed in $(libdir)/gcj-$(gcc_version). OK to commit?

I'm testing this on i686-pc-linux-gnu, x86_64-unknown-linux-gnu and powerpc-apple-darwin7.9.0. Can others test on the less-common platforms?

Tom

2006-07-05 Thomas Fitzsimmons <fitzsim@redhat.com>

	* configure.ac (ac_configure_args): Add --with-native-libdir.
	* configure: Regenerate.
	* classpath/native/jni/gtk-peer/Makefile.am: Remove GCJ LOCAL
	sections.
	* classpath/native/jni/gtk-peer/Makefile.in: Regenerate.
	* classpath/native/jawt/Makefile.am: Remove GCJ LOCAL sections.
	* classpath/native/jawt/Makefile.in: Regenerate.
	* classpath/native/plugin/Makefile.am: Remove GCJ LOCAL sections.
	* classpath/native/plugin/Makefile.in: Regenerate.
Index: configure.ac
===================================================================
--- configure.ac	(revision 115187)
+++ configure.ac	(working copy)
@@ -1250,11 +1250,18 @@
 AC_SUBST(toolexecmainlibdir)
 AC_SUBST(toolexeclibdir)
 
-# Determine where the standard .db file is found.
+# Determine where the standard .db file and GNU Classpath JNI
+# libraries are found.
 multi_os_directory=`$CC -print-multi-os-directory`
 case $multi_os_directory in
-  .) dbexecdir='$(libdir)/gcj-$(gcc_version)' ;; # Avoid /.
-  *) dbexecdir='$(libdir)/'$multi_os_directory'/gcj-$(gcc_version)' ;;
+  .)
+   dbexecdir='$(libdir)/gcj-$(gcc_version)' # Avoid /.
+   ac_configure_args="$ac_configure_args --with-native-libdir=\$\(libdir\)/gcj-`cat $srcdir/../gcc/BASE-VER`"
+   ;;
+  *)
+   dbexecdir='$(libdir)/'$multi_os_directory'/gcj-$(gcc_version)'
+   ac_configure_args="$ac_configure_args --with-native-libdir=\$\(libdir\)/$multi_os_directory/gcj-`cat $srcdir/../gcc/BASE-VER`"
+   ;;
 esac
 AC_SUBST(dbexecdir)
 
Index: classpath/native/jni/gtk-peer/Makefile.am
===================================================================
--- classpath/native/jni/gtk-peer/Makefile.am	(revision 115187)
+++ classpath/native/jni/gtk-peer/Makefile.am	(working copy)
@@ -1,8 +1,4 @@
-## GCJ LOCAL: install this library in GCJ's versioned library
-## directory
-gcc_version := $(shell cat $(top_srcdir)/../../gcc/BASE-VER)
-gcjversionedlibdir = $(libdir)/gcj-$(gcc_version)
-gcjversionedlib_LTLIBRARIES = libgtkpeer.la
+nativeexeclib_LTLIBRARIES = libgtkpeer.la
 
 # GTK JNI sources.
 libgtkpeer_la_SOURCES = gnu_java_awt_peer_gtk_CairoSurface.c \
@@ -54,10 +50,6 @@
 			gtk_jawt.c \
 			gtkpeer.h
 
-## GCJ LOCAL: encode the library path and  use GCJ's library version
-libgtkpeer_la_LDFLAGS = -rpath $(gcjversionedlibdir) \
-	-version-info `grep -v '^\#' $(top_srcdir)/../libtool-version`
-
 libgtkpeer_la_LIBADD = $(top_builddir)/native/jni/classpath/native_state.lo \
 		       $(top_builddir)/native/jni/classpath/jcl.lo
 
Index: classpath/native/jawt/Makefile.am
===================================================================
--- classpath/native/jawt/Makefile.am	(revision 115187)
+++ classpath/native/jawt/Makefile.am	(working copy)
@@ -1,16 +1,8 @@
-## GCJ LOCAL: install this library in GCJ's versioned library
-## directory
-gcc_version := $(shell cat $(top_srcdir)/../../gcc/BASE-VER)
-gcjversionedlibdir = $(libdir)/gcj-$(gcc_version)
-gcjversionedlib_LTLIBRARIES = libjawt.la
+nativeexeclib_LTLIBRARIES = libjawt.la
 
 libjawt_la_SOURCES = jawt.c
 libjawt_la_LIBADD = $(top_builddir)/native/jni/gtk-peer/libgtkpeer.la
 
-## GCJ LOCAL: encode the library path and  use GCJ's library version
-libjawt_la_LDFLAGS = -rpath $(gcjversionedlibdir) \
-	-version-info `grep -v '^\#' $(top_srcdir)/../libtool-version`
-
 AM_LDFLAGS = @CLASSPATH_MODULE@ @GTK_LIBS@ @PANGOFT2_LIBS@ @X_LIBS@ @XTEST_LIBS@
 AM_CPPFLAGS = @CLASSPATH_INCLUDES@
 
Index: classpath/native/plugin/Makefile.am
===================================================================
--- classpath/native/plugin/Makefile.am	(revision 115187)
+++ classpath/native/plugin/Makefile.am	(working copy)
@@ -1,24 +1,16 @@
-## GCJ LOCAL: install this library in GCJ's versioned library
-## directory
-gcc_version := $(shell cat $(top_srcdir)/../../gcc/BASE-VER)
-gcjversionedlibdir = $(libdir)/gcj-$(gcc_version)
-gcjversionedlib_LTLIBRARIES = libgcjwebplugin.la
+nativeexeclib_LTLIBRARIES = libgcjwebplugin.la
 
 libgcjwebplugin_la_SOURCES = gcjwebplugin.cc
 
 libgcjwebplugin_la_CXXFLAGS = \
 	-Wall -DAPPLETVIEWER_EXECUTABLE="\"$(bindir)/gappletviewer\"" \
-	-DPLUGIN_DATA_DIRECTORY="\"$(PLUGIN_DIR)/gcjwebplugin-data\"" \
 	$(MOZILLA_CFLAGS) $(GLIB_CFLAGS) $(GTK_CFLAGS)
 
-## GCJ LOCAL: encode the library path and  use GCJ's library version
-libgcjwebplugin_la_LDFLAGS =  -rpath $(gcjversionedlibdir) \
-	-version-info `grep -v '^\#' $(top_srcdir)/../libtool-version` \
+libgcjwebplugin_la_LDFLAGS = -avoid-version \
 	$(GLIB_LIBS) $(GTK_LIBS) \
 	-lstdc++
 
-## GCJ LOCAL: depend on gcjversionedlib_LTLIBRARIES
-install-plugin: $(gcjversionedlib_LTLIBRARIES)
+install-plugin: $(nativeexeclib_LTLIBRARIES)
 	$(INSTALL) -d -m0755 $(DESTDIR)$(PLUGIN_DIR)
 	$(INSTALL) .libs/libgcjwebplugin.so $(DESTDIR)$(PLUGIN_DIR)
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]