public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* RFA: enable gappletviewer, gjarsigner and gkeytool tools
@ 2006-06-27  0:05 Thomas Fitzsimmons
  2006-06-28 22:09 ` Thomas Fitzsimmons
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Fitzsimmons @ 2006-06-27  0:05 UTC (permalink / raw)
  To: java-patches

[-- Attachment #1: Type: text/plain, Size: 1468 bytes --]

Hi,

This patch enables the gappletviewer, gjarsigner and gkeytool tools.  These tool 
binaries dlopen the new libjvm.so library, using the libgcj's imported libltdl.

For now I've hard-coded the full path to libjvm.so in the dlopen call.  If the 
install tree is relocated, these tools will cease to work.  I've filed a general 
bug report for this, since there are already other places in libgcj where we 
hard-code full paths:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28175

I think the relocation work should be done as a separate patch though.

OK to commit?
Tom

2006-06-26  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* classpath/tools/toolwrapper.c: dlopen libjvm.so.
	* classpath/tools/Makefile.am: Comment out binary wrapper build
	logic.  Rename tools.zip libgcj-tools-$(gcc_version).jar and
	install in jardir.
	* classpath/tools/Makefile.in: Regenerate.
	* classpath/tools/jarsigner.in: Rename ...
	* classpath/tools/gjarsigner.in: New file.
	* classpath/tools/keytool.in: Rename ...
	* classpath/tools/gkeytool.in: New file.
	* classpath/tools/appletviewer.in: Rename ...
	* classpath/tools/gappletviewer.in: New file.
	* classpath/configure.ac: Rename tool wrapper scripts.
	* classpath/configure: Regenerate.
	* classpath/Makefile.am (SUBDIRS, DIST_SUBDIRS): Add tools.
	* classpath/Makefile.in: Regenerate.
	* classpath/aclocal.m4: Regenerate.
	* Makefile.am (bin_PROGRAMS): Add gappletviewer, gjarsigner and
	gkeytool.
	* Makefile.in: Regenerate.

[-- Attachment #2: libgcj-enable-tools-3.patch --]
[-- Type: text/x-patch, Size: 22945 bytes --]

Index: classpath/tools/toolwrapper.c
===================================================================
--- classpath/tools/toolwrapper.c	(revision 115021)
+++ classpath/tools/toolwrapper.c	(working copy)
@@ -37,6 +37,8 @@
 exception statement from your version. */
 
 #include <jni.h>
+/* GCJ LOCAL: include ltdl.h */
+#include <ltdl.h>
 #include <string.h>
 #include <stdlib.h>
 #include "config.h"
@@ -51,6 +53,9 @@
   JNIEnv *jni_env;
 };
 
+/* GCJ LOCAL: typedef for JNI_CreateJavaVM dlopen call */
+typedef jint createVM (JavaVM **, void **, void *);
+
 int
 main (int argc, const char** argv)
 {
@@ -68,6 +73,9 @@
   int non_vm_argc;
   int i;
   int classpath_found = 0;
+  /* GCJ LOCAL: variables for JNI_CreateJavaVM dlopen call */
+  lt_dlhandle libjvm_handle;
+  createVM* libjvm_create;
 
   env = NULL;
   jvm = NULL;
@@ -152,7 +160,11 @@
   vm_args.version = JNI_VERSION_1_2;
   vm_args.ignoreUnrecognized = JNI_TRUE;
 
-  result = JNI_CreateJavaVM (&jvm, &tmp.void_env, &vm_args);
+  /* GCJ LOCAL: dlopen libjvm.so */
+  lt_dlinit ();
+  libjvm_handle = lt_dlopen (LIBJVM);
+  libjvm_create = (createVM*) lt_dlsym (libjvm_handle, "JNI_CreateJavaVM");
+  result = (*libjvm_create) (&jvm, &tmp.void_env, &vm_args);
 
   if (result < 0)
     {
Index: classpath/tools/gjarsigner.in
===================================================================
--- classpath/tools/gjarsigner.in	(revision 0)
+++ classpath/tools/gjarsigner.in	(revision 0)
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+## Copyright (C) 2006 Free Software Foundation, Inc.
+##
+## This file is a part of GNU Classpath.
+##
+## GNU Classpath is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or (at
+## your option) any later version.
+##
+## GNU Classpath is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with GNU Classpath; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
+## USA.
+##
+## Linking this library statically or dynamically with other modules is
+## making a combined work based on this library.  Thus, the terms and
+## conditions of the GNU General Public License cover the whole
+## combination.
+##
+## As a special exception, the copyright holders of this library give you
+## permission to link this library with independent modules to produce an
+## executable, regardless of the license terms of these independent
+## modules, and to copy and distribute the resulting executable under
+## terms of your choice, provided that you also meet, for each linked
+## independent module, the terms and conditions of the license of that
+## module.  An independent module is a module which is not derived from
+## or based on this library.  If you modify this library, you may extend
+## this exception to your version of the library, but you are not
+## obligated to do so.  If you do not wish to do so, delete this
+## exception statement from your version.
+##
+##
+## A simple shell script to launch the GNU Classpath jarsigner tool.
+##
+
+prefix=@prefix@
+tools_dir=@datadir@/@PACKAGE@
+tools_cp=${tools_dir}/tools.zip
+
+exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.jarsigner.Main $@
Index: classpath/tools/gkeytool.in
===================================================================
--- classpath/tools/gkeytool.in	(revision 0)
+++ classpath/tools/gkeytool.in	(revision 0)
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+## Copyright (C) 2006 Free Software Foundation, Inc.
+##
+## This file is a part of GNU Classpath.
+##
+## GNU Classpath is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or (at
+## your option) any later version.
+##
+## GNU Classpath is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with GNU Classpath; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
+## USA.
+##
+## Linking this library statically or dynamically with other modules is
+## making a combined work based on this library.  Thus, the terms and
+## conditions of the GNU General Public License cover the whole
+## combination.
+##
+## As a special exception, the copyright holders of this library give you
+## permission to link this library with independent modules to produce an
+## executable, regardless of the license terms of these independent
+## modules, and to copy and distribute the resulting executable under
+## terms of your choice, provided that you also meet, for each linked
+## independent module, the terms and conditions of the license of that
+## module.  An independent module is a module which is not derived from
+## or based on this library.  If you modify this library, you may extend
+## this exception to your version of the library, but you are not
+## obligated to do so.  If you do not wish to do so, delete this
+## exception statement from your version.
+##
+##
+## A simple shell script to launch the GNU Classpath keytool tool.
+##
+
+prefix=@prefix@
+tools_dir=@datadir@/@PACKAGE@
+tools_cp=${tools_dir}/tools.zip
+
+exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.keytool.Main $@
Index: classpath/tools/gappletviewer.in
===================================================================
--- classpath/tools/gappletviewer.in	(revision 0)
+++ classpath/tools/gappletviewer.in	(revision 0)
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+## Copyright (C) 2006 Free Software Foundation, Inc.
+##
+## This file is a part of GNU Classpath.
+##
+## GNU Classpath is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or (at
+## your option) any later version.
+##
+## GNU Classpath is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with GNU Classpath; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
+## USA.
+##
+## Linking this library statically or dynamically with other modules is
+## making a combined work based on this library.  Thus, the terms and
+## conditions of the GNU General Public License cover the whole
+## combination.
+##
+## As a special exception, the copyright holders of this library give you
+## permission to link this library with independent modules to produce an
+## executable, regardless of the license terms of these independent
+## modules, and to copy and distribute the resulting executable under
+## terms of your choice, provided that you also meet, for each linked
+## independent module, the terms and conditions of the license of that
+## module.  An independent module is a module which is not derived from
+## or based on this library.  If you modify this library, you may extend
+## this exception to your version of the library, but you are not
+## obligated to do so.  If you do not wish to do so, delete this
+## exception statement from your version.
+##
+## A simple shell script to launch the GNU Classpath appletviewer tool.
+##
+
+prefix=@prefix@
+tools_dir=@datadir@/@PACKAGE@
+tools_cp=${tools_dir}/tools.zip
+
+exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.appletviewer.Main $@
Index: classpath/tools/Makefile.am
===================================================================
--- classpath/tools/Makefile.am	(revision 115021)
+++ classpath/tools/Makefile.am	(working copy)
@@ -21,67 +21,59 @@
 endif
 endif
 
-if CREATE_WRAPPERS
-bin_SCRIPTS =
-bin_PROGRAMS = gappletviewer gjarsigner gkeytool
+## GCJ LOCAL: do not build and install wrapper binaries here, since
+## the build ordering will not work.  Instead build them in
+## gcc/libjava/Makefile.am.
+# if CREATE_WRAPPERS
+# bin_SCRIPTS =
+# bin_PROGRAMS = gappletviewer gjarsigner gkeytool
 
-if FOUND_GCJ
-LIBJVM = -lgcj
-else
-if FOUND_CACAO
-LIBJVM = -ljvm
-else
-LIBJVM =
-endif
-endif
+# if FOUND_GCJ
+# LIBJVM = -lgcj
+# else
+# if FOUND_CACAO
+# LIBJVM = -ljvm
+# else
+# LIBJVM =
+# endif
+# endif
 
-# Some architecture independent data to be installed.
-TOOLS_DATA = $(TOOLS_ZIP)
+# AM_CPPFLAGS = -Wall \
+# 	-I$(top_srcdir)/include \
+# 	-DTOOLS_ZIP="\"$(TOOLSdir)/$(TOOLS_ZIP)\""
 
-# Where we want these data files installed.
-## GCJ LOCAL: install libgcj-tools.jar alongside libgcj.jar.
-TOOLSdir = $(datadir)/java
+# gappletviewer_SOURCES = toolwrapper.c
+# gappletviewer_CFLAGS = \
+# 	-DTOOLPACKAGE="\"appletviewer\"" \
+# 	-DTOOLNAME="\"gappletviewer\""
+# gappletviewer_LDFLAGS = -L$(libdir) $(LIBJVM)
 
-# The zip files with classes we want to produce.
-## GCJ LOCAL: rename tools.zip libgcj-tools-$(gcc_version).jar
-TOOLS_ZIP = libgcj-tools-$(gcc_version).jar
+# gjarsigner_SOURCES = toolwrapper.c
+# gjarsigner_CFLAGS = \
+# 	-DTOOLPACKAGE="\"jarsigner\"" \
+# 	-DTOOLNAME="\"gjarsigner\""
+# gjarsigner_LDFLAGS = -L$(libdir) $(LIBJVM)
 
-## GCJ LOCAL: calculate GCC version
-gcc_version := $(shell cat $(top_srcdir)/../../gcc/BASE-VER)
+# gkeytool_SOURCES = toolwrapper.c
+# gkeytool_CFLAGS = \
+# 	-DTOOLPACKAGE="\"keytool\"" \
+# 	-DTOOLNAME="\"gkeytool\""
+# gkeytool_LDFLAGS = -L$(libdir) $(LIBJVM)
 
-gappletviewer_SOURCES = toolwrapper.c
-gappletviewer_CFLAGS = -Wall \
-	-I$(top_srcdir)/include \
-	-DTOOLS_ZIP="\"$(TOOLSdir)/$(TOOLS_ZIP)\"" \
-	-DTOOLPACKAGE="\"appletviewer\"" \
-	-DTOOLNAME="\"gappletviewer\""
-gappletviewer_LDFLAGS = -L$(libdir) $(LIBJVM)
+# else
+# bin_SCRIPTS = gappletviewer gjarsigner gkeytool
+# bin_PROGRAMS =
+# endif
+EXTRA_DIST = toolwrapper.c gappletviewer.in gjarsigner.in gkeytool.in
 
-gjarsigner_SOURCES = toolwrapper.c
-gjarsigner_CFLAGS = -Wall \
-	-I$(top_srcdir)/include \
-	-DTOOLS_ZIP="\"$(TOOLSdir)/$(TOOLS_ZIP)\"" \
-	-DTOOLPACKAGE="\"jarsigner\"" \
-	-DTOOLNAME="\"gjarsigner\""
-gjarsigner_LDFLAGS = -L$(libdir) $(LIBJVM)
-
-gkeytool_SOURCES = toolwrapper.c
-gkeytool_CFLAGS = -Wall \
-	-I$(top_srcdir)/include \
-	-DTOOLS_ZIP="\"$(TOOLSdir)/$(TOOLS_ZIP)\"" \
-	-DTOOLPACKAGE="\"keytool\"" \
-	-DTOOLNAME="\"gkeytool\""
-gkeytool_LDFLAGS = -L$(libdir) $(LIBJVM)
-
-else
-bin_SCRIPTS = appletviewer jarsigner keytool
-bin_PROGRAMS =
-endif
-EXTRA_DIST = toolwrapper.c appletviewer.in jarsigner.in keytool.in
-
 # All our example java source files
 TOOLS_JAVA_FILES = $(srcdir)/gnu/classpath/tools/*.java $(srcdir)/gnu/classpath/tools/*/*.java $(srcdir)/gnu/classpath/tools/*/*/*.java
 
+# The zip files with classes we want to produce.
+## GCJ LOCAL: rename tools.zip to libgcj-tools-$(gcc_version).jar
+gcc_version := $(shell cat $(top_srcdir)/../../gcc/BASE-VER)
+TOOLS_ZIP = libgcj-tools-$(gcc_version).jar
+
 # Extra objects that will not exist until configure-time
 BUILT_SOURCES = $(TOOLS_ZIP)
 
@@ -103,6 +95,13 @@
 # All the files we find "interesting"
 ALL_TOOLS_FILES = $(TOOLS_JAVA_FILES) $(TOOLS_TEMPLATES) $(TOOLS_HELPS)
 
+# Some architecture independent data to be installed.
+TOOLS_DATA = $(TOOLS_ZIP)
+
+# Where we want these data files installed.
+## GCJ LOCAL: install libgcj-tools.jar alongside libgcj.jar.
+TOOLSdir = $(datadir)/java
+
 # Make sure everything is included in the distribution.
 dist-hook:
 	srcdir_cnt=`echo $(srcdir) | wc -c`; \
@@ -121,6 +120,7 @@
 # the class files. Always regenerate all .class files and remove them
 # immediately.  And copy the template files we use to the classes dir
 # so they get also included.
+## GCJ LOCAL: assume FASTJAR since we pass --with-fastjar to configure
 $(TOOLS_ZIP): $(TOOLS_JAVA_FILES)
 	mkdir -p classes/gnu/classpath/tools/giop/grmic/templates
 	mkdir -p classes/gnu/classpath/tools/rmi/rmic/templates
Index: classpath/tools/jarsigner.in
===================================================================
--- classpath/tools/jarsigner.in	(revision 115021)
+++ classpath/tools/jarsigner.in	(working copy)
@@ -1,47 +0,0 @@
-#!/bin/sh
-
-## Copyright (C) 2006 Free Software Foundation, Inc.
-##
-## This file is a part of GNU Classpath.
-##
-## GNU Classpath is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or (at
-## your option) any later version.
-##
-## GNU Classpath is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with GNU Classpath; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
-## USA.
-##
-## Linking this library statically or dynamically with other modules is
-## making a combined work based on this library.  Thus, the terms and
-## conditions of the GNU General Public License cover the whole
-## combination.
-##
-## As a special exception, the copyright holders of this library give you
-## permission to link this library with independent modules to produce an
-## executable, regardless of the license terms of these independent
-## modules, and to copy and distribute the resulting executable under
-## terms of your choice, provided that you also meet, for each linked
-## independent module, the terms and conditions of the license of that
-## module.  An independent module is a module which is not derived from
-## or based on this library.  If you modify this library, you may extend
-## this exception to your version of the library, but you are not
-## obligated to do so.  If you do not wish to do so, delete this
-## exception statement from your version.
-##
-##
-## A simple shell script to launch the GNU Classpath jarsigner tool.
-##
-
-prefix=@prefix@
-tools_dir=@datadir@/@PACKAGE@
-tools_cp=${tools_dir}/tools.zip
-
-exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.jarsigner.Main $@
Index: classpath/tools/keytool.in
===================================================================
--- classpath/tools/keytool.in	(revision 115021)
+++ classpath/tools/keytool.in	(working copy)
@@ -1,47 +0,0 @@
-#!/bin/sh
-
-## Copyright (C) 2006 Free Software Foundation, Inc.
-##
-## This file is a part of GNU Classpath.
-##
-## GNU Classpath is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or (at
-## your option) any later version.
-##
-## GNU Classpath is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with GNU Classpath; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
-## USA.
-##
-## Linking this library statically or dynamically with other modules is
-## making a combined work based on this library.  Thus, the terms and
-## conditions of the GNU General Public License cover the whole
-## combination.
-##
-## As a special exception, the copyright holders of this library give you
-## permission to link this library with independent modules to produce an
-## executable, regardless of the license terms of these independent
-## modules, and to copy and distribute the resulting executable under
-## terms of your choice, provided that you also meet, for each linked
-## independent module, the terms and conditions of the license of that
-## module.  An independent module is a module which is not derived from
-## or based on this library.  If you modify this library, you may extend
-## this exception to your version of the library, but you are not
-## obligated to do so.  If you do not wish to do so, delete this
-## exception statement from your version.
-##
-##
-## A simple shell script to launch the GNU Classpath keytool tool.
-##
-
-prefix=@prefix@
-tools_dir=@datadir@/@PACKAGE@
-tools_cp=${tools_dir}/tools.zip
-
-exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.keytool.Main $@
Index: classpath/tools/appletviewer.in
===================================================================
--- classpath/tools/appletviewer.in	(revision 115021)
+++ classpath/tools/appletviewer.in	(working copy)
@@ -1,46 +0,0 @@
-#!/bin/sh
-
-## Copyright (C) 2006 Free Software Foundation, Inc.
-##
-## This file is a part of GNU Classpath.
-##
-## GNU Classpath is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or (at
-## your option) any later version.
-##
-## GNU Classpath is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with GNU Classpath; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
-## USA.
-##
-## Linking this library statically or dynamically with other modules is
-## making a combined work based on this library.  Thus, the terms and
-## conditions of the GNU General Public License cover the whole
-## combination.
-##
-## As a special exception, the copyright holders of this library give you
-## permission to link this library with independent modules to produce an
-## executable, regardless of the license terms of these independent
-## modules, and to copy and distribute the resulting executable under
-## terms of your choice, provided that you also meet, for each linked
-## independent module, the terms and conditions of the license of that
-## module.  An independent module is a module which is not derived from
-## or based on this library.  If you modify this library, you may extend
-## this exception to your version of the library, but you are not
-## obligated to do so.  If you do not wish to do so, delete this
-## exception statement from your version.
-##
-## A simple shell script to launch the GNU Classpath appletviewer tool.
-##
-
-prefix=@prefix@
-tools_dir=@datadir@/@PACKAGE@
-tools_cp=${tools_dir}/tools.zip
-
-exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.appletviewer.Main $@
Index: classpath/configure.ac
===================================================================
--- classpath/configure.ac	(revision 115021)
+++ classpath/configure.ac	(working copy)
@@ -739,12 +739,12 @@
 
 if test "x${COMPILE_WRAPPERS}" = xno
 then
-AC_CONFIG_FILES([tools/appletviewer
-tools/jarsigner
-tools/keytool])
-AC_CONFIG_COMMANDS([appletviewer],[chmod 755 tools/appletviewer])
-AC_CONFIG_COMMANDS([jarsigner],[chmod 755 tools/jarsigner])
-AC_CONFIG_COMMANDS([keytool],[chmod 755 tools/keytool])
+AC_CONFIG_FILES([tools/gappletviewer
+tools/gjarsigner
+tools/gkeytool])
+AC_CONFIG_COMMANDS([gappletviewer],[chmod 755 tools/gappletviewer])
+AC_CONFIG_COMMANDS([gjarsigner],[chmod 755 tools/gjarsigner])
+AC_CONFIG_COMMANDS([gkeytool],[chmod 755 tools/gkeytool])
 fi
 
 AC_CONFIG_COMMANDS([gen-classlist],[chmod 755 lib/gen-classlist.sh])
Index: classpath/Makefile.am
===================================================================
--- classpath/Makefile.am	(revision 115021)
+++ classpath/Makefile.am	(working copy)
@@ -1,9 +1,8 @@
 ## Input file for automake to generate the Makefile.in used by configure
 
 # lib first, to compile .class files before native code, last examples
-## GCJ LOCAL: exclude tools directory
-SUBDIRS = lib doc external include native resource scripts $(EXAMPLESDIR)
-DIST_SUBDIRS = lib doc external include native resource scripts examples
+SUBDIRS = lib doc external include native resource scripts tools $(EXAMPLESDIR)
+DIST_SUBDIRS = lib doc external include native resource scripts tools examples
 
 ## GCJ LOCAL: we need an extra -I here.
 ACLOCAL_AMFLAGS = -I m4 -I ../.. -I ../../config
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 115021)
+++ Makefile.am	(working copy)
@@ -68,7 +68,8 @@
 
 ## For now, only on native systems.  FIXME.
 if NATIVE
-bin_PROGRAMS = jv-convert gij grmic grmiregistry gcj-dbtool
+bin_PROGRAMS = jv-convert gij grmic grmiregistry gcj-dbtool \
+	gappletviewer gjarsigner gkeytool
 
 ## It is convenient to actually build and install the default database
 ## when gcj-dbtool is available.
@@ -721,6 +722,36 @@
 ## linking this program.
 grmiregistry_DEPENDENCIES = libgcj.la libgcj.spec
 
+## These tools use libltdl to dlopen libjvm.so.  The necessary ltdl
+## includes are inherited from AM_CPPFLAGS.
+gappletviewer_SOURCES = classpath/tools/toolwrapper.c
+gappletviewer_CFLAGS = \
+	-DLIBJVM="\"$(dbexecdir)/libjvm.so\"" \
+	-DTOOLS_ZIP="\"$(jardir)/libgcj-tools-$(gcc_version).jar\"" \
+	-DTOOLPACKAGE="\"appletviewer\"" \
+	-DTOOLNAME="\"gappletviewer\""
+gappletviewer_LDFLAGS = $(LIBLTDL)
+gappletviewer_DEPENDENCIES = $(LIBLTDL)
+
+gjarsigner_SOURCES = classpath/tools/toolwrapper.c
+gjarsigner_CFLAGS = \
+	-DLIBJVM="\"$(dbexecdir)/libjvm.so\"" \
+	-DTOOLS_ZIP="\"$(jardir)/libgcj-tools-$(gcc_version).jar\"" \
+	-DTOOLPACKAGE="\"jarsigner\"" \
+	-DTOOLNAME="\"gjarsigner\""
+gjarsigner_LDFLAGS = $(LIBLTDL)
+gjarsigner_DEPENDENCIES = $(LIBLTDL)
+
+gkeytool_SOURCES = classpath/tools/toolwrapper.c
+gkeytool_CFLAGS = \
+	-I$(top_srcdir)/libltdl \
+	-DLIBJVM="\"$(dbexecdir)/libjvm.so\"" \
+	-DTOOLS_ZIP="\"$(jardir)/libgcj-tools-$(gcc_version).jar\"" \
+	-DTOOLPACKAGE="\"keytool\"" \
+	-DTOOLNAME="\"gkeytool\""
+gkeytool_LDFLAGS = $(LIBLTDL)
+gkeytool_DEPENDENCIES = $(LIBLTDL)
+
 ## ################################################################
 
 ## This lists all the C++ source files in subdirectories.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: RFA: enable gappletviewer, gjarsigner and gkeytool tools
  2006-06-27  0:05 RFA: enable gappletviewer, gjarsigner and gkeytool tools Thomas Fitzsimmons
@ 2006-06-28 22:09 ` Thomas Fitzsimmons
  2006-06-29  1:53   ` Bryce McKinlay
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Fitzsimmons @ 2006-06-28 22:09 UTC (permalink / raw)
  To: Thomas Fitzsimmons; +Cc: java-patches

[-- Attachment #1: Type: text/plain, Size: 1877 bytes --]

Thomas Fitzsimmons wrote:
> Hi,
> 
> This patch enables the gappletviewer, gjarsigner and gkeytool tools.  
> These tool binaries dlopen the new libjvm.so library, using the libgcj's 
> imported libltdl.
> 
> For now I've hard-coded the full path to libjvm.so in the dlopen call.  
> If the install tree is relocated, these tools will cease to work.  I've 
> filed a general bug report for this, since there are already other 
> places in libgcj where we hard-code full paths:
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28175
> 
> I think the relocation work should be done as a separate patch though.

Here's an updated version of the patch that builds on Darwin.  It uses 
lt_dlopenext in place of lt_dlopen and doesn't hard-code libjvm's file 
extension.  The tools still do not work on Darwin due to some Darwin-specific 
dlopen/dlsym issues, but those can be fixed in a separate patch (hopefully by 
someone who understands Darwin's linkage tools).

Please review,

Tom

2006-06-28  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* classpath/tools/toolwrapper.c: dlopen libjvm.so.
	* classpath/tools/Makefile.am: Comment out binary wrapper build
	logic.  Rename tools.zip libgcj-tools-$(gcc_version).jar and
	install in jardir.
	* classpath/tools/Makefile.in: Regenerate.
	* classpath/tools/jarsigner.in: Rename ...
	* classpath/tools/gjarsigner.in: New file.
	* classpath/tools/keytool.in: Rename ...
	* classpath/tools/gkeytool.in: New file.
	* classpath/tools/appletviewer.in: Rename ...
	* classpath/tools/gappletviewer.in: New file.
	* classpath/configure.ac: Rename tool wrapper scripts.
	* classpath/configure: Regenerate.
	* classpath/Makefile.am (SUBDIRS, DIST_SUBDIRS): Add tools.
	* classpath/Makefile.in: Regenerate.
	* classpath/aclocal.m4: Regenerate.
	* Makefile.am (bin_PROGRAMS): Add gappletviewer, gjarsigner and
	gkeytool.
	* Makefile.in: Regenerate.

[-- Attachment #2: libgcj-enable-tools-4.patch --]
[-- Type: text/x-patch, Size: 73071 bytes --]

Index: Makefile.in
===================================================================
--- Makefile.in	(revision 115021)
+++ Makefile.in	(working copy)
@@ -44,7 +44,8 @@
 @XLIB_AWT_TRUE@am__append_2 = lib-gnu-awt-xlib.la
 @NATIVE_TRUE@bin_PROGRAMS = jv-convert$(EXEEXT) gij$(EXEEXT) \
 @NATIVE_TRUE@	grmic$(EXEEXT) grmiregistry$(EXEEXT) \
-@NATIVE_TRUE@	gcj-dbtool$(EXEEXT)
+@NATIVE_TRUE@	gcj-dbtool$(EXEEXT) gappletviewer$(EXEEXT) \
+@NATIVE_TRUE@	gjarsigner$(EXEEXT) gkeytool$(EXEEXT)
 @BASH_JAR_TRUE@am__append_3 = scripts/jar
 @USING_GCC_TRUE@am__append_4 = $(WARNINGS)
 @USING_BOEHMGC_TRUE@am__append_5 = boehm.cc
@@ -349,6 +350,10 @@
 libjvm_la_OBJECTS = $(am_libjvm_la_OBJECTS)
 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
+am_gappletviewer_OBJECTS =  \
+	classpath/tools/gappletviewer-toolwrapper.$(OBJEXT)
+gappletviewer_OBJECTS = $(am_gappletviewer_OBJECTS)
+gappletviewer_LDADD = $(LDADD)
 am_gcj_dbtool_OBJECTS = gnu/gcj/tools/gcj_dbtool/Main.$(OBJEXT) \
 	gnu/gcj/tools/gcj_dbtool/natMain.$(OBJEXT)
 gcj_dbtool_OBJECTS = $(am_gcj_dbtool_OBJECTS)
@@ -360,6 +365,13 @@
 gen_from_JIS_LDADD = $(LDADD)
 am_gij_OBJECTS =
 gij_OBJECTS = $(am_gij_OBJECTS)
+am_gjarsigner_OBJECTS =  \
+	classpath/tools/gjarsigner-toolwrapper.$(OBJEXT)
+gjarsigner_OBJECTS = $(am_gjarsigner_OBJECTS)
+gjarsigner_LDADD = $(LDADD)
+am_gkeytool_OBJECTS = classpath/tools/gkeytool-toolwrapper.$(OBJEXT)
+gkeytool_OBJECTS = $(am_gkeytool_OBJECTS)
+gkeytool_LDADD = $(LDADD)
 am_grmic_OBJECTS =
 grmic_OBJECTS = $(am_grmic_OBJECTS)
 am_grmiregistry_OBJECTS =
@@ -393,12 +405,15 @@
 GCJLD = $(GCJ)
 SOURCES = $(lib_gnu_awt_xlib_la_SOURCES) $(libgcj_la_SOURCES) \
 	$(libgij_la_SOURCES) $(libjvm_la_SOURCES) \
-	$(gcj_dbtool_SOURCES) $(gen_from_JIS_SOURCES) $(gij_SOURCES) \
-	$(grmic_SOURCES) $(grmiregistry_SOURCES) $(jv_convert_SOURCES)
+	$(gappletviewer_SOURCES) $(gcj_dbtool_SOURCES) \
+	$(gen_from_JIS_SOURCES) $(gij_SOURCES) $(gjarsigner_SOURCES) \
+	$(gkeytool_SOURCES) $(grmic_SOURCES) $(grmiregistry_SOURCES) \
+	$(jv_convert_SOURCES)
 DIST_SOURCES = $(lib_gnu_awt_xlib_la_SOURCES) \
 	$(am__libgcj_la_SOURCES_DIST) $(libgij_la_SOURCES) \
-	$(libjvm_la_SOURCES) $(gcj_dbtool_SOURCES) \
-	$(am__gen_from_JIS_SOURCES_DIST) $(gij_SOURCES) \
+	$(libjvm_la_SOURCES) $(gappletviewer_SOURCES) \
+	$(gcj_dbtool_SOURCES) $(am__gen_from_JIS_SOURCES_DIST) \
+	$(gij_SOURCES) $(gjarsigner_SOURCES) $(gkeytool_SOURCES) \
 	$(grmic_SOURCES) $(grmiregistry_SOURCES) $(jv_convert_SOURCES)
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	html-recursive info-recursive install-data-recursive \
@@ -7037,6 +7052,34 @@
 grmiregistry_LINK = $(GCJLINK)
 grmiregistry_LDADD = -L$(here)/.libs libgcj.la
 grmiregistry_DEPENDENCIES = libgcj.la libgcj.spec
+gappletviewer_SOURCES = classpath/tools/toolwrapper.c
+gappletviewer_CFLAGS = \
+	-DLIBJVM="\"$(dbexecdir)/libjvm\"" \
+	-DTOOLS_ZIP="\"$(jardir)/libgcj-tools-$(gcc_version).jar\"" \
+	-DTOOLPACKAGE="\"appletviewer\"" \
+	-DTOOLNAME="\"gappletviewer\""
+
+gappletviewer_LDFLAGS = $(LIBLTDL)
+gappletviewer_DEPENDENCIES = $(LIBLTDL)
+gjarsigner_SOURCES = classpath/tools/toolwrapper.c
+gjarsigner_CFLAGS = \
+	-DLIBJVM="\"$(dbexecdir)/libjvm\"" \
+	-DTOOLS_ZIP="\"$(jardir)/libgcj-tools-$(gcc_version).jar\"" \
+	-DTOOLPACKAGE="\"jarsigner\"" \
+	-DTOOLNAME="\"gjarsigner\""
+
+gjarsigner_LDFLAGS = $(LIBLTDL)
+gjarsigner_DEPENDENCIES = $(LIBLTDL)
+gkeytool_SOURCES = classpath/tools/toolwrapper.c
+gkeytool_CFLAGS = \
+	-I$(top_srcdir)/libltdl \
+	-DLIBJVM="\"$(dbexecdir)/libjvm\"" \
+	-DTOOLS_ZIP="\"$(jardir)/libgcj-tools-$(gcc_version).jar\"" \
+	-DTOOLPACKAGE="\"keytool\"" \
+	-DTOOLNAME="\"gkeytool\""
+
+gkeytool_LDFLAGS = $(LIBLTDL)
+gkeytool_DEPENDENCIES = $(LIBLTDL)
 nat_source_files = \
 gnu/classpath/natSystemProperties.cc \
 gnu/gcj/natCore.cc \
@@ -7647,6 +7690,18 @@
 	  echo " rm -f $$p $$f"; \
 	  rm -f $$p $$f ; \
 	done
+classpath/tools/$(am__dirstamp):
+	@$(mkdir_p) classpath/tools
+	@: > classpath/tools/$(am__dirstamp)
+classpath/tools/$(DEPDIR)/$(am__dirstamp):
+	@$(mkdir_p) classpath/tools/$(DEPDIR)
+	@: > classpath/tools/$(DEPDIR)/$(am__dirstamp)
+classpath/tools/gappletviewer-toolwrapper.$(OBJEXT):  \
+	classpath/tools/$(am__dirstamp) \
+	classpath/tools/$(DEPDIR)/$(am__dirstamp)
+gappletviewer$(EXEEXT): $(gappletviewer_OBJECTS) $(gappletviewer_DEPENDENCIES) 
+	@rm -f gappletviewer$(EXEEXT)
+	$(LINK) $(gappletviewer_LDFLAGS) $(gappletviewer_OBJECTS) $(gappletviewer_LDADD) $(LIBS)
 gnu/gcj/tools/gcj_dbtool/$(am__dirstamp):
 	@$(mkdir_p) gnu/gcj/tools/gcj_dbtool
 	@: > gnu/gcj/tools/gcj_dbtool/$(am__dirstamp)
@@ -7673,6 +7728,18 @@
 gij$(EXEEXT): $(gij_OBJECTS) $(gij_DEPENDENCIES) 
 	@rm -f gij$(EXEEXT)
 	$(gij_LINK) $(gij_LDFLAGS) $(gij_OBJECTS) $(gij_LDADD) $(LIBS)
+classpath/tools/gjarsigner-toolwrapper.$(OBJEXT):  \
+	classpath/tools/$(am__dirstamp) \
+	classpath/tools/$(DEPDIR)/$(am__dirstamp)
+gjarsigner$(EXEEXT): $(gjarsigner_OBJECTS) $(gjarsigner_DEPENDENCIES) 
+	@rm -f gjarsigner$(EXEEXT)
+	$(LINK) $(gjarsigner_LDFLAGS) $(gjarsigner_OBJECTS) $(gjarsigner_LDADD) $(LIBS)
+classpath/tools/gkeytool-toolwrapper.$(OBJEXT):  \
+	classpath/tools/$(am__dirstamp) \
+	classpath/tools/$(DEPDIR)/$(am__dirstamp)
+gkeytool$(EXEEXT): $(gkeytool_OBJECTS) $(gkeytool_DEPENDENCIES) 
+	@rm -f gkeytool$(EXEEXT)
+	$(LINK) $(gkeytool_LDFLAGS) $(gkeytool_OBJECTS) $(gkeytool_LDADD) $(LIBS)
 grmic$(EXEEXT): $(grmic_OBJECTS) $(grmic_DEPENDENCIES) 
 	@rm -f grmic$(EXEEXT)
 	$(grmic_LINK) $(grmic_LDFLAGS) $(grmic_OBJECTS) $(grmic_LDADD) $(LIBS)
@@ -7704,6 +7771,9 @@
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
+	-rm -f classpath/tools/gappletviewer-toolwrapper.$(OBJEXT)
+	-rm -f classpath/tools/gjarsigner-toolwrapper.$(OBJEXT)
+	-rm -f classpath/tools/gkeytool-toolwrapper.$(OBJEXT)
 	-rm -f gnu/classpath/natSystemProperties.$(OBJEXT)
 	-rm -f gnu/classpath/natSystemProperties.lo
 	-rm -f gnu/gcj/convert/JIS0208_to_Unicode.$(OBJEXT)
@@ -7894,6 +7964,9 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/verify.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32-threads.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@classpath/tools/$(DEPDIR)/gappletviewer-toolwrapper.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@classpath/tools/$(DEPDIR)/gjarsigner-toolwrapper.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@classpath/tools/$(DEPDIR)/gkeytool-toolwrapper.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/classpath/$(DEPDIR)/natSystemProperties.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/$(DEPDIR)/natCore.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/convert/$(DEPDIR)/JIS0208_to_Unicode.Plo@am__quote@
@@ -8005,6 +8078,48 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
 
+classpath/tools/gappletviewer-toolwrapper.o: classpath/tools/toolwrapper.c
+@am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gappletviewer_CFLAGS) $(CFLAGS) -MT classpath/tools/gappletviewer-toolwrapper.o -MD -MP -MF "classpath/tools/$(DEPDIR)/gappletviewer-toolwrapper.Tpo" -c -o classpath/tools/gappletviewer-toolwrapper.o `test -f 'classpath/tools/toolwrapper.c' || echo '$(srcdir)/'`classpath/tools/toolwrapper.c; \
+@am__fastdepCC_TRUE@	then mv -f "classpath/tools/$(DEPDIR)/gappletviewer-toolwrapper.Tpo" "classpath/tools/$(DEPDIR)/gappletviewer-toolwrapper.Po"; else rm -f "classpath/tools/$(DEPDIR)/gappletviewer-toolwrapper.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='classpath/tools/toolwrapper.c' object='classpath/tools/gappletviewer-toolwrapper.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gappletviewer_CFLAGS) $(CFLAGS) -c -o classpath/tools/gappletviewer-toolwrapper.o `test -f 'classpath/tools/toolwrapper.c' || echo '$(srcdir)/'`classpath/tools/toolwrapper.c
+
+classpath/tools/gappletviewer-toolwrapper.obj: classpath/tools/toolwrapper.c
+@am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gappletviewer_CFLAGS) $(CFLAGS) -MT classpath/tools/gappletviewer-toolwrapper.obj -MD -MP -MF "classpath/tools/$(DEPDIR)/gappletviewer-toolwrapper.Tpo" -c -o classpath/tools/gappletviewer-toolwrapper.obj `if test -f 'classpath/tools/toolwrapper.c'; then $(CYGPATH_W) 'classpath/tools/toolwrapper.c'; else $(CYGPATH_W) '$(srcdir)/classpath/tools/toolwrapper.c'; fi`; \
+@am__fastdepCC_TRUE@	then mv -f "classpath/tools/$(DEPDIR)/gappletviewer-toolwrapper.Tpo" "classpath/tools/$(DEPDIR)/gappletviewer-toolwrapper.Po"; else rm -f "classpath/tools/$(DEPDIR)/gappletviewer-toolwrapper.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='classpath/tools/toolwrapper.c' object='classpath/tools/gappletviewer-toolwrapper.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gappletviewer_CFLAGS) $(CFLAGS) -c -o classpath/tools/gappletviewer-toolwrapper.obj `if test -f 'classpath/tools/toolwrapper.c'; then $(CYGPATH_W) 'classpath/tools/toolwrapper.c'; else $(CYGPATH_W) '$(srcdir)/classpath/tools/toolwrapper.c'; fi`
+
+classpath/tools/gjarsigner-toolwrapper.o: classpath/tools/toolwrapper.c
+@am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gjarsigner_CFLAGS) $(CFLAGS) -MT classpath/tools/gjarsigner-toolwrapper.o -MD -MP -MF "classpath/tools/$(DEPDIR)/gjarsigner-toolwrapper.Tpo" -c -o classpath/tools/gjarsigner-toolwrapper.o `test -f 'classpath/tools/toolwrapper.c' || echo '$(srcdir)/'`classpath/tools/toolwrapper.c; \
+@am__fastdepCC_TRUE@	then mv -f "classpath/tools/$(DEPDIR)/gjarsigner-toolwrapper.Tpo" "classpath/tools/$(DEPDIR)/gjarsigner-toolwrapper.Po"; else rm -f "classpath/tools/$(DEPDIR)/gjarsigner-toolwrapper.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='classpath/tools/toolwrapper.c' object='classpath/tools/gjarsigner-toolwrapper.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gjarsigner_CFLAGS) $(CFLAGS) -c -o classpath/tools/gjarsigner-toolwrapper.o `test -f 'classpath/tools/toolwrapper.c' || echo '$(srcdir)/'`classpath/tools/toolwrapper.c
+
+classpath/tools/gjarsigner-toolwrapper.obj: classpath/tools/toolwrapper.c
+@am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gjarsigner_CFLAGS) $(CFLAGS) -MT classpath/tools/gjarsigner-toolwrapper.obj -MD -MP -MF "classpath/tools/$(DEPDIR)/gjarsigner-toolwrapper.Tpo" -c -o classpath/tools/gjarsigner-toolwrapper.obj `if test -f 'classpath/tools/toolwrapper.c'; then $(CYGPATH_W) 'classpath/tools/toolwrapper.c'; else $(CYGPATH_W) '$(srcdir)/classpath/tools/toolwrapper.c'; fi`; \
+@am__fastdepCC_TRUE@	then mv -f "classpath/tools/$(DEPDIR)/gjarsigner-toolwrapper.Tpo" "classpath/tools/$(DEPDIR)/gjarsigner-toolwrapper.Po"; else rm -f "classpath/tools/$(DEPDIR)/gjarsigner-toolwrapper.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='classpath/tools/toolwrapper.c' object='classpath/tools/gjarsigner-toolwrapper.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gjarsigner_CFLAGS) $(CFLAGS) -c -o classpath/tools/gjarsigner-toolwrapper.obj `if test -f 'classpath/tools/toolwrapper.c'; then $(CYGPATH_W) 'classpath/tools/toolwrapper.c'; else $(CYGPATH_W) '$(srcdir)/classpath/tools/toolwrapper.c'; fi`
+
+classpath/tools/gkeytool-toolwrapper.o: classpath/tools/toolwrapper.c
+@am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gkeytool_CFLAGS) $(CFLAGS) -MT classpath/tools/gkeytool-toolwrapper.o -MD -MP -MF "classpath/tools/$(DEPDIR)/gkeytool-toolwrapper.Tpo" -c -o classpath/tools/gkeytool-toolwrapper.o `test -f 'classpath/tools/toolwrapper.c' || echo '$(srcdir)/'`classpath/tools/toolwrapper.c; \
+@am__fastdepCC_TRUE@	then mv -f "classpath/tools/$(DEPDIR)/gkeytool-toolwrapper.Tpo" "classpath/tools/$(DEPDIR)/gkeytool-toolwrapper.Po"; else rm -f "classpath/tools/$(DEPDIR)/gkeytool-toolwrapper.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='classpath/tools/toolwrapper.c' object='classpath/tools/gkeytool-toolwrapper.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gkeytool_CFLAGS) $(CFLAGS) -c -o classpath/tools/gkeytool-toolwrapper.o `test -f 'classpath/tools/toolwrapper.c' || echo '$(srcdir)/'`classpath/tools/toolwrapper.c
+
+classpath/tools/gkeytool-toolwrapper.obj: classpath/tools/toolwrapper.c
+@am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gkeytool_CFLAGS) $(CFLAGS) -MT classpath/tools/gkeytool-toolwrapper.obj -MD -MP -MF "classpath/tools/$(DEPDIR)/gkeytool-toolwrapper.Tpo" -c -o classpath/tools/gkeytool-toolwrapper.obj `if test -f 'classpath/tools/toolwrapper.c'; then $(CYGPATH_W) 'classpath/tools/toolwrapper.c'; else $(CYGPATH_W) '$(srcdir)/classpath/tools/toolwrapper.c'; fi`; \
+@am__fastdepCC_TRUE@	then mv -f "classpath/tools/$(DEPDIR)/gkeytool-toolwrapper.Tpo" "classpath/tools/$(DEPDIR)/gkeytool-toolwrapper.Po"; else rm -f "classpath/tools/$(DEPDIR)/gkeytool-toolwrapper.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='classpath/tools/toolwrapper.c' object='classpath/tools/gkeytool-toolwrapper.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gkeytool_CFLAGS) $(CFLAGS) -c -o classpath/tools/gkeytool-toolwrapper.obj `if test -f 'classpath/tools/toolwrapper.c'; then $(CYGPATH_W) 'classpath/tools/toolwrapper.c'; else $(CYGPATH_W) '$(srcdir)/classpath/tools/toolwrapper.c'; fi`
+
 .cc.o:
 @am__fastdepCXX_TRUE@	depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`; \
 @am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \
@@ -8597,6 +8712,8 @@
 
 distclean-generic:
 	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-rm -f classpath/tools/$(DEPDIR)/$(am__dirstamp)
+	-rm -f classpath/tools/$(am__dirstamp)
 	-rm -f gnu/classpath/$(DEPDIR)/$(am__dirstamp)
 	-rm -f gnu/classpath/$(am__dirstamp)
 	-rm -f gnu/gcj/$(DEPDIR)/$(am__dirstamp)
@@ -8658,7 +8775,7 @@
 
 distclean: distclean-recursive
 	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-	-rm -rf ./$(DEPDIR) gnu/classpath/$(DEPDIR) gnu/gcj/$(DEPDIR) gnu/gcj/convert/$(DEPDIR) gnu/gcj/io/$(DEPDIR) gnu/gcj/runtime/$(DEPDIR) gnu/gcj/tools/gcj_dbtool/$(DEPDIR) gnu/gcj/util/$(DEPDIR) gnu/gcj/xlib/$(DEPDIR) gnu/java/lang/$(DEPDIR) gnu/java/net/$(DEPDIR) gnu/java/net/protocol/core/$(DEPDIR) gnu/java/nio/$(DEPDIR) gnu/java/nio/channels/$(DEPDIR) java/io/$(DEPDIR) java/lang/$(DEPDIR) java/lang/ref/$(DEPDIR) java/lang/reflect/$(DEPDIR) java/net/$(DEPDIR) java/nio/$(DEPDIR) java/nio/channels/$(DEPDIR) java/text/$(DEPDIR) java/util/$(DEPDIR) java/util/logging/$(DEPDIR) java/util/zip/$(DEPDIR)
+	-rm -rf ./$(DEPDIR) classpath/tools/$(DEPDIR) gnu/classpath/$(DEPDIR) gnu/gcj/$(DEPDIR) gnu/gcj/convert/$(DEPDIR) gnu/gcj/io/$(DEPDIR) gnu/gcj/runtime/$(DEPDIR) gnu/gcj/tools/gcj_dbtool/$(DEPDIR) gnu/gcj/util/$(DEPDIR) gnu/gcj/xlib/$(DEPDIR) gnu/java/lang/$(DEPDIR) gnu/java/net/$(DEPDIR) gnu/java/net/protocol/core/$(DEPDIR) gnu/java/nio/$(DEPDIR) gnu/java/nio/channels/$(DEPDIR) java/io/$(DEPDIR) java/lang/$(DEPDIR) java/lang/ref/$(DEPDIR) java/lang/reflect/$(DEPDIR) java/net/$(DEPDIR) java/nio/$(DEPDIR) java/nio/channels/$(DEPDIR) java/text/$(DEPDIR) java/util/$(DEPDIR) java/util/logging/$(DEPDIR) java/util/zip/$(DEPDIR)
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-libtool distclean-local distclean-tags
@@ -8689,7 +8806,7 @@
 maintainer-clean: maintainer-clean-recursive
 	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
 	-rm -rf $(top_srcdir)/autom4te.cache
-	-rm -rf ./$(DEPDIR) gnu/classpath/$(DEPDIR) gnu/gcj/$(DEPDIR) gnu/gcj/convert/$(DEPDIR) gnu/gcj/io/$(DEPDIR) gnu/gcj/runtime/$(DEPDIR) gnu/gcj/tools/gcj_dbtool/$(DEPDIR) gnu/gcj/util/$(DEPDIR) gnu/gcj/xlib/$(DEPDIR) gnu/java/lang/$(DEPDIR) gnu/java/net/$(DEPDIR) gnu/java/net/protocol/core/$(DEPDIR) gnu/java/nio/$(DEPDIR) gnu/java/nio/channels/$(DEPDIR) java/io/$(DEPDIR) java/lang/$(DEPDIR) java/lang/ref/$(DEPDIR) java/lang/reflect/$(DEPDIR) java/net/$(DEPDIR) java/nio/$(DEPDIR) java/nio/channels/$(DEPDIR) java/text/$(DEPDIR) java/util/$(DEPDIR) java/util/logging/$(DEPDIR) java/util/zip/$(DEPDIR)
+	-rm -rf ./$(DEPDIR) classpath/tools/$(DEPDIR) gnu/classpath/$(DEPDIR) gnu/gcj/$(DEPDIR) gnu/gcj/convert/$(DEPDIR) gnu/gcj/io/$(DEPDIR) gnu/gcj/runtime/$(DEPDIR) gnu/gcj/tools/gcj_dbtool/$(DEPDIR) gnu/gcj/util/$(DEPDIR) gnu/gcj/xlib/$(DEPDIR) gnu/java/lang/$(DEPDIR) gnu/java/net/$(DEPDIR) gnu/java/net/protocol/core/$(DEPDIR) gnu/java/nio/$(DEPDIR) gnu/java/nio/channels/$(DEPDIR) java/io/$(DEPDIR) java/lang/$(DEPDIR) java/lang/ref/$(DEPDIR) java/lang/reflect/$(DEPDIR) java/net/$(DEPDIR) java/nio/$(DEPDIR) java/nio/channels/$(DEPDIR) java/text/$(DEPDIR) java/util/$(DEPDIR) java/util/logging/$(DEPDIR) java/util/zip/$(DEPDIR)
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
Index: classpath/configure
===================================================================
--- classpath/configure	(revision 115021)
+++ classpath/configure	(working copy)
@@ -10007,7 +10007,7 @@
 /usr/openwin/share/include'
 
 if test "$ac_x_includes" = no; then
-  # Guess where to find include files, by looking for Intrinsic.h.
+  # Guess where to find include files, by looking for Xlib.h.
   # First, try using that file with no special directory specified.
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -10015,7 +10015,7 @@
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <X11/Intrinsic.h>
+#include <X11/Xlib.h>
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -10042,7 +10042,7 @@
 sed 's/^/| /' conftest.$ac_ext >&5
 
   for ac_dir in $ac_x_header_dirs; do
-  if test -r "$ac_dir/X11/Intrinsic.h"; then
+  if test -r "$ac_dir/X11/Xlib.h"; then
     ac_x_includes=$ac_dir
     break
   fi
@@ -10063,11 +10063,11 @@
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <X11/Intrinsic.h>
+#include <X11/Xlib.h>
 int
 main ()
 {
-XtMalloc (0)
+XrmInitialize ()
   ;
   return 0;
 }
@@ -18415,13 +18415,13 @@
 
 if test "x${COMPILE_WRAPPERS}" = xno
 then
-                              ac_config_files="$ac_config_files tools/appletviewer tools/jarsigner tools/keytool"
+                              ac_config_files="$ac_config_files tools/gappletviewer tools/gjarsigner tools/gkeytool"
 
-          ac_config_commands="$ac_config_commands appletviewer"
+          ac_config_commands="$ac_config_commands gappletviewer"
 
-          ac_config_commands="$ac_config_commands jarsigner"
+          ac_config_commands="$ac_config_commands gjarsigner"
 
-          ac_config_commands="$ac_config_commands keytool"
+          ac_config_commands="$ac_config_commands gkeytool"
 
 fi
 
@@ -19261,16 +19261,16 @@
   "tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
   "examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
   "examples/Makefile.jawt" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile.jawt" ;;
-  "tools/appletviewer" ) CONFIG_FILES="$CONFIG_FILES tools/appletviewer" ;;
-  "tools/jarsigner" ) CONFIG_FILES="$CONFIG_FILES tools/jarsigner" ;;
-  "tools/keytool" ) CONFIG_FILES="$CONFIG_FILES tools/keytool" ;;
+  "tools/gappletviewer" ) CONFIG_FILES="$CONFIG_FILES tools/gappletviewer" ;;
+  "tools/gjarsigner" ) CONFIG_FILES="$CONFIG_FILES tools/gjarsigner" ;;
+  "tools/gkeytool" ) CONFIG_FILES="$CONFIG_FILES tools/gkeytool" ;;
   "$ac_config_links_1" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
   "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
   "mkcollections.pl" ) CONFIG_COMMANDS="$CONFIG_COMMANDS mkcollections.pl" ;;
   "$ac_stdint_h" ) CONFIG_COMMANDS="$CONFIG_COMMANDS $ac_stdint_h" ;;
-  "appletviewer" ) CONFIG_COMMANDS="$CONFIG_COMMANDS appletviewer" ;;
-  "jarsigner" ) CONFIG_COMMANDS="$CONFIG_COMMANDS jarsigner" ;;
-  "keytool" ) CONFIG_COMMANDS="$CONFIG_COMMANDS keytool" ;;
+  "gappletviewer" ) CONFIG_COMMANDS="$CONFIG_COMMANDS gappletviewer" ;;
+  "gjarsigner" ) CONFIG_COMMANDS="$CONFIG_COMMANDS gjarsigner" ;;
+  "gkeytool" ) CONFIG_COMMANDS="$CONFIG_COMMANDS gkeytool" ;;
   "gen-classlist" ) CONFIG_COMMANDS="$CONFIG_COMMANDS gen-classlist" ;;
   "copy-vmresources" ) CONFIG_COMMANDS="$CONFIG_COMMANDS copy-vmresources" ;;
   "include/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;;
@@ -20843,9 +20843,9 @@
       mv $ac_stdint $ac_stdint_h
     fi
  ;;
-    appletviewer ) chmod 755 tools/appletviewer ;;
-    jarsigner ) chmod 755 tools/jarsigner ;;
-    keytool ) chmod 755 tools/keytool ;;
+    gappletviewer ) chmod 755 tools/gappletviewer ;;
+    gjarsigner ) chmod 755 tools/gjarsigner ;;
+    gkeytool ) chmod 755 tools/gkeytool ;;
     gen-classlist ) chmod 755 lib/gen-classlist.sh ;;
     copy-vmresources ) chmod 755 lib/copy-vmresources.sh ;;
   esac
Index: classpath/Makefile.in
===================================================================
--- classpath/Makefile.in	(revision 115021)
+++ classpath/Makefile.in	(working copy)
@@ -295,8 +295,8 @@
 vm_classes = @vm_classes@
 
 # lib first, to compile .class files before native code, last examples
-SUBDIRS = lib doc external include native resource scripts $(EXAMPLESDIR)
-DIST_SUBDIRS = lib doc external include native resource scripts examples
+SUBDIRS = lib doc external include native resource scripts tools $(EXAMPLESDIR)
+DIST_SUBDIRS = lib doc external include native resource scripts tools examples
 ACLOCAL_AMFLAGS = -I m4 -I ../.. -I ../../config
 EXTRA_DIST = HACKING BUGS THANKYOU mauve-classpath LICENSE \
              ChangeLog-2003 ChangeLog-2004 ChangeLog-2005 \
Index: classpath/tools/toolwrapper.c
===================================================================
--- classpath/tools/toolwrapper.c	(revision 115021)
+++ classpath/tools/toolwrapper.c	(working copy)
@@ -37,6 +37,8 @@
 exception statement from your version. */
 
 #include <jni.h>
+/* GCJ LOCAL: include ltdl.h */
+#include <ltdl.h>
 #include <string.h>
 #include <stdlib.h>
 #include "config.h"
@@ -51,6 +53,9 @@
   JNIEnv *jni_env;
 };
 
+/* GCJ LOCAL: typedef for JNI_CreateJavaVM dlopen call */
+typedef jint createVM (JavaVM **, void **, void *);
+
 int
 main (int argc, const char** argv)
 {
@@ -68,6 +73,10 @@
   int non_vm_argc;
   int i;
   int classpath_found = 0;
+  /* GCJ LOCAL: variables for JNI_CreateJavaVM dlopen call */
+  lt_dlhandle libjvm_handle = NULL;
+  createVM* libjvm_create = NULL;
+  int libjvm_error = 0;
 
   env = NULL;
   jvm = NULL;
@@ -152,8 +161,28 @@
   vm_args.version = JNI_VERSION_1_2;
   vm_args.ignoreUnrecognized = JNI_TRUE;
 
-  result = JNI_CreateJavaVM (&jvm, &tmp.void_env, &vm_args);
+  /* GCJ LOCAL: dlopen libjvm.so */
+  libjvm_error = lt_dlinit ();
+  if (libjvm_error)
+    {
+      fprintf (stderr, TOOLNAME ": lt_dlinit failed.\n");
+      goto destroy;
+    }
 
+  libjvm_handle = lt_dlopenext (LIBJVM);
+  if (!libjvm_handle)
+    {
+      fprintf (stderr, TOOLNAME ": failed to open " LIBJVM "\n");
+      goto destroy;
+    }
+  libjvm_create = (createVM*) lt_dlsym (libjvm_handle, "JNI_CreateJavaVM");
+  if (!libjvm_create)
+    {
+      fprintf (stderr, TOOLNAME ": failed to load JNI_CreateJavaVM symbol from " LIBJVM "\n");
+      goto destroy;
+    }
+  result = (*libjvm_create) (&jvm, &tmp.void_env, &vm_args);
+
   if (result < 0)
     {
       fprintf (stderr, TOOLNAME ": couldn't create virtual machine\n");
@@ -216,5 +245,15 @@
 	(*jvm)->DestroyJavaVM (jvm);
     }
 
+  /* GCJ LOCAL: libltdl cleanup */
+  if (libjvm_handle)
+    {
+      if (lt_dlclose (libjvm_handle) != 0)
+        fprintf (stderr, TOOLNAME ": failed to close " LIBJVM "\n");
+    }
+
+  if (lt_dlexit () != 0)
+    fprintf (stderr, TOOLNAME ": lt_dlexit failed.\n");
+
   return 1;
 }
Index: classpath/tools/gjarsigner.in
===================================================================
--- classpath/tools/gjarsigner.in	(revision 0)
+++ classpath/tools/gjarsigner.in	(revision 0)
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+## Copyright (C) 2006 Free Software Foundation, Inc.
+##
+## This file is a part of GNU Classpath.
+##
+## GNU Classpath is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or (at
+## your option) any later version.
+##
+## GNU Classpath is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with GNU Classpath; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
+## USA.
+##
+## Linking this library statically or dynamically with other modules is
+## making a combined work based on this library.  Thus, the terms and
+## conditions of the GNU General Public License cover the whole
+## combination.
+##
+## As a special exception, the copyright holders of this library give you
+## permission to link this library with independent modules to produce an
+## executable, regardless of the license terms of these independent
+## modules, and to copy and distribute the resulting executable under
+## terms of your choice, provided that you also meet, for each linked
+## independent module, the terms and conditions of the license of that
+## module.  An independent module is a module which is not derived from
+## or based on this library.  If you modify this library, you may extend
+## this exception to your version of the library, but you are not
+## obligated to do so.  If you do not wish to do so, delete this
+## exception statement from your version.
+##
+##
+## A simple shell script to launch the GNU Classpath jarsigner tool.
+##
+
+prefix=@prefix@
+tools_dir=@datadir@/@PACKAGE@
+tools_cp=${tools_dir}/tools.zip
+
+exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.jarsigner.Main $@
Index: classpath/tools/Makefile.in
===================================================================
--- classpath/tools/Makefile.in	(revision 115021)
+++ classpath/tools/Makefile.in	(working copy)
@@ -14,8 +14,6 @@
 
 @SET_MAKE@
 
-
-
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
 VPATH = @srcdir@
@@ -39,12 +37,10 @@
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-@CREATE_WRAPPERS_TRUE@bin_PROGRAMS = gappletviewer$(EXEEXT) \
-@CREATE_WRAPPERS_TRUE@	gjarsigner$(EXEEXT) gkeytool$(EXEEXT)
 subdir = tools
 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-	$(srcdir)/appletviewer.in $(srcdir)/jarsigner.in \
-	$(srcdir)/keytool.in
+	$(srcdir)/gappletviewer.in $(srcdir)/gjarsigner.in \
+	$(srcdir)/gkeytool.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../../libtool.m4 \
 	$(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \
@@ -57,53 +53,18 @@
 	$(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/include/config.h
-CONFIG_CLEAN_FILES = appletviewer jarsigner keytool
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \
-	"$(DESTDIR)$(TOOLSdir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-PROGRAMS = $(bin_PROGRAMS)
-am__gappletviewer_SOURCES_DIST = toolwrapper.c
-@CREATE_WRAPPERS_TRUE@am_gappletviewer_OBJECTS =  \
-@CREATE_WRAPPERS_TRUE@	gappletviewer-toolwrapper.$(OBJEXT)
-gappletviewer_OBJECTS = $(am_gappletviewer_OBJECTS)
-gappletviewer_LDADD = $(LDADD)
-am__gjarsigner_SOURCES_DIST = toolwrapper.c
-@CREATE_WRAPPERS_TRUE@am_gjarsigner_OBJECTS =  \
-@CREATE_WRAPPERS_TRUE@	gjarsigner-toolwrapper.$(OBJEXT)
-gjarsigner_OBJECTS = $(am_gjarsigner_OBJECTS)
-gjarsigner_LDADD = $(LDADD)
-am__gkeytool_SOURCES_DIST = toolwrapper.c
-@CREATE_WRAPPERS_TRUE@am_gkeytool_OBJECTS =  \
-@CREATE_WRAPPERS_TRUE@	gkeytool-toolwrapper.$(OBJEXT)
-gkeytool_OBJECTS = $(am_gkeytool_OBJECTS)
-gkeytool_LDADD = $(LDADD)
-binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
-SCRIPTS = $(bin_SCRIPTS)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(gappletviewer_SOURCES) $(gjarsigner_SOURCES) \
-	$(gkeytool_SOURCES)
-DIST_SOURCES = $(am__gappletviewer_SOURCES_DIST) \
-	$(am__gjarsigner_SOURCES_DIST) $(am__gkeytool_SOURCES_DIST)
+CONFIG_CLEAN_FILES = gappletviewer gjarsigner gkeytool
+SOURCES =
+DIST_SOURCES =
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
     *) f=$$p;; \
   esac;
 am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(TOOLSdir)"
 TOOLSDATA_INSTALL = $(INSTALL_DATA)
 DATA = $(TOOLS_DATA)
-ETAGS = etags
-CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMDEP_FALSE = @AMDEP_FALSE@
@@ -326,50 +287,56 @@
 
 # Setup the compiler to use the GNU Classpath library we just build
 @FOUND_GCJ_TRUE@JCOMPILER = $(GCJ) -encoding UTF-8 --bootclasspath $(GLIBJ_CLASSPATH) --classpath . -C
-@CREATE_WRAPPERS_FALSE@bin_SCRIPTS = appletviewer jarsigner keytool
-@CREATE_WRAPPERS_TRUE@bin_SCRIPTS = 
-@CREATE_WRAPPERS_TRUE@@FOUND_CACAO_FALSE@@FOUND_GCJ_FALSE@LIBJVM = 
-@CREATE_WRAPPERS_TRUE@@FOUND_CACAO_TRUE@@FOUND_GCJ_FALSE@LIBJVM = -ljvm
-@CREATE_WRAPPERS_TRUE@@FOUND_GCJ_TRUE@LIBJVM = -lgcj
 
-# Some architecture independent data to be installed.
-@CREATE_WRAPPERS_TRUE@TOOLS_DATA = $(TOOLS_ZIP)
+# if CREATE_WRAPPERS
+# bin_SCRIPTS =
+# bin_PROGRAMS = gappletviewer gjarsigner gkeytool
 
-# Where we want these data files installed.
-@CREATE_WRAPPERS_TRUE@TOOLSdir = $(datadir)/java
+# if FOUND_GCJ
+# LIBJVM = -lgcj
+# else
+# if FOUND_CACAO
+# LIBJVM = -ljvm
+# else
+# LIBJVM =
+# endif
+# endif
 
-# The zip files with classes we want to produce.
-@CREATE_WRAPPERS_TRUE@TOOLS_ZIP = libgcj-tools-$(gcc_version).jar
-@CREATE_WRAPPERS_TRUE@gcc_version := $(shell cat $(top_srcdir)/../../gcc/BASE-VER)
-@CREATE_WRAPPERS_TRUE@gappletviewer_SOURCES = toolwrapper.c
-@CREATE_WRAPPERS_TRUE@gappletviewer_CFLAGS = -Wall \
-@CREATE_WRAPPERS_TRUE@	-I$(top_srcdir)/include \
-@CREATE_WRAPPERS_TRUE@	-DTOOLS_ZIP="\"$(TOOLSdir)/$(TOOLS_ZIP)\"" \
-@CREATE_WRAPPERS_TRUE@	-DTOOLPACKAGE="\"appletviewer\"" \
-@CREATE_WRAPPERS_TRUE@	-DTOOLNAME="\"gappletviewer\""
+# AM_CPPFLAGS = -Wall \
+# 	-I$(top_srcdir)/include \
+# 	-DTOOLS_ZIP="\"$(TOOLSdir)/$(TOOLS_ZIP)\""
 
-@CREATE_WRAPPERS_TRUE@gappletviewer_LDFLAGS = -L$(libdir) $(LIBJVM)
-@CREATE_WRAPPERS_TRUE@gjarsigner_SOURCES = toolwrapper.c
-@CREATE_WRAPPERS_TRUE@gjarsigner_CFLAGS = -Wall \
-@CREATE_WRAPPERS_TRUE@	-I$(top_srcdir)/include \
-@CREATE_WRAPPERS_TRUE@	-DTOOLS_ZIP="\"$(TOOLSdir)/$(TOOLS_ZIP)\"" \
-@CREATE_WRAPPERS_TRUE@	-DTOOLPACKAGE="\"jarsigner\"" \
-@CREATE_WRAPPERS_TRUE@	-DTOOLNAME="\"gjarsigner\""
+# gappletviewer_SOURCES = toolwrapper.c
+# gappletviewer_CFLAGS = \
+# 	-DTOOLPACKAGE="\"appletviewer\"" \
+# 	-DTOOLNAME="\"gappletviewer\""
+# gappletviewer_LDFLAGS = -L$(libdir) $(LIBJVM)
 
-@CREATE_WRAPPERS_TRUE@gjarsigner_LDFLAGS = -L$(libdir) $(LIBJVM)
-@CREATE_WRAPPERS_TRUE@gkeytool_SOURCES = toolwrapper.c
-@CREATE_WRAPPERS_TRUE@gkeytool_CFLAGS = -Wall \
-@CREATE_WRAPPERS_TRUE@	-I$(top_srcdir)/include \
-@CREATE_WRAPPERS_TRUE@	-DTOOLS_ZIP="\"$(TOOLSdir)/$(TOOLS_ZIP)\"" \
-@CREATE_WRAPPERS_TRUE@	-DTOOLPACKAGE="\"keytool\"" \
-@CREATE_WRAPPERS_TRUE@	-DTOOLNAME="\"gkeytool\""
+# gjarsigner_SOURCES = toolwrapper.c
+# gjarsigner_CFLAGS = \
+# 	-DTOOLPACKAGE="\"jarsigner\"" \
+# 	-DTOOLNAME="\"gjarsigner\""
+# gjarsigner_LDFLAGS = -L$(libdir) $(LIBJVM)
 
-@CREATE_WRAPPERS_TRUE@gkeytool_LDFLAGS = -L$(libdir) $(LIBJVM)
-EXTRA_DIST = toolwrapper.c appletviewer.in jarsigner.in keytool.in
+# gkeytool_SOURCES = toolwrapper.c
+# gkeytool_CFLAGS = \
+# 	-DTOOLPACKAGE="\"keytool\"" \
+# 	-DTOOLNAME="\"gkeytool\""
+# gkeytool_LDFLAGS = -L$(libdir) $(LIBJVM)
 
+# else
+# bin_SCRIPTS = gappletviewer gjarsigner gkeytool
+# bin_PROGRAMS =
+# endif
+EXTRA_DIST = toolwrapper.c gappletviewer.in gjarsigner.in gkeytool.in
+
 # All our example java source files
 TOOLS_JAVA_FILES = $(srcdir)/gnu/classpath/tools/*.java $(srcdir)/gnu/classpath/tools/*/*.java $(srcdir)/gnu/classpath/tools/*/*/*.java
 
+# The zip files with classes we want to produce.
+gcc_version := $(shell cat $(top_srcdir)/../../gcc/BASE-VER)
+TOOLS_ZIP = libgcj-tools-$(gcc_version).jar
+
 # Extra objects that will not exist until configure-time
 BUILT_SOURCES = $(TOOLS_ZIP)
 
@@ -388,11 +355,16 @@
 
 # All the files we find "interesting"
 ALL_TOOLS_FILES = $(TOOLS_JAVA_FILES) $(TOOLS_TEMPLATES) $(TOOLS_HELPS)
+
+# Some architecture independent data to be installed.
+TOOLS_DATA = $(TOOLS_ZIP)
+
+# Where we want these data files installed.
+TOOLSdir = $(datadir)/java
 all: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) all-am
 
 .SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
@@ -422,158 +394,13 @@
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-appletviewer: $(top_builddir)/config.status $(srcdir)/appletviewer.in
+gappletviewer: $(top_builddir)/config.status $(srcdir)/gappletviewer.in
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-jarsigner: $(top_builddir)/config.status $(srcdir)/jarsigner.in
+gjarsigner: $(top_builddir)/config.status $(srcdir)/gjarsigner.in
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-keytool: $(top_builddir)/config.status $(srcdir)/keytool.in
+gkeytool: $(top_builddir)/config.status $(srcdir)/gkeytool.in
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-install-binPROGRAMS: $(bin_PROGRAMS)
-	@$(NORMAL_INSTALL)
-	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
-	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  if test -f $$p \
-	     || test -f $$p1 \
-	  ; then \
-	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
-	  else :; fi; \
-	done
 
-uninstall-binPROGRAMS:
-	@$(NORMAL_UNINSTALL)
-	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
-	done
-
-clean-binPROGRAMS:
-	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
-
-installcheck-binPROGRAMS: $(bin_PROGRAMS)
-	bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \
-	  case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
-	   *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
-	  esac; \
-	  f=`echo "$$p" | \
-	     sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-	  for opt in --help --version; do \
-	    if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \
-	         2>c$${pid}_.err </dev/null \
-		 && test -n "`cat c$${pid}_.out`" \
-		 && test -z "`cat c$${pid}_.err`"; then :; \
-	    else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
-	  done; \
-	done; rm -f c$${pid}_.???; exit $$bad
-gappletviewer$(EXEEXT): $(gappletviewer_OBJECTS) $(gappletviewer_DEPENDENCIES) 
-	@rm -f gappletviewer$(EXEEXT)
-	$(LINK) $(gappletviewer_LDFLAGS) $(gappletviewer_OBJECTS) $(gappletviewer_LDADD) $(LIBS)
-gjarsigner$(EXEEXT): $(gjarsigner_OBJECTS) $(gjarsigner_DEPENDENCIES) 
-	@rm -f gjarsigner$(EXEEXT)
-	$(LINK) $(gjarsigner_LDFLAGS) $(gjarsigner_OBJECTS) $(gjarsigner_LDADD) $(LIBS)
-gkeytool$(EXEEXT): $(gkeytool_OBJECTS) $(gkeytool_DEPENDENCIES) 
-	@rm -f gkeytool$(EXEEXT)
-	$(LINK) $(gkeytool_LDFLAGS) $(gkeytool_OBJECTS) $(gkeytool_LDADD) $(LIBS)
-install-binSCRIPTS: $(bin_SCRIPTS)
-	@$(NORMAL_INSTALL)
-	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
-	@list='$(bin_SCRIPTS)'; for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  if test -f $$d$$p; then \
-	    f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-	    echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-	    $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
-	  else :; fi; \
-	done
-
-uninstall-binSCRIPTS:
-	@$(NORMAL_UNINSTALL)
-	@list='$(bin_SCRIPTS)'; for p in $$list; do \
-	  f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
-	done
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gappletviewer-toolwrapper.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gjarsigner-toolwrapper.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gkeytool-toolwrapper.Po@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
-
-gappletviewer-toolwrapper.o: toolwrapper.c
-@am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gappletviewer_CFLAGS) $(CFLAGS) -MT gappletviewer-toolwrapper.o -MD -MP -MF "$(DEPDIR)/gappletviewer-toolwrapper.Tpo" -c -o gappletviewer-toolwrapper.o `test -f 'toolwrapper.c' || echo '$(srcdir)/'`toolwrapper.c; \
-@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/gappletviewer-toolwrapper.Tpo" "$(DEPDIR)/gappletviewer-toolwrapper.Po"; else rm -f "$(DEPDIR)/gappletviewer-toolwrapper.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='toolwrapper.c' object='gappletviewer-toolwrapper.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gappletviewer_CFLAGS) $(CFLAGS) -c -o gappletviewer-toolwrapper.o `test -f 'toolwrapper.c' || echo '$(srcdir)/'`toolwrapper.c
-
-gappletviewer-toolwrapper.obj: toolwrapper.c
-@am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gappletviewer_CFLAGS) $(CFLAGS) -MT gappletviewer-toolwrapper.obj -MD -MP -MF "$(DEPDIR)/gappletviewer-toolwrapper.Tpo" -c -o gappletviewer-toolwrapper.obj `if test -f 'toolwrapper.c'; then $(CYGPATH_W) 'toolwrapper.c'; else $(CYGPATH_W) '$(srcdir)/toolwrapper.c'; fi`; \
-@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/gappletviewer-toolwrapper.Tpo" "$(DEPDIR)/gappletviewer-toolwrapper.Po"; else rm -f "$(DEPDIR)/gappletviewer-toolwrapper.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='toolwrapper.c' object='gappletviewer-toolwrapper.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gappletviewer_CFLAGS) $(CFLAGS) -c -o gappletviewer-toolwrapper.obj `if test -f 'toolwrapper.c'; then $(CYGPATH_W) 'toolwrapper.c'; else $(CYGPATH_W) '$(srcdir)/toolwrapper.c'; fi`
-
-gjarsigner-toolwrapper.o: toolwrapper.c
-@am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gjarsigner_CFLAGS) $(CFLAGS) -MT gjarsigner-toolwrapper.o -MD -MP -MF "$(DEPDIR)/gjarsigner-toolwrapper.Tpo" -c -o gjarsigner-toolwrapper.o `test -f 'toolwrapper.c' || echo '$(srcdir)/'`toolwrapper.c; \
-@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/gjarsigner-toolwrapper.Tpo" "$(DEPDIR)/gjarsigner-toolwrapper.Po"; else rm -f "$(DEPDIR)/gjarsigner-toolwrapper.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='toolwrapper.c' object='gjarsigner-toolwrapper.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gjarsigner_CFLAGS) $(CFLAGS) -c -o gjarsigner-toolwrapper.o `test -f 'toolwrapper.c' || echo '$(srcdir)/'`toolwrapper.c
-
-gjarsigner-toolwrapper.obj: toolwrapper.c
-@am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gjarsigner_CFLAGS) $(CFLAGS) -MT gjarsigner-toolwrapper.obj -MD -MP -MF "$(DEPDIR)/gjarsigner-toolwrapper.Tpo" -c -o gjarsigner-toolwrapper.obj `if test -f 'toolwrapper.c'; then $(CYGPATH_W) 'toolwrapper.c'; else $(CYGPATH_W) '$(srcdir)/toolwrapper.c'; fi`; \
-@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/gjarsigner-toolwrapper.Tpo" "$(DEPDIR)/gjarsigner-toolwrapper.Po"; else rm -f "$(DEPDIR)/gjarsigner-toolwrapper.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='toolwrapper.c' object='gjarsigner-toolwrapper.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gjarsigner_CFLAGS) $(CFLAGS) -c -o gjarsigner-toolwrapper.obj `if test -f 'toolwrapper.c'; then $(CYGPATH_W) 'toolwrapper.c'; else $(CYGPATH_W) '$(srcdir)/toolwrapper.c'; fi`
-
-gkeytool-toolwrapper.o: toolwrapper.c
-@am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gkeytool_CFLAGS) $(CFLAGS) -MT gkeytool-toolwrapper.o -MD -MP -MF "$(DEPDIR)/gkeytool-toolwrapper.Tpo" -c -o gkeytool-toolwrapper.o `test -f 'toolwrapper.c' || echo '$(srcdir)/'`toolwrapper.c; \
-@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/gkeytool-toolwrapper.Tpo" "$(DEPDIR)/gkeytool-toolwrapper.Po"; else rm -f "$(DEPDIR)/gkeytool-toolwrapper.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='toolwrapper.c' object='gkeytool-toolwrapper.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gkeytool_CFLAGS) $(CFLAGS) -c -o gkeytool-toolwrapper.o `test -f 'toolwrapper.c' || echo '$(srcdir)/'`toolwrapper.c
-
-gkeytool-toolwrapper.obj: toolwrapper.c
-@am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gkeytool_CFLAGS) $(CFLAGS) -MT gkeytool-toolwrapper.obj -MD -MP -MF "$(DEPDIR)/gkeytool-toolwrapper.Tpo" -c -o gkeytool-toolwrapper.obj `if test -f 'toolwrapper.c'; then $(CYGPATH_W) 'toolwrapper.c'; else $(CYGPATH_W) '$(srcdir)/toolwrapper.c'; fi`; \
-@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/gkeytool-toolwrapper.Tpo" "$(DEPDIR)/gkeytool-toolwrapper.Po"; else rm -f "$(DEPDIR)/gkeytool-toolwrapper.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='toolwrapper.c' object='gkeytool-toolwrapper.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gkeytool_CFLAGS) $(CFLAGS) -c -o gkeytool-toolwrapper.obj `if test -f 'toolwrapper.c'; then $(CYGPATH_W) 'toolwrapper.c'; else $(CYGPATH_W) '$(srcdir)/toolwrapper.c'; fi`
-
 mostlyclean-libtool:
 	-rm -f *.lo
 
@@ -600,55 +427,13 @@
 	  echo " rm -f '$(DESTDIR)$(TOOLSdir)/$$f'"; \
 	  rm -f "$(DESTDIR)$(TOOLSdir)/$$f"; \
 	done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	mkid -fID $$unique
 tags: TAGS
+TAGS:
 
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
-	fi
 ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+CTAGS:
 
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
 
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
@@ -682,9 +467,9 @@
 check-am: all-am
 check: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA)
+all-am: Makefile $(DATA)
 installdirs:
-	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(TOOLSdir)"; do \
+	for dir in "$(DESTDIR)$(TOOLSdir)"; do \
 	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
 	done
 install: $(BUILT_SOURCES)
@@ -715,14 +500,11 @@
 	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
 clean: clean-am
 
-clean-am: clean-binPROGRAMS clean-generic clean-libtool clean-local \
-	mostlyclean-am
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
 
 distclean: distclean-am
-	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+distclean-am: clean-am distclean-generic distclean-libtool
 
 dvi: dvi-am
 
@@ -736,23 +518,21 @@
 
 install-data-am: install-TOOLSDATA
 
-install-exec-am: install-binPROGRAMS install-binSCRIPTS
+install-exec-am:
 
 install-info: install-info-am
 
 install-man:
 
-installcheck-am: installcheck-binPROGRAMS installcheck-binSCRIPTS
+installcheck-am:
 
 maintainer-clean: maintainer-clean-am
-	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
 mostlyclean: mostlyclean-am
 
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
 
 pdf: pdf-am
 
@@ -762,23 +542,18 @@
 
 ps-am:
 
-uninstall-am: uninstall-TOOLSDATA uninstall-binPROGRAMS \
-	uninstall-binSCRIPTS uninstall-info-am
+uninstall-am: uninstall-TOOLSDATA uninstall-info-am
 
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
-	clean-generic clean-libtool clean-local ctags dist-hook \
-	distclean distclean-compile distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-TOOLSDATA install-am \
-	install-binPROGRAMS install-binSCRIPTS install-data \
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	clean-local dist-hook distclean distclean-generic \
+	distclean-libtool distdir dvi dvi-am html html-am info info-am \
+	install install-TOOLSDATA install-am install-data \
 	install-data-am install-exec install-exec-am install-info \
 	install-info-am install-man install-strip installcheck \
-	installcheck-am installcheck-binPROGRAMS \
-	installcheck-binSCRIPTS installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags uninstall uninstall-TOOLSDATA uninstall-am \
-	uninstall-binPROGRAMS uninstall-binSCRIPTS uninstall-info-am
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am uninstall \
+	uninstall-TOOLSDATA uninstall-am uninstall-info-am
 
 @FOUND_ECJ_FALSE@@FOUND_GCJX_FALSE@@FOUND_GCJ_FALSE@@FOUND_JIKES_FALSE@error dunno how to setup the JCOMPILER and compile
 
Index: classpath/tools/gkeytool.in
===================================================================
--- classpath/tools/gkeytool.in	(revision 0)
+++ classpath/tools/gkeytool.in	(revision 0)
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+## Copyright (C) 2006 Free Software Foundation, Inc.
+##
+## This file is a part of GNU Classpath.
+##
+## GNU Classpath is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or (at
+## your option) any later version.
+##
+## GNU Classpath is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with GNU Classpath; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
+## USA.
+##
+## Linking this library statically or dynamically with other modules is
+## making a combined work based on this library.  Thus, the terms and
+## conditions of the GNU General Public License cover the whole
+## combination.
+##
+## As a special exception, the copyright holders of this library give you
+## permission to link this library with independent modules to produce an
+## executable, regardless of the license terms of these independent
+## modules, and to copy and distribute the resulting executable under
+## terms of your choice, provided that you also meet, for each linked
+## independent module, the terms and conditions of the license of that
+## module.  An independent module is a module which is not derived from
+## or based on this library.  If you modify this library, you may extend
+## this exception to your version of the library, but you are not
+## obligated to do so.  If you do not wish to do so, delete this
+## exception statement from your version.
+##
+##
+## A simple shell script to launch the GNU Classpath keytool tool.
+##
+
+prefix=@prefix@
+tools_dir=@datadir@/@PACKAGE@
+tools_cp=${tools_dir}/tools.zip
+
+exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.keytool.Main $@
Index: classpath/tools/gappletviewer.in
===================================================================
--- classpath/tools/gappletviewer.in	(revision 0)
+++ classpath/tools/gappletviewer.in	(revision 0)
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+## Copyright (C) 2006 Free Software Foundation, Inc.
+##
+## This file is a part of GNU Classpath.
+##
+## GNU Classpath is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or (at
+## your option) any later version.
+##
+## GNU Classpath is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with GNU Classpath; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
+## USA.
+##
+## Linking this library statically or dynamically with other modules is
+## making a combined work based on this library.  Thus, the terms and
+## conditions of the GNU General Public License cover the whole
+## combination.
+##
+## As a special exception, the copyright holders of this library give you
+## permission to link this library with independent modules to produce an
+## executable, regardless of the license terms of these independent
+## modules, and to copy and distribute the resulting executable under
+## terms of your choice, provided that you also meet, for each linked
+## independent module, the terms and conditions of the license of that
+## module.  An independent module is a module which is not derived from
+## or based on this library.  If you modify this library, you may extend
+## this exception to your version of the library, but you are not
+## obligated to do so.  If you do not wish to do so, delete this
+## exception statement from your version.
+##
+## A simple shell script to launch the GNU Classpath appletviewer tool.
+##
+
+prefix=@prefix@
+tools_dir=@datadir@/@PACKAGE@
+tools_cp=${tools_dir}/tools.zip
+
+exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.appletviewer.Main $@
Index: classpath/tools/Makefile.am
===================================================================
--- classpath/tools/Makefile.am	(revision 115021)
+++ classpath/tools/Makefile.am	(working copy)
@@ -21,67 +21,59 @@
 endif
 endif
 
-if CREATE_WRAPPERS
-bin_SCRIPTS =
-bin_PROGRAMS = gappletviewer gjarsigner gkeytool
+## GCJ LOCAL: do not build and install wrapper binaries here, since
+## the build ordering will not work.  Instead build them in
+## gcc/libjava/Makefile.am.
+# if CREATE_WRAPPERS
+# bin_SCRIPTS =
+# bin_PROGRAMS = gappletviewer gjarsigner gkeytool
 
-if FOUND_GCJ
-LIBJVM = -lgcj
-else
-if FOUND_CACAO
-LIBJVM = -ljvm
-else
-LIBJVM =
-endif
-endif
+# if FOUND_GCJ
+# LIBJVM = -lgcj
+# else
+# if FOUND_CACAO
+# LIBJVM = -ljvm
+# else
+# LIBJVM =
+# endif
+# endif
 
-# Some architecture independent data to be installed.
-TOOLS_DATA = $(TOOLS_ZIP)
+# AM_CPPFLAGS = -Wall \
+# 	-I$(top_srcdir)/include \
+# 	-DTOOLS_ZIP="\"$(TOOLSdir)/$(TOOLS_ZIP)\""
 
-# Where we want these data files installed.
-## GCJ LOCAL: install libgcj-tools.jar alongside libgcj.jar.
-TOOLSdir = $(datadir)/java
+# gappletviewer_SOURCES = toolwrapper.c
+# gappletviewer_CFLAGS = \
+# 	-DTOOLPACKAGE="\"appletviewer\"" \
+# 	-DTOOLNAME="\"gappletviewer\""
+# gappletviewer_LDFLAGS = -L$(libdir) $(LIBJVM)
 
-# The zip files with classes we want to produce.
-## GCJ LOCAL: rename tools.zip libgcj-tools-$(gcc_version).jar
-TOOLS_ZIP = libgcj-tools-$(gcc_version).jar
+# gjarsigner_SOURCES = toolwrapper.c
+# gjarsigner_CFLAGS = \
+# 	-DTOOLPACKAGE="\"jarsigner\"" \
+# 	-DTOOLNAME="\"gjarsigner\""
+# gjarsigner_LDFLAGS = -L$(libdir) $(LIBJVM)
 
-## GCJ LOCAL: calculate GCC version
-gcc_version := $(shell cat $(top_srcdir)/../../gcc/BASE-VER)
+# gkeytool_SOURCES = toolwrapper.c
+# gkeytool_CFLAGS = \
+# 	-DTOOLPACKAGE="\"keytool\"" \
+# 	-DTOOLNAME="\"gkeytool\""
+# gkeytool_LDFLAGS = -L$(libdir) $(LIBJVM)
 
-gappletviewer_SOURCES = toolwrapper.c
-gappletviewer_CFLAGS = -Wall \
-	-I$(top_srcdir)/include \
-	-DTOOLS_ZIP="\"$(TOOLSdir)/$(TOOLS_ZIP)\"" \
-	-DTOOLPACKAGE="\"appletviewer\"" \
-	-DTOOLNAME="\"gappletviewer\""
-gappletviewer_LDFLAGS = -L$(libdir) $(LIBJVM)
+# else
+# bin_SCRIPTS = gappletviewer gjarsigner gkeytool
+# bin_PROGRAMS =
+# endif
+EXTRA_DIST = toolwrapper.c gappletviewer.in gjarsigner.in gkeytool.in
 
-gjarsigner_SOURCES = toolwrapper.c
-gjarsigner_CFLAGS = -Wall \
-	-I$(top_srcdir)/include \
-	-DTOOLS_ZIP="\"$(TOOLSdir)/$(TOOLS_ZIP)\"" \
-	-DTOOLPACKAGE="\"jarsigner\"" \
-	-DTOOLNAME="\"gjarsigner\""
-gjarsigner_LDFLAGS = -L$(libdir) $(LIBJVM)
-
-gkeytool_SOURCES = toolwrapper.c
-gkeytool_CFLAGS = -Wall \
-	-I$(top_srcdir)/include \
-	-DTOOLS_ZIP="\"$(TOOLSdir)/$(TOOLS_ZIP)\"" \
-	-DTOOLPACKAGE="\"keytool\"" \
-	-DTOOLNAME="\"gkeytool\""
-gkeytool_LDFLAGS = -L$(libdir) $(LIBJVM)
-
-else
-bin_SCRIPTS = appletviewer jarsigner keytool
-bin_PROGRAMS =
-endif
-EXTRA_DIST = toolwrapper.c appletviewer.in jarsigner.in keytool.in
-
 # All our example java source files
 TOOLS_JAVA_FILES = $(srcdir)/gnu/classpath/tools/*.java $(srcdir)/gnu/classpath/tools/*/*.java $(srcdir)/gnu/classpath/tools/*/*/*.java
 
+# The zip files with classes we want to produce.
+## GCJ LOCAL: rename tools.zip to libgcj-tools-$(gcc_version).jar
+gcc_version := $(shell cat $(top_srcdir)/../../gcc/BASE-VER)
+TOOLS_ZIP = libgcj-tools-$(gcc_version).jar
+
 # Extra objects that will not exist until configure-time
 BUILT_SOURCES = $(TOOLS_ZIP)
 
@@ -103,6 +95,13 @@
 # All the files we find "interesting"
 ALL_TOOLS_FILES = $(TOOLS_JAVA_FILES) $(TOOLS_TEMPLATES) $(TOOLS_HELPS)
 
+# Some architecture independent data to be installed.
+TOOLS_DATA = $(TOOLS_ZIP)
+
+# Where we want these data files installed.
+## GCJ LOCAL: install libgcj-tools.jar alongside libgcj.jar.
+TOOLSdir = $(datadir)/java
+
 # Make sure everything is included in the distribution.
 dist-hook:
 	srcdir_cnt=`echo $(srcdir) | wc -c`; \
@@ -121,6 +120,7 @@
 # the class files. Always regenerate all .class files and remove them
 # immediately.  And copy the template files we use to the classes dir
 # so they get also included.
+## GCJ LOCAL: assume FASTJAR since we pass --with-fastjar to configure
 $(TOOLS_ZIP): $(TOOLS_JAVA_FILES)
 	mkdir -p classes/gnu/classpath/tools/giop/grmic/templates
 	mkdir -p classes/gnu/classpath/tools/rmi/rmic/templates
Index: classpath/tools/jarsigner.in
===================================================================
--- classpath/tools/jarsigner.in	(revision 115021)
+++ classpath/tools/jarsigner.in	(working copy)
@@ -1,47 +0,0 @@
-#!/bin/sh
-
-## Copyright (C) 2006 Free Software Foundation, Inc.
-##
-## This file is a part of GNU Classpath.
-##
-## GNU Classpath is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or (at
-## your option) any later version.
-##
-## GNU Classpath is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with GNU Classpath; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
-## USA.
-##
-## Linking this library statically or dynamically with other modules is
-## making a combined work based on this library.  Thus, the terms and
-## conditions of the GNU General Public License cover the whole
-## combination.
-##
-## As a special exception, the copyright holders of this library give you
-## permission to link this library with independent modules to produce an
-## executable, regardless of the license terms of these independent
-## modules, and to copy and distribute the resulting executable under
-## terms of your choice, provided that you also meet, for each linked
-## independent module, the terms and conditions of the license of that
-## module.  An independent module is a module which is not derived from
-## or based on this library.  If you modify this library, you may extend
-## this exception to your version of the library, but you are not
-## obligated to do so.  If you do not wish to do so, delete this
-## exception statement from your version.
-##
-##
-## A simple shell script to launch the GNU Classpath jarsigner tool.
-##
-
-prefix=@prefix@
-tools_dir=@datadir@/@PACKAGE@
-tools_cp=${tools_dir}/tools.zip
-
-exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.jarsigner.Main $@
Index: classpath/tools/keytool.in
===================================================================
--- classpath/tools/keytool.in	(revision 115021)
+++ classpath/tools/keytool.in	(working copy)
@@ -1,47 +0,0 @@
-#!/bin/sh
-
-## Copyright (C) 2006 Free Software Foundation, Inc.
-##
-## This file is a part of GNU Classpath.
-##
-## GNU Classpath is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or (at
-## your option) any later version.
-##
-## GNU Classpath is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with GNU Classpath; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
-## USA.
-##
-## Linking this library statically or dynamically with other modules is
-## making a combined work based on this library.  Thus, the terms and
-## conditions of the GNU General Public License cover the whole
-## combination.
-##
-## As a special exception, the copyright holders of this library give you
-## permission to link this library with independent modules to produce an
-## executable, regardless of the license terms of these independent
-## modules, and to copy and distribute the resulting executable under
-## terms of your choice, provided that you also meet, for each linked
-## independent module, the terms and conditions of the license of that
-## module.  An independent module is a module which is not derived from
-## or based on this library.  If you modify this library, you may extend
-## this exception to your version of the library, but you are not
-## obligated to do so.  If you do not wish to do so, delete this
-## exception statement from your version.
-##
-##
-## A simple shell script to launch the GNU Classpath keytool tool.
-##
-
-prefix=@prefix@
-tools_dir=@datadir@/@PACKAGE@
-tools_cp=${tools_dir}/tools.zip
-
-exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.keytool.Main $@
Index: classpath/tools/appletviewer.in
===================================================================
--- classpath/tools/appletviewer.in	(revision 115021)
+++ classpath/tools/appletviewer.in	(working copy)
@@ -1,46 +0,0 @@
-#!/bin/sh
-
-## Copyright (C) 2006 Free Software Foundation, Inc.
-##
-## This file is a part of GNU Classpath.
-##
-## GNU Classpath is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or (at
-## your option) any later version.
-##
-## GNU Classpath is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with GNU Classpath; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
-## USA.
-##
-## Linking this library statically or dynamically with other modules is
-## making a combined work based on this library.  Thus, the terms and
-## conditions of the GNU General Public License cover the whole
-## combination.
-##
-## As a special exception, the copyright holders of this library give you
-## permission to link this library with independent modules to produce an
-## executable, regardless of the license terms of these independent
-## modules, and to copy and distribute the resulting executable under
-## terms of your choice, provided that you also meet, for each linked
-## independent module, the terms and conditions of the license of that
-## module.  An independent module is a module which is not derived from
-## or based on this library.  If you modify this library, you may extend
-## this exception to your version of the library, but you are not
-## obligated to do so.  If you do not wish to do so, delete this
-## exception statement from your version.
-##
-## A simple shell script to launch the GNU Classpath appletviewer tool.
-##
-
-prefix=@prefix@
-tools_dir=@datadir@/@PACKAGE@
-tools_cp=${tools_dir}/tools.zip
-
-exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.appletviewer.Main $@
Index: classpath/configure.ac
===================================================================
--- classpath/configure.ac	(revision 115021)
+++ classpath/configure.ac	(working copy)
@@ -739,12 +739,12 @@
 
 if test "x${COMPILE_WRAPPERS}" = xno
 then
-AC_CONFIG_FILES([tools/appletviewer
-tools/jarsigner
-tools/keytool])
-AC_CONFIG_COMMANDS([appletviewer],[chmod 755 tools/appletviewer])
-AC_CONFIG_COMMANDS([jarsigner],[chmod 755 tools/jarsigner])
-AC_CONFIG_COMMANDS([keytool],[chmod 755 tools/keytool])
+AC_CONFIG_FILES([tools/gappletviewer
+tools/gjarsigner
+tools/gkeytool])
+AC_CONFIG_COMMANDS([gappletviewer],[chmod 755 tools/gappletviewer])
+AC_CONFIG_COMMANDS([gjarsigner],[chmod 755 tools/gjarsigner])
+AC_CONFIG_COMMANDS([gkeytool],[chmod 755 tools/gkeytool])
 fi
 
 AC_CONFIG_COMMANDS([gen-classlist],[chmod 755 lib/gen-classlist.sh])
Index: classpath/Makefile.am
===================================================================
--- classpath/Makefile.am	(revision 115021)
+++ classpath/Makefile.am	(working copy)
@@ -1,9 +1,8 @@
 ## Input file for automake to generate the Makefile.in used by configure
 
 # lib first, to compile .class files before native code, last examples
-## GCJ LOCAL: exclude tools directory
-SUBDIRS = lib doc external include native resource scripts $(EXAMPLESDIR)
-DIST_SUBDIRS = lib doc external include native resource scripts examples
+SUBDIRS = lib doc external include native resource scripts tools $(EXAMPLESDIR)
+DIST_SUBDIRS = lib doc external include native resource scripts tools examples
 
 ## GCJ LOCAL: we need an extra -I here.
 ACLOCAL_AMFLAGS = -I m4 -I ../.. -I ../../config
Index: classpath/aclocal.m4
===================================================================
--- classpath/aclocal.m4	(revision 115021)
+++ classpath/aclocal.m4	(working copy)
@@ -468,6 +468,27 @@
 install_sh=${install_sh-"$am_aux_dir/install-sh"}
 AC_SUBST(install_sh)])
 
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 # From Jim Meyering
 
@@ -873,8 +894,6 @@
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
-m4_include([../../config/depstand.m4])
-m4_include([../../config/lead-dot.m4])
 m4_include([../../libtool.m4])
 m4_include([m4/acattribute.m4])
 m4_include([m4/accross.m4])
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 115036)
+++ ChangeLog	(working copy)
@@ -1,3 +1,25 @@
+2006-06-27  Thomas Fitzsimmons  <fitzsim@redhat.com>
+
+	* classpath/tools/toolwrapper.c: dlopen libjvm.so.
+	* classpath/tools/Makefile.am: Comment out binary wrapper build
+	logic.  Rename tools.zip libgcj-tools-$(gcc_version).jar and
+	install in jardir.
+	* classpath/tools/Makefile.in: Regenerate.
+	* classpath/tools/jarsigner.in: Rename ...
+	* classpath/tools/gjarsigner.in: New file.
+	* classpath/tools/keytool.in: Rename ...
+	* classpath/tools/gkeytool.in: New file.
+	* classpath/tools/appletviewer.in: Rename ...
+	* classpath/tools/gappletviewer.in: New file.
+	* classpath/configure.ac: Rename tool wrapper scripts.
+	* classpath/configure: Regenerate.
+	* classpath/Makefile.am (SUBDIRS, DIST_SUBDIRS): Add tools.
+	* classpath/Makefile.in: Regenerate.
+	* classpath/aclocal.m4: Regenerate.
+	* Makefile.am (bin_PROGRAMS): Add gappletviewer, gjarsigner and
+	gkeytool.
+	* Makefile.in: Regenerate.
+
 2006-06-27  Marco Trudel  <mtrudel@gmx.ch>
 
 	* boehm.cc (_Jv_SuspendThread, _Jv_ResumeThread): Define
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 115021)
+++ Makefile.am	(working copy)
@@ -68,7 +68,8 @@
 
 ## For now, only on native systems.  FIXME.
 if NATIVE
-bin_PROGRAMS = jv-convert gij grmic grmiregistry gcj-dbtool
+bin_PROGRAMS = jv-convert gij grmic grmiregistry gcj-dbtool \
+	gappletviewer gjarsigner gkeytool
 
 ## It is convenient to actually build and install the default database
 ## when gcj-dbtool is available.
@@ -721,6 +722,36 @@
 ## linking this program.
 grmiregistry_DEPENDENCIES = libgcj.la libgcj.spec
 
+## These tools use libltdl to dlopen libjvm.so.  The necessary ltdl
+## includes are inherited from AM_CPPFLAGS.
+gappletviewer_SOURCES = classpath/tools/toolwrapper.c
+gappletviewer_CFLAGS = \
+	-DLIBJVM="\"$(dbexecdir)/libjvm\"" \
+	-DTOOLS_ZIP="\"$(jardir)/libgcj-tools-$(gcc_version).jar\"" \
+	-DTOOLPACKAGE="\"appletviewer\"" \
+	-DTOOLNAME="\"gappletviewer\""
+gappletviewer_LDFLAGS = $(LIBLTDL)
+gappletviewer_DEPENDENCIES = $(LIBLTDL)
+
+gjarsigner_SOURCES = classpath/tools/toolwrapper.c
+gjarsigner_CFLAGS = \
+	-DLIBJVM="\"$(dbexecdir)/libjvm\"" \
+	-DTOOLS_ZIP="\"$(jardir)/libgcj-tools-$(gcc_version).jar\"" \
+	-DTOOLPACKAGE="\"jarsigner\"" \
+	-DTOOLNAME="\"gjarsigner\""
+gjarsigner_LDFLAGS = $(LIBLTDL)
+gjarsigner_DEPENDENCIES = $(LIBLTDL)
+
+gkeytool_SOURCES = classpath/tools/toolwrapper.c
+gkeytool_CFLAGS = \
+	-I$(top_srcdir)/libltdl \
+	-DLIBJVM="\"$(dbexecdir)/libjvm\"" \
+	-DTOOLS_ZIP="\"$(jardir)/libgcj-tools-$(gcc_version).jar\"" \
+	-DTOOLPACKAGE="\"keytool\"" \
+	-DTOOLNAME="\"gkeytool\""
+gkeytool_LDFLAGS = $(LIBLTDL)
+gkeytool_DEPENDENCIES = $(LIBLTDL)
+
 ## ################################################################
 
 ## This lists all the C++ source files in subdirectories.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: RFA: enable gappletviewer, gjarsigner and gkeytool tools
  2006-06-28 22:09 ` Thomas Fitzsimmons
@ 2006-06-29  1:53   ` Bryce McKinlay
  2006-06-29  9:50     ` Andrew Haley
  2006-06-29 15:50     ` Thomas Fitzsimmons
  0 siblings, 2 replies; 13+ messages in thread
From: Bryce McKinlay @ 2006-06-29  1:53 UTC (permalink / raw)
  To: Thomas Fitzsimmons; +Cc: java-patches

Thomas Fitzsimmons wrote:
> Thomas Fitzsimmons wrote:
>> Hi,
>>
>> This patch enables the gappletviewer, gjarsigner and gkeytool tools.  
>> These tool binaries dlopen the new libjvm.so library, using the 
>> libgcj's imported libltdl.
>>
>> For now I've hard-coded the full path to libjvm.so in the dlopen 
>> call.  If the install tree is relocated, these tools will cease to 
>> work.  I've filed a general bug report for this, since there are 
>> already other places in libgcj where we hard-code full paths:
>>
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28175
>>
>> I think the relocation work should be done as a separate patch though.
>
> Here's an updated version of the patch that builds on Darwin.  It uses 
> lt_dlopenext in place of lt_dlopen and doesn't hard-code libjvm's file 
> extension.  The tools still do not work on Darwin due to some 
> Darwin-specific dlopen/dlsym issues, but those can be fixed in a 
> separate patch (hopefully by someone who understands Darwin's linkage 
> tools).
>
> Please review,
>
> Tom
>
> 2006-06-28  Thomas Fitzsimmons  <fitzsim@redhat.com>
>
>     * classpath/tools/toolwrapper.c: dlopen libjvm.so.
>     * classpath/tools/Makefile.am: Comment out binary wrapper build
>     logic.  Rename tools.zip libgcj-tools-$(gcc_version).jar and
>     install in jardir.
>     * classpath/tools/Makefile.in: Regenerate.
>     * classpath/tools/jarsigner.in: Rename ...
>     * classpath/tools/gjarsigner.in: New file.
>     * classpath/tools/keytool.in: Rename ...
>     * classpath/tools/gkeytool.in: New file.
>     * classpath/tools/appletviewer.in: Rename ...
>     * classpath/tools/gappletviewer.in: New file.
>     * classpath/configure.ac: Rename tool wrapper scripts.
>     * classpath/configure: Regenerate.
>     * classpath/Makefile.am (SUBDIRS, DIST_SUBDIRS): Add tools.
>     * classpath/Makefile.in: Regenerate.
>     * classpath/aclocal.m4: Regenerate.
>     * Makefile.am (bin_PROGRAMS): Add gappletviewer, gjarsigner and
>     gkeytool.
>     * Makefile.in: Regenerate.

I think it would be better to write a CNI toolwrapper and link it 
directly against a compiled libgcj-tools.so. This would have several 
advantages:

a) There's no need to dlopen anything, thus the wrapper code becomes 
much simpler and there is no "relocatable tree" problem.
b) The tools will work out-of-the-box on platforms that may not support 
JNI / JNI invocation for whatever reason (win32?)
c) Native compiled code will be used automatically, no need for 
gcj-dbtool or dlopen to load libgcj-tools.so.

(In fact, if it were not for the need to support the -J option, we 
wouldn't need any wrapper code at all, just a "gcj --main=... -o 
gwhatever -lgcj-tools")

There is certainly an argument that it would be nice to share the 
wrapper code with classpath, but in this case I'm not sure the extra 
complexity is worth it.

Bryce

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: RFA: enable gappletviewer, gjarsigner and gkeytool tools
  2006-06-29  1:53   ` Bryce McKinlay
@ 2006-06-29  9:50     ` Andrew Haley
  2006-06-29 15:57       ` Thomas Fitzsimmons
  2006-06-29 15:50     ` Thomas Fitzsimmons
  1 sibling, 1 reply; 13+ messages in thread
From: Andrew Haley @ 2006-06-29  9:50 UTC (permalink / raw)
  To: Bryce McKinlay; +Cc: Thomas Fitzsimmons, java-patches

Bryce McKinlay writes:
 > 
 > I think it would be better to write a CNI toolwrapper and link it 
 > directly against a compiled libgcj-tools.so. This would have several 
 > advantages:
 > 
 > a) There's no need to dlopen anything, thus the wrapper code becomes 
 > much simpler and there is no "relocatable tree" problem.
 > b) The tools will work out-of-the-box on platforms that may not support 
 > JNI / JNI invocation for whatever reason (win32?)
 > c) Native compiled code will be used automatically, no need for 
 > gcj-dbtool or dlopen to load libgcj-tools.so.
 > 
 > (In fact, if it were not for the need to support the -J option, we 
 > wouldn't need any wrapper code at all, just a "gcj --main=... -o 
 > gwhatever -lgcj-tools")
 > 
 > There is certainly an argument that it would be nice to share the 
 > wrapper code with classpath, but in this case I'm not sure the extra 
 > complexity is worth it.

+1.  I agree totally; we should utilize CNI wherever it helps us.

Andrew.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: RFA: enable gappletviewer, gjarsigner and gkeytool tools
  2006-06-29  1:53   ` Bryce McKinlay
  2006-06-29  9:50     ` Andrew Haley
@ 2006-06-29 15:50     ` Thomas Fitzsimmons
  1 sibling, 0 replies; 13+ messages in thread
From: Thomas Fitzsimmons @ 2006-06-29 15:50 UTC (permalink / raw)
  To: Bryce McKinlay; +Cc: java-patches

Hi,

Bryce McKinlay wrote:
> Thomas Fitzsimmons wrote:
>> Thomas Fitzsimmons wrote:
>>> Hi,
>>>
>>> This patch enables the gappletviewer, gjarsigner and gkeytool tools.  
>>> These tool binaries dlopen the new libjvm.so library, using the 
>>> libgcj's imported libltdl.
>>>
>>> For now I've hard-coded the full path to libjvm.so in the dlopen 
>>> call.  If the install tree is relocated, these tools will cease to 
>>> work.  I've filed a general bug report for this, since there are 
>>> already other places in libgcj where we hard-code full paths:
>>>
>>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28175
>>>
>>> I think the relocation work should be done as a separate patch though.
>>
>> Here's an updated version of the patch that builds on Darwin.  It uses 
>> lt_dlopenext in place of lt_dlopen and doesn't hard-code libjvm's file 
>> extension.  The tools still do not work on Darwin due to some 
>> Darwin-specific dlopen/dlsym issues, but those can be fixed in a 
>> separate patch (hopefully by someone who understands Darwin's linkage 
>> tools).
>>
>> Please review,
>>
>> Tom
>>
>> 2006-06-28  Thomas Fitzsimmons  <fitzsim@redhat.com>
>>
>>     * classpath/tools/toolwrapper.c: dlopen libjvm.so.
>>     * classpath/tools/Makefile.am: Comment out binary wrapper build
>>     logic.  Rename tools.zip libgcj-tools-$(gcc_version).jar and
>>     install in jardir.
>>     * classpath/tools/Makefile.in: Regenerate.
>>     * classpath/tools/jarsigner.in: Rename ...
>>     * classpath/tools/gjarsigner.in: New file.
>>     * classpath/tools/keytool.in: Rename ...
>>     * classpath/tools/gkeytool.in: New file.
>>     * classpath/tools/appletviewer.in: Rename ...
>>     * classpath/tools/gappletviewer.in: New file.
>>     * classpath/configure.ac: Rename tool wrapper scripts.
>>     * classpath/configure: Regenerate.
>>     * classpath/Makefile.am (SUBDIRS, DIST_SUBDIRS): Add tools.
>>     * classpath/Makefile.in: Regenerate.
>>     * classpath/aclocal.m4: Regenerate.
>>     * Makefile.am (bin_PROGRAMS): Add gappletviewer, gjarsigner and
>>     gkeytool.
>>     * Makefile.in: Regenerate.
> 
> I think it would be better to write a CNI toolwrapper and link it 
> directly against a compiled libgcj-tools.so. This would have several 
> advantages:
> 
> a) There's no need to dlopen anything, thus the wrapper code becomes 
> much simpler and there is no "relocatable tree" problem.

The relocatable tree problem still exists, everywhere in Makefile.am where we 
use -rpath.  Solving that in a general way would also solve the libjvm.so 
problem.  See:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28175

> b) The tools will work out-of-the-box on platforms that may not support 
> JNI / JNI invocation for whatever reason (win32?)

Making the tools work "out-of-the-box" no matter what the approach will take 
testing and bug fixing.  I argue that we should fix the problems with JNI / JNI 
invocation on those platforms.  That is one of the reasons I like my approach, 
is that it exercises JNI and the JNI invocation implementation.

How well-tested is the BC ABI on the platforms that may not support JNI 
invocation?  Do we test linking directly to a BC library on *any* platform?

> c) Native compiled code will be used automatically, no need for 
> gcj-dbtool or dlopen to load libgcj-tools.so.

We'll still need gcj-dbtool so that libgcj-tools.so is located by Java apps that 
  use libgcj-tools.jar, like Ant.

> 
> (In fact, if it were not for the need to support the -J option, we 
> wouldn't need any wrapper code at all, just a "gcj --main=... -o 
> gwhatever -lgcj-tools")

Yes, if I'm going to rewrite and retest this patch using CNI, I'll take this 
simplistic approach.

> 
> There is certainly an argument that it would be nice to share the 
> wrapper code with classpath, but in this case I'm not sure the extra 
> complexity is worth it.

I view an extra CNI wrapper as extra complexity from the maintenance standpoint. 
  I'd like to see all free GNU Classpath-based runtimes use the same tools strategy.

Tom

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: RFA: enable gappletviewer, gjarsigner and gkeytool tools
  2006-06-29  9:50     ` Andrew Haley
@ 2006-06-29 15:57       ` Thomas Fitzsimmons
  2006-06-29 16:13         ` Andrew Haley
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Fitzsimmons @ 2006-06-29 15:57 UTC (permalink / raw)
  To: Andrew Haley; +Cc: Bryce McKinlay, java-patches

Andrew Haley wrote:
> Bryce McKinlay writes:
>  > 
>  > I think it would be better to write a CNI toolwrapper and link it 
>  > directly against a compiled libgcj-tools.so. This would have several 
>  > advantages:
>  > 
>  > a) There's no need to dlopen anything, thus the wrapper code becomes 
>  > much simpler and there is no "relocatable tree" problem.
>  > b) The tools will work out-of-the-box on platforms that may not support 
>  > JNI / JNI invocation for whatever reason (win32?)
>  > c) Native compiled code will be used automatically, no need for 
>  > gcj-dbtool or dlopen to load libgcj-tools.so.
>  > 
>  > (In fact, if it were not for the need to support the -J option, we 
>  > wouldn't need any wrapper code at all, just a "gcj --main=... -o 
>  > gwhatever -lgcj-tools")
>  > 
>  > There is certainly an argument that it would be nice to share the 
>  > wrapper code with classpath, but in this case I'm not sure the extra 
>  > complexity is worth it.
> 
> +1.  I agree totally; we should utilize CNI wherever it helps us.

Recently we've been trying to minimize divergence with GNU Classpath.  Toward 
that end, I'd like libgcj to share its tools strategy with other GNU 
Classpath-using VMs.

Tom

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: RFA: enable gappletviewer, gjarsigner and gkeytool tools
  2006-06-29 15:57       ` Thomas Fitzsimmons
@ 2006-06-29 16:13         ` Andrew Haley
  2006-06-29 16:19           ` Thomas Fitzsimmons
  0 siblings, 1 reply; 13+ messages in thread
From: Andrew Haley @ 2006-06-29 16:13 UTC (permalink / raw)
  To: Thomas Fitzsimmons; +Cc: Bryce McKinlay, java-patches

Thomas Fitzsimmons writes:
 > Andrew Haley wrote:
 > > Bryce McKinlay writes:
 > >  > 
 > >  > I think it would be better to write a CNI toolwrapper and link it 
 > >  > directly against a compiled libgcj-tools.so. This would have several 
 > >  > advantages:
 > >  > 
 > >  > a) There's no need to dlopen anything, thus the wrapper code becomes 
 > >  > much simpler and there is no "relocatable tree" problem.
 > >  > b) The tools will work out-of-the-box on platforms that may not support 
 > >  > JNI / JNI invocation for whatever reason (win32?)
 > >  > c) Native compiled code will be used automatically, no need for 
 > >  > gcj-dbtool or dlopen to load libgcj-tools.so.
 > >  > 
 > >  > (In fact, if it were not for the need to support the -J option, we 
 > >  > wouldn't need any wrapper code at all, just a "gcj --main=... -o 
 > >  > gwhatever -lgcj-tools")
 > >  > 
 > >  > There is certainly an argument that it would be nice to share the 
 > >  > wrapper code with classpath, but in this case I'm not sure the extra 
 > >  > complexity is worth it.
 > > 
 > > +1.  I agree totally; we should utilize CNI wherever it helps us.
 > 
 > Recently we've been trying to minimize divergence with GNU
 > Classpath.  Toward that end, I'd like libgcj to share its tools
 > strategy with other GNU Classpath-using VMs.

Me too.  Using that as a reason to avoid CNI is (IMO) bonkers, though:
one of the few places we have a real advantage over "standard"
Java(tm) is CNI.  The fact that we can simply compile a bunch of
classes to an executable without any wrapper is a big plus.

Andrew.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: RFA: enable gappletviewer, gjarsigner and gkeytool tools
  2006-06-29 16:13         ` Andrew Haley
@ 2006-06-29 16:19           ` Thomas Fitzsimmons
  2006-06-29 16:41             ` Andrew Haley
                               ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Thomas Fitzsimmons @ 2006-06-29 16:19 UTC (permalink / raw)
  To: Andrew Haley; +Cc: Bryce McKinlay, java-patches

Andrew Haley wrote:
> Thomas Fitzsimmons writes:
>  > Andrew Haley wrote:
>  > > Bryce McKinlay writes:
>  > >  > 
>  > >  > I think it would be better to write a CNI toolwrapper and link it 
>  > >  > directly against a compiled libgcj-tools.so. This would have several 
>  > >  > advantages:
>  > >  > 
>  > >  > a) There's no need to dlopen anything, thus the wrapper code becomes 
>  > >  > much simpler and there is no "relocatable tree" problem.
>  > >  > b) The tools will work out-of-the-box on platforms that may not support 
>  > >  > JNI / JNI invocation for whatever reason (win32?)
>  > >  > c) Native compiled code will be used automatically, no need for 
>  > >  > gcj-dbtool or dlopen to load libgcj-tools.so.
>  > >  > 
>  > >  > (In fact, if it were not for the need to support the -J option, we 
>  > >  > wouldn't need any wrapper code at all, just a "gcj --main=... -o 
>  > >  > gwhatever -lgcj-tools")
>  > >  > 
>  > >  > There is certainly an argument that it would be nice to share the 
>  > >  > wrapper code with classpath, but in this case I'm not sure the extra 
>  > >  > complexity is worth it.
>  > > 
>  > > +1.  I agree totally; we should utilize CNI wherever it helps us.
>  > 
>  > Recently we've been trying to minimize divergence with GNU
>  > Classpath.  Toward that end, I'd like libgcj to share its tools
>  > strategy with other GNU Classpath-using VMs.
> 
> Me too.  Using that as a reason to avoid CNI is (IMO) bonkers, though:
> one of the few places we have a real advantage over "standard"
> Java(tm) is CNI.  The fact that we can simply compile a bunch of
> classes to an executable without any wrapper is a big plus.

To support the -J option to the tools, we'd still need a wrapper, it'd just be a 
CNI wrapper rather than a JNI wrapper.  The only real simplification would be 
that it would allow us to avoid using libltdl.

If you feel strongly that that CNI feature should be used though, I'll write a 
patch that avoids any wrappers and that doesn't support the -J option.  The -J 
option would be nice to have, but it's probably not worth the extra complexity.

Tom

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: RFA: enable gappletviewer, gjarsigner and gkeytool tools
  2006-06-29 16:19           ` Thomas Fitzsimmons
@ 2006-06-29 16:41             ` Andrew Haley
  2006-06-29 16:53             ` Bryce McKinlay
  2006-07-06  0:31             ` Tom Tromey
  2 siblings, 0 replies; 13+ messages in thread
From: Andrew Haley @ 2006-06-29 16:41 UTC (permalink / raw)
  To: Thomas Fitzsimmons; +Cc: Bryce McKinlay, java-patches

Thomas Fitzsimmons writes:
 > Andrew Haley wrote:
 > > Thomas Fitzsimmons writes:
 > >  > Andrew Haley wrote:
 > >  > > Bryce McKinlay writes:
 > >  > >  > 
 > >  > >  > I think it would be better to write a CNI toolwrapper and link it 
 > >  > >  > directly against a compiled libgcj-tools.so. This would have several 
 > >  > >  > advantages:
 > >  > >  > 
 > >  > >  > a) There's no need to dlopen anything, thus the wrapper
 > >  > >  > code becomes much simpler and there is no "relocatable
 > >  > >  > tree" problem.
 > >  > >  > b) The tools will work out-of-the-box on platforms that
 > >  > >  > may not support JNI / JNI invocation for whatever reason
 > >  > >  > (win32?)
 > >  > >  > c) Native compiled code will be used automatically, no
 > >  > >  > need for gcj-dbtool or dlopen to load libgcj-tools.so.
 > >  > >  > 
 > >  > >  > (In fact, if it were not for the need to support the -J
 > >  > >  > option, we wouldn't need any wrapper code at all, just a
 > >  > >  > "gcj --main=... -o gwhatever -lgcj-tools")
 > >  > >  > 
 > >  > >  > There is certainly an argument that it would be nice to
 > >  > >  > share the wrapper code with classpath, but in this case
 > >  > >  > I'm not sure the extra complexity is worth it.
 > >  > > 
 > >  > > +1.  I agree totally; we should utilize CNI wherever it helps us.
 > >  > 
 > >  > Recently we've been trying to minimize divergence with GNU
 > >  > Classpath.  Toward that end, I'd like libgcj to share its tools
 > >  > strategy with other GNU Classpath-using VMs.
 > > 
 > > Me too.  Using that as a reason to avoid CNI is (IMO) bonkers, though:
 > > one of the few places we have a real advantage over "standard"
 > > Java(tm) is CNI.  The fact that we can simply compile a bunch of
 > > classes to an executable without any wrapper is a big plus.
 > 
 > To support the -J option to the tools, we'd still need a wrapper,
 > it'd just be a CNI wrapper rather than a JNI wrapper.  The only
 > real simplification would be that it would allow us to avoid using
 > libltdl.

I see.

 > If you feel strongly that that CNI feature should be used though,
 > I'll write a patch that avoids any wrappers and that doesn't
 > support the -J option.  The -J option would be nice to have, but
 > it's probably not worth the extra complexity.

I'm not pushing the use of CNI for ideological resons, for that would
be just as stupid as not using it.  All I'm saying is that when we
import code from Classpath we don't rewrite it to use CNI, but if our
end can be made cleaner and more efficient with its use, we use it.
But ultimately it has to be the programmer's choice; I'll back out
now, because I maybe do too much kibitzing already...

Andrew.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: RFA: enable gappletviewer, gjarsigner and gkeytool tools
  2006-06-29 16:19           ` Thomas Fitzsimmons
  2006-06-29 16:41             ` Andrew Haley
@ 2006-06-29 16:53             ` Bryce McKinlay
  2006-06-29 17:11               ` Thomas Fitzsimmons
  2006-07-06  0:31             ` Tom Tromey
  2 siblings, 1 reply; 13+ messages in thread
From: Bryce McKinlay @ 2006-06-29 16:53 UTC (permalink / raw)
  To: Thomas Fitzsimmons; +Cc: Andrew Haley, java-patches

Thomas Fitzsimmons wrote:
>> Me too.  Using that as a reason to avoid CNI is (IMO) bonkers, though:
>> one of the few places we have a real advantage over "standard"
>> Java(tm) is CNI.  The fact that we can simply compile a bunch of
>> classes to an executable without any wrapper is a big plus.
>
> To support the -J option to the tools, we'd still need a wrapper, it'd 
> just be a CNI wrapper rather than a JNI wrapper.  The only real 
> simplification would be that it would allow us to avoid using libltdl.

This is a pretty significant simplification. But also, it means that 
libgcj-tools.so gets linked automatically, so we don't need gcj-dbtool 
to load the native code. That also makes things significantly simpler, 
especially if we want to use tools like jar during bootstrapping.

IMO, the gcj/CNI approach is so simple that the effort saved will far 
outweigh any perceived advantage from sharing the toolwrapper.

Besides, the proposed libgcj toolwrapper.c has a bunch of GCJ_LOCAL 
divergences anyway. These really do complicate merges, and should be 
avoided.

Bryce

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: RFA: enable gappletviewer, gjarsigner and gkeytool tools
  2006-06-29 16:53             ` Bryce McKinlay
@ 2006-06-29 17:11               ` Thomas Fitzsimmons
  0 siblings, 0 replies; 13+ messages in thread
From: Thomas Fitzsimmons @ 2006-06-29 17:11 UTC (permalink / raw)
  To: Bryce McKinlay; +Cc: Andrew Haley, java-patches

Bryce McKinlay wrote:
> Thomas Fitzsimmons wrote:
>>> Me too.  Using that as a reason to avoid CNI is (IMO) bonkers, though:
>>> one of the few places we have a real advantage over "standard"
>>> Java(tm) is CNI.  The fact that we can simply compile a bunch of
>>> classes to an executable without any wrapper is a big plus.
>>
>> To support the -J option to the tools, we'd still need a wrapper, it'd 
>> just be a CNI wrapper rather than a JNI wrapper.  The only real 
>> simplification would be that it would allow us to avoid using libltdl.
> 
> This is a pretty significant simplification. But also, it means that 
> libgcj-tools.so gets linked automatically, so we don't need gcj-dbtool 
> to load the native code. That also makes things significantly simpler, 
> especially if we want to use tools like jar during bootstrapping.

To me, using the libgcj-tools jar for bootstrapping seems much more complicated 
than using the existing zip-based bootstrapping jar.  Hypothetically, if we did 
want to do that, we would still need gcj-dbtool after bootstrapping so that 
libgcj-tools.so would be available to Java apps that load libgcj-tools.jar.  And 
this is all hypothetical, of course, since I doubt anyone will do the work to 
use libgcj-tools.so during the bootstrap (lots of breakage, little gain).  It 
seems much simpler to have a few more standalone dependency jars (which AIUI is 
the plan for ecj and Tom Tromey's pure-Java gcjh).

> 
> IMO, the gcj/CNI approach is so simple that the effort saved will far 
> outweigh any perceived advantage from sharing the toolwrapper.

I disagree.  I've already invested the effort to make the toolwrapper work.  But 
in the interests of enabling the tools in a more palatable way, I've started 
rewriting the patch to use CNI.

> 
> Besides, the proposed libgcj toolwrapper.c has a bunch of GCJ_LOCAL 
> divergences anyway. These really do complicate merges, and should be 
> avoided.

Those are temporary and will be merged into GNU Classpath as is, so that there 
will be no divergence (I should have done that before submitting this patch, I 
suppose).

Tom

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: RFA: enable gappletviewer, gjarsigner and gkeytool tools
  2006-06-29 16:19           ` Thomas Fitzsimmons
  2006-06-29 16:41             ` Andrew Haley
  2006-06-29 16:53             ` Bryce McKinlay
@ 2006-07-06  0:31             ` Tom Tromey
  2006-07-06  0:39               ` Bryce McKinlay
  2 siblings, 1 reply; 13+ messages in thread
From: Tom Tromey @ 2006-07-06  0:31 UTC (permalink / raw)
  To: Thomas Fitzsimmons; +Cc: Andrew Haley, Bryce McKinlay, java-patches

>>>>> "Tom" == Thomas Fitzsimmons <fitzsim@redhat.com> writes:

Tom> To support the -J option to the tools, we'd still need a wrapper,
Tom> it'd just be a CNI wrapper rather than a JNI wrapper.

If -J is useful we arguably ought to support it in CNI wrappers.
This could be done by adding a command line option to gcj which is
passed down to jvgenmain and from there to the startup sequence.

File a PR if you think this is worthwhile... I'm not so sure myself.
I think I use GCJ_PROPERTIES in those rare instances where I want this.

Tom

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: RFA: enable gappletviewer, gjarsigner and gkeytool tools
  2006-07-06  0:31             ` Tom Tromey
@ 2006-07-06  0:39               ` Bryce McKinlay
  0 siblings, 0 replies; 13+ messages in thread
From: Bryce McKinlay @ 2006-07-06  0:39 UTC (permalink / raw)
  To: tromey; +Cc: Thomas Fitzsimmons, Andrew Haley, java-patches

Tom Tromey wrote:
> Tom> To support the -J option to the tools, we'd still need a wrapper,
> Tom> it'd just be a CNI wrapper rather than a JNI wrapper.
>
> If -J is useful we arguably ought to support it in CNI wrappers.
> This could be done by adding a command line option to gcj which is
> passed down to jvgenmain and from there to the startup sequence.
>
> File a PR if you think this is worthwhile... I'm not so sure myself.
> I think I use GCJ_PROPERTIES in those rare instances where I want this.
>   

We could also, in this case, make a CNI toolwrapper.cc which invokes the 
runtime using JvCreateJavaVM().

I think its pretty questionable whether we want to add a gcj option, 
though. I don't think that hard-coding VM arguments into native binaries 
is something we would want to encourage.

Bryce

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2006-07-06  0:39 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-27  0:05 RFA: enable gappletviewer, gjarsigner and gkeytool tools Thomas Fitzsimmons
2006-06-28 22:09 ` Thomas Fitzsimmons
2006-06-29  1:53   ` Bryce McKinlay
2006-06-29  9:50     ` Andrew Haley
2006-06-29 15:57       ` Thomas Fitzsimmons
2006-06-29 16:13         ` Andrew Haley
2006-06-29 16:19           ` Thomas Fitzsimmons
2006-06-29 16:41             ` Andrew Haley
2006-06-29 16:53             ` Bryce McKinlay
2006-06-29 17:11               ` Thomas Fitzsimmons
2006-07-06  0:31             ` Tom Tromey
2006-07-06  0:39               ` Bryce McKinlay
2006-06-29 15:50     ` Thomas Fitzsimmons

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).