From: Bruno Haible Date: Thu, 4 May 2017 16:01:18 +0000 (+0200) Subject: Remove the ability to compile the Java programs to native executables. X-Git-Tag: v0.20~469 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3531b829b30803bab9e0d9ff62747e061145fec5;p=thirdparty%2Fgettext.git Remove the ability to compile the Java programs to native executables. This ability relied on GCJ, and GCJ was removed from GCC in version 7.1. * gnulib-local/modules/gcj: Remove file. * gnulib-local/m4/gcj.m4: Remove file. * gnulib-local/Makefile.am (EXTRA_DIST): Remove both. * gnulib-local/m4/java.m4 (gt_JAVA_CHOICE): Map value 'bytecode' to 'yes'. * autogen.sh (GNULIB_MODULES_TOOLS_OTHER): Remove 'gcj'. * gettext-tools/configure.ac: Don't invoke gt_GCJ. Don't set BUILDJAVAEXE. * gettext-tools/src/Makefile.am (DEFS): Remove USEJEXE, GETTEXTJEXEDIR defines. (GCJ, GCJFLAGS): Remove variables. (USEJAVA, USEJEXE): Assume BUILDJAVAEXE is false. (all-java-*, install-data-java-*, installdirs-java-*, uninstall-java-*): Remove targets that assume BUILDJAVAEXE = true. Rename remaining targets. (install-exec-java-*): Remove targets. * gettext-tools/src/read-java.c (msgdomain_read_java: Assume USEJEXE is false. * gettext-tools/src/urlget.c (fetch): Likewise. * gettext-tools/tests/msgunfmt-java-1: Don't set GETTEXTJEXEDIR. * PACKAGING (Java support): Drop text about native executables. * gettext-tools/m4/Makefile.am (examplesbuildaux_DATA): Remove gcj.m4. * gettext-tools/examples/hello-java*/autogen.sh: Don't copy gcj.m4. * gettext-tools/examples/hello-java*/autoclean.sh: Don't remove m4/gcj.m4. * gettext-tools/examples/hello-java*/m4/Makefile.am (EXTRA_DIST): Remove gcj.m4. * gettext-tools/examples/hello-java*/configure.ac: Don't invoke gt_GCJ, AC_PROG_RANLIB. Remove option --enable-java-exe. Don't set BUILDJAVAEXE. Don't set USEJEXE. * gettext-tools/examples/hello-java*/Makefile.am (GCJ, GCJFLAGS, AR, RANLIB): Remove variables. [USEJEXE]: Remove section. --- diff --git a/PACKAGING b/PACKAGING index 17289f0e6..00a2dab0c 100644 --- a/PACKAGING +++ b/PACKAGING @@ -111,7 +111,7 @@ following file list. $prefix/share/gettext/po/* $prefix/share/gettext/projects/* $prefix/share/gettext/gettext.h - $prefix/share/gettext/gettext.jar (only installed if gcj is not present) + $prefix/share/gettext/gettext.jar $prefix/share/gettext/msgunfmt.tcl $prefix/share/gettext/archive.git.tar.gz $prefix/share/gettext/archive.dir.tar.gz (only installed if --without-git specified) @@ -158,17 +158,11 @@ following file list. Java support: ------------- -If GNU gcj is available at build time, two programs will be built as native -executables: - $prefix/lib/gettext/gnu.gettext.* -and the gettext-tools package will therefore have a runtime dependency to -libgcj.so. - -If GNU gcj is not available at build time but another Java implementation is -available instead, the two programs will be compiled to Java bytecode only: +If some Java implementation is available, two programs will be compiled to +Java bytecode: $prefix/share/gettext/gettext.jar and the gettext-tools package will therefore have a runtime dependency to -the Java virtual machine (Sun Java2, IBM Java2, GNU libgcj.jar, or other). +the Java virtual machine (OpenJDK, Oracle Java, IBM Java, or other). C# support: diff --git a/autogen.sh b/autogen.sh index b605b6492..fe8bd3a88 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 2003-2016 Free Software Foundation, Inc. +# Copyright (C) 2003-2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -309,7 +309,6 @@ if ! $skip_gnulib; then ansi-c++-opt csharpcomp-script csharpexec-script - gcj java javacomp-script javaexec-script diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac index 3b132edf8..b868075b0 100644 --- a/gettext-tools/configure.ac +++ b/gettext-tools/configure.ac @@ -1,5 +1,5 @@ dnl Configuration for the gettext-tools directory of GNU gettext -dnl Copyright (C) 1995-2011, 2015-2016 Free Software Foundation, Inc. +dnl Copyright (C) 1995-2011, 2015-2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by @@ -35,14 +35,6 @@ AC_PROG_YACC gt_JAVA_CHOICE -gt_GCJ -if test -n "$HAVE_GCJ" && test "$JAVA_CHOICE" = yes; then - BUILDJAVAEXE=yes -else - BUILDJAVAEXE=no -fi -AC_SUBST([BUILDJAVAEXE]) - gt_JAVAEXEC gt_JAVACOMP([1.3]) AC_CHECK_PROG([JAR], [jar], [jar]) diff --git a/gettext-tools/examples/hello-java-awt/Makefile.am b/gettext-tools/examples/hello-java-awt/Makefile.am index 0803075f4..2281fbde3 100644 --- a/gettext-tools/examples/hello-java-awt/Makefile.am +++ b/gettext-tools/examples/hello-java-awt/Makefile.am @@ -40,84 +40,14 @@ jardir = $(datadir)/$(PACKAGE) pkgdatadir = $(datadir)/$(PACKAGE) pkglibdir = $(libdir)/$(PACKAGE) -GCJ = @GCJ@ -GCJFLAGS = @GCJFLAGS@ JAR = @JAR@ JAVACOMP = $(SHELL) javacomp.sh -AR = ar -RANLIB = @RANLIB@ EXTRA_DIST += $(hello_SOURCES) CLEANFILES = DISTCLEANFILES = javacomp.sh javaexec.sh -if USEJEXE - - -# Rules for compiling Java programs as native code. - -all-local: $(hello_MAINCLASS)$(EXEEXT) hello-resources.jar hello.sh - -# Does not work yet with GCC 3.3. -#$(hello_MAINCLASS)$(EXEEXT): $(srcdir)/Hello.java -# CLASSPATH=.@CLASSPATH_SEPARATOR@$(hello_JAVALIBS) $(GCJ) $(GCJFLAGS) $(srcdir)/Hello.java $(hello_JAVALIBS) --main=$(hello_MAINCLASS) -o $@ - -$(hello_MAINCLASS)$(EXEEXT): Hello.$(OBJEXT) libintl.a - $(GCJ) $(GCJFLAGS) Hello.$(OBJEXT) libintl.a --main=$(hello_MAINCLASS) -o $@ - -Hello.$(OBJEXT): $(srcdir)/Hello.java - CLASSPATH=.@CLASSPATH_SEPARATOR@$(hello_JAVALIBS) $(GCJ) $(GCJFLAGS) -c $(srcdir)/Hello.java -o $@ - -libintl.a: - rm -rf tmpdir - mkdir tmpdir - cd tmpdir && $(JAR) xf @LIBINTL_JAR@ && \ - for f in `find . -name '*.class' -print`; do \ - $(GCJ) $(GCJFLAGS) -c $$f -o `echo $$f | sed -e 's,^\./,,' -e 's,\.class$$,,' -e 's,/,.,g'`.$(OBJEXT) || exit 1; \ - done && \ - rm -f ../libintl.a && \ - ar cru ../libintl.a `find . -name '*.$(OBJEXT)' -print` - rm -rf tmpdir - $(RANLIB) $@ - -hello-resources.jar: - catalogs=`MAKEFLAGS= $(MAKE) -s -C po echo-catalogs`; \ - $(JAR) cf $@ $(hello_RESOURCES) $$catalogs - -hello.sh: - { echo '#!/bin/sh'; \ - echo "CLASSPATH='$(jardir)/hello-resources.jar'\$${CLASSPATH+\"@CLASSPATH_SEPARATOR@\$$CLASSPATH\"}"; \ - echo "export CLASSPATH"; \ - echo "exec '$(pkglibdir)/$(hello_MAINCLASS)$(EXEEXT)' \"\$$@\""; \ - } > $@ - -install-exec-local: all-local - $(MKDIR_P) $(DESTDIR)$(bindir) - $(INSTALL_SCRIPT) hello.sh $(DESTDIR)$(bindir)/hello - $(MKDIR_P) $(DESTDIR)$(pkglibdir) - $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $(hello_MAINCLASS)$(EXEEXT) $(DESTDIR)$(pkglibdir)/$(hello_MAINCLASS)$(EXEEXT) - -install-data-local: all-local - $(MKDIR_P) $(DESTDIR)$(jardir) - $(INSTALL_DATA) hello-resources.jar $(DESTDIR)$(jardir)/hello-resources.jar - -installdirs-local: - $(MKDIR_P) $(DESTDIR)$(bindir) - $(MKDIR_P) $(DESTDIR)$(pkglibdir) - $(MKDIR_P) $(DESTDIR)$(jardir) - -uninstall-local: - rm -f $(DESTDIR)$(bindir)/hello - rm -f $(DESTDIR)$(pkglibdir)/$(hello_MAINCLASS)$(EXEEXT) - rm -f $(DESTDIR)$(jardir)/hello-resources.jar - -CLEANFILES += $(hello_MAINCLASS)$(EXEEXT) *.$(OBJEXT) *.a tmpdir hello-resources.jar hello.sh - - -else - - # Rules for compiling Java programs as jar libraries. # This is the preferred mode during development, because you can easily test # the program without installing it, simply by doing "java -jar hello.jar". @@ -160,6 +90,3 @@ uninstall-local: rm -f $(DESTDIR)$(pkgdatadir)/javaexec.sh CLEANFILES += hello.jar Hello*.class Manifest.mf hello.sh - - -endif diff --git a/gettext-tools/examples/hello-java-awt/autoclean.sh b/gettext-tools/examples/hello-java-awt/autoclean.sh index 3e321e12b..d02f569ab 100755 --- a/gettext-tools/examples/hello-java-awt/autoclean.sh +++ b/gettext-tools/examples/hello-java-awt/autoclean.sh @@ -13,7 +13,6 @@ rm -f m4/progtest.m4 rm -f po/remove-potcdate.sin # Brought in by explicit copy. -rm -f m4/gcj.m4 rm -f m4/javacomp.m4 rm -f m4/javaexec.m4 rm -f javacomp.sh.in diff --git a/gettext-tools/examples/hello-java-awt/autogen.sh b/gettext-tools/examples/hello-java-awt/autogen.sh index 85683506b..467f213af 100755 --- a/gettext-tools/examples/hello-java-awt/autogen.sh +++ b/gettext-tools/examples/hello-java-awt/autogen.sh @@ -28,7 +28,6 @@ cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/po.m4 m4/po.m4 cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/progtest.m4 m4/progtest.m4 cp -p ${GETTEXTSRCPODIR-$GETTEXT_TOPSRCDIR/gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin -cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/gnulib-m4}/gcj.m4 m4/gcj.m4 cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/gnulib-m4}/javacomp.m4 m4/javacomp.m4 cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/gnulib-m4}/javaexec.m4 m4/javaexec.m4 cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/build-aux}/javacomp.sh.in javacomp.sh.in diff --git a/gettext-tools/examples/hello-java-awt/configure.ac b/gettext-tools/examples/hello-java-awt/configure.ac index 3eae8bed2..dfb1a859a 100644 --- a/gettext-tools/examples/hello-java-awt/configure.ac +++ b/gettext-tools/examples/hello-java-awt/configure.ac @@ -7,20 +7,6 @@ AC_INIT AC_CONFIG_SRCDIR(Hello.java) AM_INIT_AUTOMAKE(hello-java-awt, 0) -dnl Check whether we can build native executable. -AC_ARG_ENABLE(java-exe, - [ --enable-java-exe compile Java to native code, not to bytecode], - :, enable_java_exe=no) -gt_GCJ -if test "$enable_java_exe" != no && test -n "$HAVE_GCJ"; then - BUILDJAVAEXE=yes -else - BUILDJAVAEXE=no -fi -AC_SUBST(BUILDJAVAEXE) -AM_CONDITIONAL([USEJEXE], [test "$BUILDJAVAEXE" = yes]) -AC_PROG_RANLIB - dnl Check whether we can execute Java programs. gt_JAVAEXEC([TestAWT], [$srcdir/m4]) dnl Check whether we can build Java programs. diff --git a/gettext-tools/examples/hello-java-awt/m4/Makefile.am b/gettext-tools/examples/hello-java-awt/m4/Makefile.am index 26f6298ae..dea6fde27 100644 --- a/gettext-tools/examples/hello-java-awt/m4/Makefile.am +++ b/gettext-tools/examples/hello-java-awt/m4/Makefile.am @@ -1,3 +1,3 @@ EXTRA_DIST = \ nls.m4 po.m4 \ - gcj.m4 javacomp.m4 javaexec.m4 TestAWT.java TestAWT.class + javacomp.m4 javaexec.m4 TestAWT.java TestAWT.class diff --git a/gettext-tools/examples/hello-java-qtjambi/Makefile.am b/gettext-tools/examples/hello-java-qtjambi/Makefile.am index 4bc1a1d4c..58e07c2bf 100644 --- a/gettext-tools/examples/hello-java-qtjambi/Makefile.am +++ b/gettext-tools/examples/hello-java-qtjambi/Makefile.am @@ -40,84 +40,14 @@ jardir = $(datadir)/$(PACKAGE) pkgdatadir = $(datadir)/$(PACKAGE) pkglibdir = $(libdir)/$(PACKAGE) -GCJ = @GCJ@ -GCJFLAGS = @GCJFLAGS@ JAR = @JAR@ JAVACOMP = $(SHELL) javacomp.sh -AR = ar -RANLIB = @RANLIB@ EXTRA_DIST += $(hello_SOURCES) CLEANFILES = DISTCLEANFILES = javacomp.sh javaexec.sh -if USEJEXE - - -# Rules for compiling Java programs as native code. - -all-local: $(hello_MAINCLASS)$(EXEEXT) hello-resources.jar hello.sh - -# Does not work yet with GCC 3.3. -#$(hello_MAINCLASS)$(EXEEXT): $(srcdir)/Hello.java -# CLASSPATH=.@CLASSPATH_SEPARATOR@$(hello_JAVALIBS)@CLASSPATH_SEPARATOR@$$CLASSPATH $(GCJ) $(GCJFLAGS) $(srcdir)/Hello.java $(hello_JAVALIBS) --main=$(hello_MAINCLASS) -o $@ - -$(hello_MAINCLASS)$(EXEEXT): Hello.$(OBJEXT) libintl.a - $(GCJ) $(GCJFLAGS) Hello.$(OBJEXT) libintl.a --main=$(hello_MAINCLASS) -o $@ - -Hello.$(OBJEXT): $(srcdir)/Hello.java - CLASSPATH=.@CLASSPATH_SEPARATOR@$(hello_JAVALIBS)@CLASSPATH_SEPARATOR@$$CLASSPATH $(GCJ) $(GCJFLAGS) -c $(srcdir)/Hello.java -o $@ - -libintl.a: - rm -rf tmpdir - mkdir tmpdir - cd tmpdir && $(JAR) xf @LIBINTL_JAR@ && \ - for f in `find . -name '*.class' -print`; do \ - $(GCJ) $(GCJFLAGS) -c $$f -o `echo $$f | sed -e 's,^\./,,' -e 's,\.class$$,,' -e 's,/,.,g'`.$(OBJEXT) || exit 1; \ - done && \ - rm -f ../libintl.a && \ - ar cru ../libintl.a `find . -name '*.$(OBJEXT)' -print` - rm -rf tmpdir - $(RANLIB) $@ - -hello-resources.jar: - catalogs=`MAKEFLAGS= $(MAKE) -s -C po echo-catalogs`; \ - $(JAR) cf $@ $(hello_RESOURCES) $$catalogs - -hello.sh: - { echo '#!/bin/sh'; \ - echo "CLASSPATH='$(jardir)/hello-resources.jar'\$${CLASSPATH+\"@CLASSPATH_SEPARATOR@\$$CLASSPATH\"}"; \ - echo "export CLASSPATH"; \ - echo "exec '$(pkglibdir)/$(hello_MAINCLASS)$(EXEEXT)' \"\$$@\""; \ - } > $@ - -install-exec-local: all-local - $(MKDIR_P) $(DESTDIR)$(bindir) - $(INSTALL_SCRIPT) hello.sh $(DESTDIR)$(bindir)/hello - $(MKDIR_P) $(DESTDIR)$(pkglibdir) - $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $(hello_MAINCLASS)$(EXEEXT) $(DESTDIR)$(pkglibdir)/$(hello_MAINCLASS)$(EXEEXT) - -install-data-local: all-local - $(MKDIR_P) $(DESTDIR)$(jardir) - $(INSTALL_DATA) hello-resources.jar $(DESTDIR)$(jardir)/hello-resources.jar - -installdirs-local: - $(MKDIR_P) $(DESTDIR)$(bindir) - $(MKDIR_P) $(DESTDIR)$(pkglibdir) - $(MKDIR_P) $(DESTDIR)$(jardir) - -uninstall-local: - rm -f $(DESTDIR)$(bindir)/hello - rm -f $(DESTDIR)$(pkglibdir)/$(hello_MAINCLASS)$(EXEEXT) - rm -f $(DESTDIR)$(jardir)/hello-resources.jar - -CLEANFILES += $(hello_MAINCLASS)$(EXEEXT) *.$(OBJEXT) *.a tmpdir hello-resources.jar hello.sh - - -else - - # Rules for compiling Java programs as jar libraries. # This is the preferred mode during development, because you can easily test # the program without installing it, simply by doing "java -jar hello.jar". @@ -160,6 +90,3 @@ uninstall-local: rm -f $(DESTDIR)$(pkgdatadir)/javaexec.sh CLEANFILES += hello.jar Hello*.class Manifest.mf hello.sh - - -endif diff --git a/gettext-tools/examples/hello-java-qtjambi/autoclean.sh b/gettext-tools/examples/hello-java-qtjambi/autoclean.sh index 66ba43067..a30acc41b 100755 --- a/gettext-tools/examples/hello-java-qtjambi/autoclean.sh +++ b/gettext-tools/examples/hello-java-qtjambi/autoclean.sh @@ -13,7 +13,6 @@ rm -f m4/progtest.m4 rm -f po/remove-potcdate.sin # Brought in by explicit copy. -rm -f m4/gcj.m4 rm -f m4/javacomp.m4 rm -f m4/javaexec.m4 rm -f javacomp.sh.in diff --git a/gettext-tools/examples/hello-java-qtjambi/autogen.sh b/gettext-tools/examples/hello-java-qtjambi/autogen.sh index 85683506b..467f213af 100755 --- a/gettext-tools/examples/hello-java-qtjambi/autogen.sh +++ b/gettext-tools/examples/hello-java-qtjambi/autogen.sh @@ -28,7 +28,6 @@ cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/po.m4 m4/po.m4 cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/progtest.m4 m4/progtest.m4 cp -p ${GETTEXTSRCPODIR-$GETTEXT_TOPSRCDIR/gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin -cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/gnulib-m4}/gcj.m4 m4/gcj.m4 cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/gnulib-m4}/javacomp.m4 m4/javacomp.m4 cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/gnulib-m4}/javaexec.m4 m4/javaexec.m4 cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/build-aux}/javacomp.sh.in javacomp.sh.in diff --git a/gettext-tools/examples/hello-java-qtjambi/configure.ac b/gettext-tools/examples/hello-java-qtjambi/configure.ac index 3b3e6884a..ca4a5ce49 100644 --- a/gettext-tools/examples/hello-java-qtjambi/configure.ac +++ b/gettext-tools/examples/hello-java-qtjambi/configure.ac @@ -7,22 +7,6 @@ AC_INIT AC_CONFIG_SRCDIR(Hello.java) AM_INIT_AUTOMAKE(hello-java-qtjambi, 0) -dnl Check whether we can build native executable. -dnl This does currently not work, since QtJambi requires a Java >= 1.5. -dnl AC_ARG_ENABLE(java-exe, -dnl [ --enable-java-exe compile Java to native code, not to bytecode], -dnl :, enable_java_exe=no) -dnl gt_GCJ -dnl if test "$enable_java_exe" != no && test -n "$HAVE_GCJ"; then -dnl BUILDJAVAEXE=yes -dnl else -dnl BUILDJAVAEXE=no -dnl fi -BUILDJAVAEXE=no -AC_SUBST(BUILDJAVAEXE) -AM_CONDITIONAL([USEJEXE], [test "$BUILDJAVAEXE" = yes]) -AC_PROG_RANLIB - dnl Check whether we can execute Java programs. gt_JAVAEXEC([Test15], [$srcdir/m4]) dnl Check whether we can build Java programs. diff --git a/gettext-tools/examples/hello-java-qtjambi/m4/Makefile.am b/gettext-tools/examples/hello-java-qtjambi/m4/Makefile.am index 62ed854ea..1beb8a926 100644 --- a/gettext-tools/examples/hello-java-qtjambi/m4/Makefile.am +++ b/gettext-tools/examples/hello-java-qtjambi/m4/Makefile.am @@ -1,3 +1,3 @@ EXTRA_DIST = \ nls.m4 po.m4 \ - gcj.m4 javacomp.m4 javaexec.m4 Test15.java Test15.class + javacomp.m4 javaexec.m4 Test15.java Test15.class diff --git a/gettext-tools/examples/hello-java-swing/Makefile.am b/gettext-tools/examples/hello-java-swing/Makefile.am index fb75ef2a3..a0de172fa 100644 --- a/gettext-tools/examples/hello-java-swing/Makefile.am +++ b/gettext-tools/examples/hello-java-swing/Makefile.am @@ -40,84 +40,14 @@ jardir = $(datadir)/$(PACKAGE) pkgdatadir = $(datadir)/$(PACKAGE) pkglibdir = $(libdir)/$(PACKAGE) -GCJ = @GCJ@ -GCJFLAGS = @GCJFLAGS@ JAR = @JAR@ JAVACOMP = $(SHELL) javacomp.sh -AR = ar -RANLIB = @RANLIB@ EXTRA_DIST += $(hello_SOURCES) CLEANFILES = DISTCLEANFILES = javacomp.sh javaexec.sh -if USEJEXE - - -# Rules for compiling Java programs as native code. - -all-local: $(hello_MAINCLASS)$(EXEEXT) hello-resources.jar hello.sh - -# Does not work yet with GCC 3.3. -#$(hello_MAINCLASS)$(EXEEXT): $(srcdir)/Hello.java -# CLASSPATH=.@CLASSPATH_SEPARATOR@$(hello_JAVALIBS) $(GCJ) $(GCJFLAGS) $(srcdir)/Hello.java $(hello_JAVALIBS) --main=$(hello_MAINCLASS) -o $@ - -$(hello_MAINCLASS)$(EXEEXT): Hello.$(OBJEXT) libintl.a - $(GCJ) $(GCJFLAGS) Hello.$(OBJEXT) libintl.a --main=$(hello_MAINCLASS) -o $@ - -Hello.$(OBJEXT): $(srcdir)/Hello.java - CLASSPATH=.@CLASSPATH_SEPARATOR@$(hello_JAVALIBS) $(GCJ) $(GCJFLAGS) -c $(srcdir)/Hello.java -o $@ - -libintl.a: - rm -rf tmpdir - mkdir tmpdir - cd tmpdir && $(JAR) xf @LIBINTL_JAR@ && \ - for f in `find . -name '*.class' -print`; do \ - $(GCJ) $(GCJFLAGS) -c $$f -o `echo $$f | sed -e 's,^\./,,' -e 's,\.class$$,,' -e 's,/,.,g'`.$(OBJEXT) || exit 1; \ - done && \ - rm -f ../libintl.a && \ - ar cru ../libintl.a `find . -name '*.$(OBJEXT)' -print` - rm -rf tmpdir - $(RANLIB) $@ - -hello-resources.jar: - catalogs=`MAKEFLAGS= $(MAKE) -s -C po echo-catalogs`; \ - $(JAR) cf $@ $(hello_RESOURCES) $$catalogs - -hello.sh: - { echo '#!/bin/sh'; \ - echo "CLASSPATH='$(jardir)/hello-resources.jar'\$${CLASSPATH+\"@CLASSPATH_SEPARATOR@\$$CLASSPATH\"}"; \ - echo "export CLASSPATH"; \ - echo "exec '$(pkglibdir)/$(hello_MAINCLASS)$(EXEEXT)' \"\$$@\""; \ - } > $@ - -install-exec-local: all-local - $(MKDIR_P) $(DESTDIR)$(bindir) - $(INSTALL_SCRIPT) hello.sh $(DESTDIR)$(bindir)/hello - $(MKDIR_P) $(DESTDIR)$(pkglibdir) - $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $(hello_MAINCLASS)$(EXEEXT) $(DESTDIR)$(pkglibdir)/$(hello_MAINCLASS)$(EXEEXT) - -install-data-local: all-local - $(MKDIR_P) $(DESTDIR)$(jardir) - $(INSTALL_DATA) hello-resources.jar $(DESTDIR)$(jardir)/hello-resources.jar - -installdirs-local: - $(MKDIR_P) $(DESTDIR)$(bindir) - $(MKDIR_P) $(DESTDIR)$(pkglibdir) - $(MKDIR_P) $(DESTDIR)$(jardir) - -uninstall-local: - rm -f $(DESTDIR)$(bindir)/hello - rm -f $(DESTDIR)$(pkglibdir)/$(hello_MAINCLASS)$(EXEEXT) - rm -f $(DESTDIR)$(jardir)/hello-resources.jar - -CLEANFILES += $(hello_MAINCLASS)$(EXEEXT) *.$(OBJEXT) *.a tmpdir hello-resources.jar hello.sh - - -else - - # Rules for compiling Java programs as jar libraries. # This is the preferred mode during development, because you can easily test # the program without installing it, simply by doing "java -jar hello.jar". @@ -160,6 +90,3 @@ uninstall-local: rm -f $(DESTDIR)$(pkgdatadir)/javaexec.sh CLEANFILES += hello.jar Hello*.class Manifest.mf hello.sh - - -endif diff --git a/gettext-tools/examples/hello-java-swing/autoclean.sh b/gettext-tools/examples/hello-java-swing/autoclean.sh index 9eb516401..cfcb37467 100755 --- a/gettext-tools/examples/hello-java-swing/autoclean.sh +++ b/gettext-tools/examples/hello-java-swing/autoclean.sh @@ -13,7 +13,6 @@ rm -f m4/progtest.m4 rm -f po/remove-potcdate.sin # Brought in by explicit copy. -rm -f m4/gcj.m4 rm -f m4/javacomp.m4 rm -f m4/javaexec.m4 rm -f javacomp.sh.in diff --git a/gettext-tools/examples/hello-java-swing/autogen.sh b/gettext-tools/examples/hello-java-swing/autogen.sh index 85683506b..467f213af 100755 --- a/gettext-tools/examples/hello-java-swing/autogen.sh +++ b/gettext-tools/examples/hello-java-swing/autogen.sh @@ -28,7 +28,6 @@ cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/po.m4 m4/po.m4 cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/progtest.m4 m4/progtest.m4 cp -p ${GETTEXTSRCPODIR-$GETTEXT_TOPSRCDIR/gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin -cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/gnulib-m4}/gcj.m4 m4/gcj.m4 cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/gnulib-m4}/javacomp.m4 m4/javacomp.m4 cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/gnulib-m4}/javaexec.m4 m4/javaexec.m4 cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/build-aux}/javacomp.sh.in javacomp.sh.in diff --git a/gettext-tools/examples/hello-java-swing/configure.ac b/gettext-tools/examples/hello-java-swing/configure.ac index 96fd903ef..4d3295d37 100644 --- a/gettext-tools/examples/hello-java-swing/configure.ac +++ b/gettext-tools/examples/hello-java-swing/configure.ac @@ -7,20 +7,6 @@ AC_INIT AC_CONFIG_SRCDIR(Hello.java) AM_INIT_AUTOMAKE(hello-java-swing, 0) -dnl Check whether we can build native executable. -AC_ARG_ENABLE(java-exe, - [ --enable-java-exe compile Java to native code, not to bytecode], - :, enable_java_exe=no) -gt_GCJ -if test "$enable_java_exe" != no && test -n "$HAVE_GCJ"; then - BUILDJAVAEXE=yes -else - BUILDJAVAEXE=no -fi -AC_SUBST(BUILDJAVAEXE) -AM_CONDITIONAL([USEJEXE], [test "$BUILDJAVAEXE" = yes]) -AC_PROG_RANLIB - dnl Check whether we can execute Java programs. gt_JAVAEXEC([TestAWT], [$srcdir/m4]) dnl Check whether we can build Java programs. diff --git a/gettext-tools/examples/hello-java-swing/m4/Makefile.am b/gettext-tools/examples/hello-java-swing/m4/Makefile.am index 26f6298ae..dea6fde27 100644 --- a/gettext-tools/examples/hello-java-swing/m4/Makefile.am +++ b/gettext-tools/examples/hello-java-swing/m4/Makefile.am @@ -1,3 +1,3 @@ EXTRA_DIST = \ nls.m4 po.m4 \ - gcj.m4 javacomp.m4 javaexec.m4 TestAWT.java TestAWT.class + javacomp.m4 javaexec.m4 TestAWT.java TestAWT.class diff --git a/gettext-tools/examples/hello-java/Makefile.am b/gettext-tools/examples/hello-java/Makefile.am index 82d58f2d2..86af010d2 100644 --- a/gettext-tools/examples/hello-java/Makefile.am +++ b/gettext-tools/examples/hello-java/Makefile.am @@ -40,84 +40,15 @@ jardir = $(datadir)/$(PACKAGE) pkgdatadir = $(datadir)/$(PACKAGE) pkglibdir = $(libdir)/$(PACKAGE) -GCJ = @GCJ@ -GCJFLAGS = @GCJFLAGS@ JAR = @JAR@ JAVACOMP = $(SHELL) javacomp.sh AR = ar -RANLIB = @RANLIB@ EXTRA_DIST += $(hello_SOURCES) CLEANFILES = DISTCLEANFILES = javacomp.sh javaexec.sh -if USEJEXE - - -# Rules for compiling Java programs as native code. - -all-local: $(hello_MAINCLASS)$(EXEEXT) hello-resources.jar hello.sh - -# Does not work yet with GCC 3.3. -#$(hello_MAINCLASS)$(EXEEXT): $(srcdir)/Hello.java -# CLASSPATH=.@CLASSPATH_SEPARATOR@$(hello_JAVALIBS) $(GCJ) $(GCJFLAGS) $(srcdir)/Hello.java $(hello_JAVALIBS) --main=$(hello_MAINCLASS) -o $@ - -$(hello_MAINCLASS)$(EXEEXT): Hello.$(OBJEXT) libintl.a - $(GCJ) $(GCJFLAGS) Hello.$(OBJEXT) libintl.a --main=$(hello_MAINCLASS) -o $@ - -Hello.$(OBJEXT): $(srcdir)/Hello.java - CLASSPATH=.@CLASSPATH_SEPARATOR@$(hello_JAVALIBS) $(GCJ) $(GCJFLAGS) -c $(srcdir)/Hello.java -o $@ - -libintl.a: - rm -rf tmpdir - mkdir tmpdir - cd tmpdir && $(JAR) xf @LIBINTL_JAR@ && \ - for f in `find . -name '*.class' -print`; do \ - $(GCJ) $(GCJFLAGS) -c $$f -o `echo $$f | sed -e 's,^\./,,' -e 's,\.class$$,,' -e 's,/,.,g'`.$(OBJEXT) || exit 1; \ - done && \ - rm -f ../libintl.a && \ - ar cru ../libintl.a `find . -name '*.$(OBJEXT)' -print` - rm -rf tmpdir - $(RANLIB) $@ - -hello-resources.jar: - catalogs=`MAKEFLAGS= $(MAKE) -s -C po echo-catalogs`; \ - $(JAR) cf $@ $(hello_RESOURCES) $$catalogs - -hello.sh: - { echo '#!/bin/sh'; \ - echo "CLASSPATH='$(jardir)/hello-resources.jar'\$${CLASSPATH+\"@CLASSPATH_SEPARATOR@\$$CLASSPATH\"}"; \ - echo "export CLASSPATH"; \ - echo "exec '$(pkglibdir)/$(hello_MAINCLASS)$(EXEEXT)' \"\$$@\""; \ - } > $@ - -install-exec-local: all-local - $(MKDIR_P) $(DESTDIR)$(bindir) - $(INSTALL_SCRIPT) hello.sh $(DESTDIR)$(bindir)/hello - $(MKDIR_P) $(DESTDIR)$(pkglibdir) - $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $(hello_MAINCLASS)$(EXEEXT) $(DESTDIR)$(pkglibdir)/$(hello_MAINCLASS)$(EXEEXT) - -install-data-local: all-local - $(MKDIR_P) $(DESTDIR)$(jardir) - $(INSTALL_DATA) hello-resources.jar $(DESTDIR)$(jardir)/hello-resources.jar - -installdirs-local: - $(MKDIR_P) $(DESTDIR)$(bindir) - $(MKDIR_P) $(DESTDIR)$(pkglibdir) - $(MKDIR_P) $(DESTDIR)$(jardir) - -uninstall-local: - rm -f $(DESTDIR)$(bindir)/hello - rm -f $(DESTDIR)$(pkglibdir)/$(hello_MAINCLASS)$(EXEEXT) - rm -f $(DESTDIR)$(jardir)/hello-resources.jar - -CLEANFILES += $(hello_MAINCLASS)$(EXEEXT) *.$(OBJEXT) *.a tmpdir hello-resources.jar hello.sh - - -else - - # Rules for compiling Java programs as jar libraries. # This is the preferred mode during development, because you can easily test # the program without installing it, simply by doing "java -jar hello.jar". @@ -160,6 +91,3 @@ uninstall-local: rm -f $(DESTDIR)$(pkgdatadir)/javaexec.sh CLEANFILES += hello.jar Hello*.class Manifest.mf hello.sh - - -endif diff --git a/gettext-tools/examples/hello-java/autoclean.sh b/gettext-tools/examples/hello-java/autoclean.sh index 50f9bcaa6..010929347 100755 --- a/gettext-tools/examples/hello-java/autoclean.sh +++ b/gettext-tools/examples/hello-java/autoclean.sh @@ -13,7 +13,6 @@ rm -f m4/progtest.m4 rm -f po/remove-potcdate.sin # Brought in by explicit copy. -rm -f m4/gcj.m4 rm -f m4/javacomp.m4 rm -f m4/javaexec.m4 rm -f javacomp.sh.in diff --git a/gettext-tools/examples/hello-java/autogen.sh b/gettext-tools/examples/hello-java/autogen.sh index 85683506b..467f213af 100755 --- a/gettext-tools/examples/hello-java/autogen.sh +++ b/gettext-tools/examples/hello-java/autogen.sh @@ -28,7 +28,6 @@ cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/po.m4 m4/po.m4 cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/progtest.m4 m4/progtest.m4 cp -p ${GETTEXTSRCPODIR-$GETTEXT_TOPSRCDIR/gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin -cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/gnulib-m4}/gcj.m4 m4/gcj.m4 cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/gnulib-m4}/javacomp.m4 m4/javacomp.m4 cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/gnulib-m4}/javaexec.m4 m4/javaexec.m4 cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/build-aux}/javacomp.sh.in javacomp.sh.in diff --git a/gettext-tools/examples/hello-java/configure.ac b/gettext-tools/examples/hello-java/configure.ac index 6b7a94b59..031c13099 100644 --- a/gettext-tools/examples/hello-java/configure.ac +++ b/gettext-tools/examples/hello-java/configure.ac @@ -7,20 +7,6 @@ AC_INIT AC_CONFIG_SRCDIR(Hello.java) AM_INIT_AUTOMAKE(hello-java, 0) -dnl Check whether we can build native executable. -AC_ARG_ENABLE(java-exe, - [ --disable-java-exe compile Java to bytecode only, not to native code], - :, enable_java_exe=yes) -gt_GCJ -if test "$enable_java_exe" != no && test -n "$HAVE_GCJ"; then - BUILDJAVAEXE=yes -else - BUILDJAVAEXE=no -fi -AC_SUBST(BUILDJAVAEXE) -AM_CONDITIONAL([USEJEXE], [test "$BUILDJAVAEXE" = yes]) -AC_PROG_RANLIB - dnl Check whether we can execute Java programs. gt_JAVAEXEC dnl Check whether we can build Java programs. diff --git a/gettext-tools/examples/hello-java/m4/Makefile.am b/gettext-tools/examples/hello-java/m4/Makefile.am index 20c951f96..e89cfb5c7 100644 --- a/gettext-tools/examples/hello-java/m4/Makefile.am +++ b/gettext-tools/examples/hello-java/m4/Makefile.am @@ -1,3 +1,3 @@ EXTRA_DIST = \ nls.m4 po.m4 \ - gcj.m4 javacomp.m4 javaexec.m4 + javacomp.m4 javaexec.m4 diff --git a/gettext-tools/m4/Makefile.am b/gettext-tools/m4/Makefile.am index 3c4c53c6a..907c31c0f 100644 --- a/gettext-tools/m4/Makefile.am +++ b/gettext-tools/m4/Makefile.am @@ -41,7 +41,7 @@ aclocal_DATA = \ examplesbuildauxdir = $(docdir)/examples/build-aux examplesbuildaux_DATA = \ - ../gnulib-m4/gcj.m4 ../gnulib-m4/javacomp.m4 ../gnulib-m4/javaexec.m4 \ + ../gnulib-m4/javacomp.m4 ../gnulib-m4/javaexec.m4 \ ../gnulib-m4/csharpcomp.m4 ../gnulib-m4/csharpexec.m4 csharpexec-test.exe # Generate this list with diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am index 0538d1e64..764afd13a 100644 --- a/gettext-tools/src/Makefile.am +++ b/gettext-tools/src/Makefile.am @@ -1,5 +1,5 @@ ## Makefile for the gettext-tools/src subdirectory of GNU gettext -## Copyright (C) 1995-1998, 2000-2011, 2015-2016 Free Software Foundation, Inc. +## Copyright (C) 1995-1998, 2000-2011, 2015-2017 Free Software Foundation, Inc. ## ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -75,8 +75,6 @@ DEFS = \ -DLOCALEDIR=\"$(localedir)\" -DBISON_LOCALEDIR=\"$(BISON_LOCALEDIR)\" \ -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \ -DUSEJAVA=$(USEJAVA) \ - -DUSEJEXE=$(USEJEXE) \ - -DGETTEXTJEXEDIR=\"$(pkglibdir)\" \ -DGETTEXTJAR=\"$(jardir)/gettext.jar\" \ -DLIBDIR=\"$(libdir)\" \ -DGETTEXTDATADIR=\"$(pkgdatadir)\" \ @@ -89,8 +87,6 @@ OTHERPROGDEPENDENCIES = ../gnulib-lib/libgettextlib.la $(WOE32_LDADD) SED = sed YACC = @YACC@ -d -GCJ = @GCJ@ -GCJFLAGS = @GCJFLAGS@ JAR = @JAR@ JAVACOMP = $(SHELL) ../javacomp.sh CSHARPCOMP = $(SHELL) ../csharpcomp.sh @@ -496,27 +492,13 @@ DISTCLEANFILES += user-email # Special rules for Java compilation. -USEJAVA = $(USEJAVA_@BUILDJAVAEXE@) +USEJAVA = $(USEJAVA_@BUILDJAVA@) USEJAVA_yes = 1 -USEJAVA_no = $(USEJAVA_no_@BUILDJAVA@) -USEJAVA_no_yes = 1 -USEJAVA_no_no = 0 +USEJAVA_no = 0 -USEJEXE = $(USEJEXE_@BUILDJAVAEXE@) -USEJEXE_yes = 1 -USEJEXE_no = 0 - -all-local: all-java-@BUILDJAVAEXE@ -all-java-yes: gnu.gettext.DumpResource$(EXEEXT) gnu.gettext.GetURL$(EXEEXT) -all-java-no: all-java-no-@BUILDJAVA@ -all-java-no-yes: gettext.jar -all-java-no-no: - -gnu.gettext.DumpResource$(EXEEXT): $(srcdir)/gnu/gettext/DumpResource.java - $(GCJ) $(GCJFLAGS) $(srcdir)/gnu/gettext/DumpResource.java --main=gnu.gettext.DumpResource -o $@ - -gnu.gettext.GetURL$(EXEEXT): $(srcdir)/gnu/gettext/GetURL.java - $(GCJ) $(GCJFLAGS) $(srcdir)/gnu/gettext/GetURL.java --main=gnu.gettext.GetURL -o $@ +all-local: all-java-@BUILDJAVA@ +all-java-yes: gettext.jar +all-java-no: gnu/gettext/DumpResource.class: $(srcdir)/gnu/gettext/DumpResource.java $(JAVACOMP) -d . $(srcdir)/gnu/gettext/DumpResource.java @@ -529,39 +511,22 @@ gettext.jar: gnu/gettext/DumpResource.class gnu/gettext/GetURL.class EXTRA_DIST += gnu/gettext/DumpResource.java gnu/gettext/GetURL.java -CLEANFILES += gnu.gettext.DumpResource$(EXEEXT) gnu.gettext.GetURL$(EXEEXT) \ - gettext.jar gnu/gettext/*.class +CLEANFILES += gettext.jar gnu/gettext/*.class -install-exec-local: install-exec-java-@BUILDJAVAEXE@ -install-exec-java-yes: all-java-yes - $(MKDIR_P) $(DESTDIR)$(pkglibdir) - $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) gnu.gettext.DumpResource$(EXEEXT) $(DESTDIR)$(pkglibdir)/gnu.gettext.DumpResource$(EXEEXT) - $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) gnu.gettext.GetURL$(EXEEXT) $(DESTDIR)$(pkglibdir)/gnu.gettext.GetURL$(EXEEXT) -install-exec-java-no: - -install-data-local: install-data-java-@BUILDJAVAEXE@ -install-data-java-yes: -install-data-java-no: install-data-java-no-@BUILDJAVA@ -install-data-java-no-yes: all-java-no-yes +install-data-local: install-data-java-@BUILDJAVA@ +install-data-java-yes: all-java-yes $(INSTALL_DATA) gettext.jar $(DESTDIR)$(jardir)/gettext.jar -install-data-java-no-no: +install-data-java-no: -installdirs-local: installdirs-java-@BUILDJAVAEXE@ +installdirs-local: installdirs-java-@BUILDJAVA@ installdirs-java-yes: - $(MKDIR_P) $(DESTDIR)$(pkglibdir) -installdirs-java-no: installdirs-java-no-@BUILDJAVA@ -installdirs-java-no-yes: $(MKDIR_P) $(DESTDIR)$(jardir) -installdirs-java-no-no: +installdirs-java-no: -uninstall-local: uninstall-java-@BUILDJAVAEXE@ +uninstall-local: uninstall-java-@BUILDJAVA@ uninstall-java-yes: - $(RM) $(DESTDIR)$(pkglibdir)/gnu.gettext.DumpResource$(EXEEXT) - $(RM) $(DESTDIR)$(pkglibdir)/gnu.gettext.GetURL$(EXEEXT) -uninstall-java-no: uninstall-java-no-@BUILDJAVA@ -uninstall-java-no-yes: $(RM) $(DESTDIR)$(jardir)/gettext.jar -uninstall-java-no-no: +uninstall-java-no: # Special rules for C# auxiliary programs. diff --git a/gettext-tools/src/read-java.c b/gettext-tools/src/read-java.c index 0eb5ed5ff..9f4d41aee 100644 --- a/gettext-tools/src/read-java.c +++ b/gettext-tools/src/read-java.c @@ -1,5 +1,5 @@ /* Reading Java ResourceBundles. - Copyright (C) 2001-2003, 2006-2008, 2011, 2015-2016 Free Software + Copyright (C) 2001-2003, 2006-2008, 2011, 2015-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2001. @@ -95,16 +95,6 @@ msgdomain_read_java (const char *resource_name, const char *locale_name) const char *args[3]; struct locals locals; -#if USEJEXE - /* Make it possible to override the executable's location. This is - necessary for running the testsuite before "make install". */ - gettextjexedir = getenv ("GETTEXTJEXEDIR"); - if (gettextjexedir == NULL || gettextjexedir[0] == '\0') - gettextjexedir = relocate (GETTEXTJEXEDIR); -#else - gettextjexedir = NULL; -#endif - /* Make it possible to override the gettext.jar location. This is necessary for running the testsuite before "make install". */ gettextjar = getenv ("GETTEXTJAR"); @@ -128,7 +118,7 @@ msgdomain_read_java (const char *resource_name, const char *locale_name) /* Dump the resource and retrieve the resulting output. Here we use the user's CLASSPATH, not a minimal one, so that the resource can be found. */ - if (execute_java_class (class_name, &gettextjar, 1, false, gettextjexedir, + if (execute_java_class (class_name, &gettextjar, 1, false, NULL, args, verbose, false, execute_and_read_po_output, &locals)) diff --git a/gettext-tools/src/urlget.c b/gettext-tools/src/urlget.c index 5ac06f03b..88984b740 100644 --- a/gettext-tools/src/urlget.c +++ b/gettext-tools/src/urlget.c @@ -1,5 +1,5 @@ /* Get the contents of an URL. - Copyright (C) 2001-2003, 2005-2010, 2012, 2015-2016 Free Software + Copyright (C) 2001-2003, 2005-2010, 2012, 2015-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2001. @@ -270,20 +270,9 @@ fetch (const char *url, const char *file) /* First try: using Java. */ { const char *class_name = "gnu.gettext.GetURL"; - const char *gettextjexedir; const char *gettextjar; const char *args[2]; -# if USEJEXE - /* Make it possible to override the executable's location. This is - necessary for running the testsuite before "make install". */ - gettextjexedir = getenv ("GETTEXTJEXEDIR"); - if (gettextjexedir == NULL || gettextjexedir[0] == '\0') - gettextjexedir = relocate (GETTEXTJEXEDIR); -# else - gettextjexedir = NULL; -# endif - /* Make it possible to override the gettext.jar location. This is necessary for running the testsuite before "make install". */ gettextjar = getenv ("GETTEXTJAR"); @@ -296,7 +285,7 @@ fetch (const char *url, const char *file) /* Fetch the URL's contents. */ java_exitcode = 127; - if (!execute_java_class (class_name, &gettextjar, 1, true, gettextjexedir, + if (!execute_java_class (class_name, &gettextjar, 1, true, NULL, args, false, true, execute_it, NULL)) diff --git a/gettext-tools/tests/msgunfmt-java-1 b/gettext-tools/tests/msgunfmt-java-1 index 3b807f07d..2cb95dd0a 100755 --- a/gettext-tools/tests/msgunfmt-java-1 +++ b/gettext-tools/tests/msgunfmt-java-1 @@ -58,7 +58,7 @@ ${MSGFMT} -j -d mu-java-1 -r prog -l fr mu-java-1/fr.po || Exit 1 : ${MSGUNFMT=msgunfmt} CLASSPATH=mu-java-1${CLASSPATH:+:$CLASSPATH} \ -GETTEXTJEXEDIR=../../src GETTEXTJAR=../../src/gettext.jar \ +GETTEXTJAR=../../src/gettext.jar \ ${MSGUNFMT} --java -d mu-java-1 -r prog -l fr -o mu-java-1/prog.out || Exit 1 : ${MSGCAT=msgcat} diff --git a/gnulib-local/Makefile.am b/gnulib-local/Makefile.am index 589edf09c..cfb71aefd 100644 --- a/gnulib-local/Makefile.am +++ b/gnulib-local/Makefile.am @@ -1,5 +1,5 @@ ## Makefile for the gnulib-local directory of GNU gettext -## Copyright (C) 2006-2008, 2010-2011, 2015-2016 Free Software Foundation, Inc. +## Copyright (C) 2006-2008, 2010-2011, 2015-2017 Free Software Foundation, Inc. ## ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -257,7 +257,6 @@ lib/xstrdup.c \ m4/alloca.m4 \ m4/backupfile.m4 \ m4/curses.m4 \ -m4/gcj.m4 \ m4/java.m4 \ m4/libcroco.m4 \ m4/libglib.m4 \ @@ -274,7 +273,6 @@ modules/error-progname \ modules/fd-ostream \ modules/file-ostream \ modules/fnmatch.diff \ -modules/gcj \ modules/gettext-runtime-misc \ modules/gettext-tools-misc \ modules/hash \ diff --git a/gnulib-local/m4/gcj.m4 b/gnulib-local/m4/gcj.m4 deleted file mode 100644 index 521ee7db6..000000000 --- a/gnulib-local/m4/gcj.m4 +++ /dev/null @@ -1,74 +0,0 @@ -# gcj.m4 serial 2 (gettext-0.17) -dnl Copyright (C) 2002, 2006, 2015-2016 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Check for a Java compiler that creates executables. -# Assigns the variables GCJ and GCJFLAGS, and set HAVE_GCJ to nonempty, -# if found. Otherwise sets HAVE_GCJ to empty. - -AC_DEFUN([gt_GCJ], -[ - AC_ARG_VAR([GCJ], [Java native code compiler command]) - AC_ARG_VAR([GCJFLAGS], [Java native code compiler flags]) - - AC_MSG_CHECKING([for Java to native code compiler]) - # Search for the gcj command or use the one provided by the user. - if test -z "$GCJ"; then - pushdef([AC_MSG_CHECKING],[:])dnl - pushdef([AC_CHECKING],[:])dnl - pushdef([AC_MSG_RESULT],[:])dnl - AC_CHECK_TOOL([GCJ], [gcj], [none]) - popdef([AC_MSG_RESULT])dnl - popdef([AC_CHECKING])dnl - popdef([AC_MSG_CHECKING])dnl - fi - # Choose GCJFLAGS or use the one provided by the user. - if test "$GCJ" != none; then - test "${GCJFLAGS+set}" != set || GCJFLAGS="-O2 -g" - fi - # Check whether the version is ok and it can create executables. - ac_gcj_link="$GCJ $GCJFLAGS conftest.java --main=conftest -o conftest$ac_exeext" -changequote(,)dnl - if test "$GCJ" != none \ - && $GCJ --version 2>/dev/null | sed -e 's,^[^0-9]*,,' -e 1q | grep '^[3-9]' >/dev/null \ - && ( - # See if libgcj.so is well installed and if exception handling works. - cat > conftest.java </dev/null 2>&1; echo $?` - test $error = 0 || error=1 - rm -f core conftest.core - fi - rm -f conftest.java conftest$ac_exeext - exit $error - ); then - : - else - GCJ=none - fi - AC_MSG_RESULT($GCJ) - if test "$GCJ" != none; then - HAVE_GCJ=1 - else - HAVE_GCJ= - fi - AC_SUBST(GCJ) - AC_SUBST(GCJFLAGS) - AC_SUBST(HAVE_GCJ) -]) diff --git a/gnulib-local/m4/java.m4 b/gnulib-local/m4/java.m4 index 9888af149..cdfcfec4d 100644 --- a/gnulib-local/m4/java.m4 +++ b/gnulib-local/m4/java.m4 @@ -1,11 +1,10 @@ -# java.m4 serial 1 (gettext-0.15) -dnl Copyright (C) 2005, 2015-2016 Free Software Foundation, Inc. +# java.m4 serial 2 +dnl Copyright (C) 2005, 2015-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. -# Sets JAVA_CHOICE to 'yes', 'bytecode' or 'no', depending on the preferred -# use of Java. +# Sets JAVA_CHOICE to 'yes' or 'no', depending on the preferred use of Java. AC_DEFUN([gt_JAVA_CHOICE], [ AC_MSG_CHECKING([whether to use Java]) @@ -14,10 +13,5 @@ AC_DEFUN([gt_JAVA_CHOICE], [JAVA_CHOICE="$enableval"], [JAVA_CHOICE=yes]) AC_MSG_RESULT([$JAVA_CHOICE]) - if test "$JAVA_CHOICE" = yes; then - AC_ARG_ENABLE(native-java, - [ --disable-native-java do not compile Java to native executables], - [test "$enableval" != no || JAVA_CHOICE=bytecode]) - fi - AC_SUBST(JAVA_CHOICE) + AC_SUBST([JAVA_CHOICE]) ]) diff --git a/gnulib-local/modules/gcj b/gnulib-local/modules/gcj deleted file mode 100644 index 00f9b3604..000000000 --- a/gnulib-local/modules/gcj +++ /dev/null @@ -1,21 +0,0 @@ -Description: -Check for a Java compiler that creates executables. - -Files: -m4/gcj.m4 - -Depends-on: - -configure.ac: -gt_GCJ - -Makefile.am: - -Include: - -License: -GPL - -Maintainer: -Bruno Haible -