Hi,

This patch prefixes each tool executable with 'g' to avoid conflicts with other implementations.

Tom

2006-06-15  Thomas Fitzsimmons  <[EMAIL PROTECTED]>

        * configure.ac: Rename appletviewer to gappletviewer, jarsigner to
        gjarsigner and keytool to gkeytool.
        * doc/tools.texinfo: Add note about tool exectable names.
        * tools/Makefile.am: Rename appletviewer to gappletviewer,
        jarsigner to gjarsigner and keytool to gkeytool.
        * tools/appletviewer.in: Rename ...
        * tools/gappletviewer.in: New file.
        * tools/jarsigner.in: Rename ...
        * tools/gjarsigner.in: New file.
        * tools/keytool.in: Rename ...
        * tools/gkeytool.in: New file.
        * tools/toolwrapper.c: Simplify TOOLS_ZIP macro.
Index: configure.ac
===================================================================
RCS file: /sources/classpath/classpath/configure.ac,v
retrieving revision 1.161
diff -u -r1.161 configure.ac
--- configure.ac	14 Jun 2006 12:35:17 -0000	1.161
+++ configure.ac	15 Jun 2006 23:07:07 -0000
@@ -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: doc/tools.texinfo
===================================================================
RCS file: /sources/classpath/classpath/doc/tools.texinfo,v
retrieving revision 1.5
diff -u -r1.5 tools.texinfo
--- doc/tools.texinfo	12 Jun 2006 04:04:40 -0000	1.5
+++ doc/tools.texinfo	15 Jun 2006 23:07:07 -0000
@@ -128,6 +128,9 @@
 Two Applet Tools are available with GNU Classpath: @b{appletviewer}
 and @b{gcjwebplugin}.
 
+To avoid conflicts with other implementations, the appletviewer
+executable is called ``gappletviewer''.
+
 @menu
 * appletviewer Tool::          Load applets
 * gcjwebplugin::               Load applets in a web browser
@@ -270,6 +273,10 @@
 
 Two Security Tools are available with GNU Classpath: @b{jarsigner} and @b{keytool}.
 
+To avoid conflicts with other implementations, the jarsigner
+executable is called ``gjarsigner'' and the keytool executable is
+called ``gkeytool''.
+
 @menu
 * jarsigner Tool::             Sign and verify .JAR files
 * keytool Tool::               Manage private keys and public certificates
Index: tools/Makefile.am
===================================================================
RCS file: /sources/classpath/classpath/tools/Makefile.am,v
retrieving revision 1.18
diff -u -r1.18 Makefile.am
--- tools/Makefile.am	29 May 2006 19:49:25 -0000	1.18
+++ tools/Makefile.am	15 Jun 2006 23:07:08 -0000
@@ -23,7 +23,7 @@
 
 if CREATE_WRAPPERS
 bin_SCRIPTS =
-bin_PROGRAMS = appletviewer jarsigner keytool
+bin_PROGRAMS = gappletviewer gjarsigner gkeytool
 
 if FOUND_GCJ
 LIBJVM = -lgcj
@@ -35,37 +35,37 @@
 endif
 endif
 
-appletviewer_SOURCES = toolwrapper.c
-appletviewer_CFLAGS = -Wall \
-	-DDATA_DIR="\"$(datadir)\"" \
-	-DPACKAGE="\"$(PACKAGE)\"" \
-	-DTOOLNAME="\"appletviewer\""
-appletviewer_LDFLAGS = -L$(libdir) $(LIBJVM)
-
-jarsigner_SOURCES = toolwrapper.c
-jarsigner_CFLAGS = -Wall \
-	-DDATA_DIR="\"$(datadir)\"" \
-	-DPACKAGE="\"$(PACKAGE)\"" \
-	-DTOOLNAME="\"jarsigner\""
-jarsigner_LDFLAGS = -L$(libdir) $(LIBJVM)
-
-keytool_SOURCES = toolwrapper.c
-keytool_CFLAGS = -Wall \
-	-DDATA_DIR="\"$(datadir)\"" \
-	-DPACKAGE="\"$(PACKAGE)\"" \
-	-DTOOLNAME="\"keytool\""
-keytool_LDFLAGS = -L$(libdir) $(LIBJVM)
+AM_CPPFLAGS = -Wall \
+	-I$(top_srcdir)/include \
+	-DTOOLS_ZIP="\"$(TOOLSdir)/$(TOOLS_ZIP)\""
+
+gappletviewer_SOURCES = toolwrapper.c
+gappletviewer_CFLAGS = \
+	-DTOOLPACKAGE="\"appletviewer\"" \
+	-DTOOLNAME="\"gappletviewer\""
+gappletviewer_LDFLAGS = -L$(libdir) $(LIBJVM)
+
+gjarsigner_SOURCES = toolwrapper.c
+gjarsigner_CFLAGS = \
+	-DTOOLPACKAGE="\"jarsigner\"" \
+	-DTOOLNAME="\"gjarsigner\""
+gjarsigner_LDFLAGS = -L$(libdir) $(LIBJVM)
+
+gkeytool_SOURCES = toolwrapper.c
+gkeytool_CFLAGS = \
+	-DTOOLPACKAGE="\"keytool\"" \
+	-DTOOLNAME="\"gkeytool\""
+gkeytool_LDFLAGS = -L$(libdir) $(LIBJVM)
 
 else
-bin_SCRIPTS = appletviewer jarsigner keytool
+bin_SCRIPTS = gappletviewer gjarsigner gkeytool
 bin_PROGRAMS =
 endif
-EXTRA_DIST = toolwrapper.c appletviewer.in jarsigner.in keytool.in
+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.
 TOOLS_ZIP = tools.zip
 
Index: tools/appletviewer.in
===================================================================
RCS file: tools/appletviewer.in
diff -N tools/appletviewer.in
--- tools/appletviewer.in	9 May 2006 18:11:13 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -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.
-##
-
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@/@PACKAGE@
-tools_cp=${tools_dir}/tools.zip
-
-exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.appletviewer.Main $@
Index: tools/gappletviewer.in
===================================================================
RCS file: tools/gappletviewer.in
diff -N tools/gappletviewer.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tools/gappletviewer.in	15 Jun 2006 23:07:08 -0000
@@ -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.
+##
+
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@/@PACKAGE@
+tools_cp=${tools_dir}/tools.zip
+
+exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.appletviewer.Main $@
Index: tools/gjarsigner.in
===================================================================
RCS file: tools/gjarsigner.in
diff -N tools/gjarsigner.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tools/gjarsigner.in	15 Jun 2006 23:07:08 -0000
@@ -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.
+##
+
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@/@PACKAGE@
+tools_cp=${tools_dir}/tools.zip
+
+exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.jarsigner.Main $@
Index: tools/gkeytool.in
===================================================================
RCS file: tools/gkeytool.in
diff -N tools/gkeytool.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tools/gkeytool.in	15 Jun 2006 23:07:08 -0000
@@ -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.
+##
+
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@/@PACKAGE@
+tools_cp=${tools_dir}/tools.zip
+
+exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.keytool.Main $@
Index: tools/jarsigner.in
===================================================================
RCS file: tools/jarsigner.in
diff -N tools/jarsigner.in
--- tools/jarsigner.in	1 Jun 2006 19:20:35 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -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.
-##
-
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@/@PACKAGE@
-tools_cp=${tools_dir}/tools.zip
-
-exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.jarsigner.Main $@
Index: tools/keytool.in
===================================================================
RCS file: tools/keytool.in
diff -N tools/keytool.in
--- tools/keytool.in	1 Jun 2006 19:20:35 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -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.
-##
-
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@/@PACKAGE@
-tools_cp=${tools_dir}/tools.zip
-
-exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" gnu.classpath.tools.keytool.Main $@
Index: tools/toolwrapper.c
===================================================================
RCS file: /sources/classpath/classpath/tools/toolwrapper.c,v
retrieving revision 1.1
diff -u -r1.1 toolwrapper.c
--- tools/toolwrapper.c	27 May 2006 21:10:46 -0000	1.1
+++ tools/toolwrapper.c	15 Jun 2006 23:07:08 -0000
@@ -128,7 +128,7 @@
 	  goto destroy;
 	}
 
-      vm_args.options[vm_args.nOptions++].optionString = "-Djava.class.path=" DATA_DIR "/" PACKAGE "/tools.zip";
+      vm_args.options[vm_args.nOptions++].optionString = "-Djava.class.path=" TOOLS_ZIP;
     }
 
   /* Terminate vm_args.options with a NULL element. */
@@ -188,7 +188,7 @@
       (*env)->SetObjectArrayElement (env, args_array, i, str);
     }
 
-  class_id = (*env)->FindClass (env, "gnu/classpath/tools/" TOOLNAME "/Main");
+  class_id = (*env)->FindClass (env, "gnu/classpath/tools/" TOOLPACKAGE "/Main");
   if (class_id == NULL)
     {
       fprintf (stderr, TOOLNAME ": FindClass failed.\n");

Reply via email to