]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Modernize Java compiler invocations.
authorBruno Haible <bruno@clisp.org>
Mon, 10 Jun 2024 18:59:55 +0000 (20:59 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 10 Jun 2024 18:59:55 +0000 (20:59 +0200)
The currently used Java version in the industry is Java 8 or newer, since 2022.
See <https://en.wikipedia.org/wiki/Java_version_history>. And on macOS 11..13,
I'm seeing the "error: Source option 6 is no longer supported. Use 8 or later."

* gettext-runtime/configure.ac: Search for a Java compiler with source and
target 1.8.
* gettext-tools/configure.ac: Search for a Java compiler with source 1.8.
* gettext-tools/examples/hello-java/configure.ac: Likewise.
* gettext-tools/examples/hello-java-awt/configure.ac: Likewise.
* gettext-tools/examples/hello-java-swing/configure.ac: Likewise.

gettext-runtime/configure.ac
gettext-tools/configure.ac
gettext-tools/examples/hello-java-awt/configure.ac
gettext-tools/examples/hello-java-swing/configure.ac
gettext-tools/examples/hello-java/configure.ac
gettext-tools/src/write-java.c

index 456fa1210c2e5e97519221eca069307b2d4ea26a..b662d3e728e1e07e40ec7674b503ec449c97efb4 100644 (file)
@@ -1,5 +1,5 @@
 dnl Configuration for the gettext-runtime directory of GNU gettext
-dnl Copyright (C) 1995-2010, 2012-2015, 2018-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2024 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
@@ -34,7 +34,7 @@ AC_PROG_INSTALL
 
 gt_JAVA_CHOICE
 AS_IF([test "$JAVA_CHOICE" != no], [
-  gt_JAVACOMP([1.5], [1.6])
+  gt_JAVACOMP([1.8], [1.8])
   AC_CHECK_PROG([JAR], [jar], [jar])
   if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then
     BUILDJAVA=yes
index 66386a8c5d700c6442e5e6b25bcfd0b85febaf28..8f3c0f37f12b0e329ec251e9532cc4a6857c6f42 100644 (file)
@@ -35,7 +35,7 @@ AC_PROG_INSTALL
 gt_JAVA_CHOICE
 AS_IF([test "$JAVA_CHOICE" != no], [
   gt_JAVAEXEC
-  gt_JAVACOMP([1.5])
+  gt_JAVACOMP([1.8])
   AC_CHECK_PROG([JAR], [jar], [jar])
   if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then
     BUILDJAVA=yes
index 57fd16851508dc6ef6e01e78588a7f042d764253..b625e465e8a7a4b086cb6f2355d827464d59dc15 100644 (file)
@@ -10,7 +10,7 @@ AM_INIT_AUTOMAKE([1.11])
 dnl Check whether we can execute Java programs.
 gt_JAVAEXEC([TestAWT], [$srcdir/m4])
 dnl Check whether we can build Java programs.
-gt_JAVACOMP([1.5])
+gt_JAVACOMP([1.8])
 AC_CHECK_PROG([JAR], [jar], [jar])
 if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then
   BUILDJAVA=yes
index cdedcd6ba9c687a68c0dfa8226ed99ebb261a875..494dd84cc8715da578f4d57883236ec3a5ae59cc 100644 (file)
@@ -10,7 +10,7 @@ AM_INIT_AUTOMAKE([1.11])
 dnl Check whether we can execute Java programs.
 gt_JAVAEXEC([TestAWT], [$srcdir/m4])
 dnl Check whether we can build Java programs.
-gt_JAVACOMP([1.5])
+gt_JAVACOMP([1.8])
 AC_CHECK_PROG([JAR], [jar], [jar])
 if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then
   BUILDJAVA=yes
index 2206ce9ca117e27a572f055e56b6b7084ffc5b72..9336273422574a642b3b5063c8de01216863ce92 100644 (file)
@@ -10,7 +10,7 @@ AM_INIT_AUTOMAKE([1.11])
 dnl Check whether we can execute Java programs.
 gt_JAVAEXEC
 dnl Check whether we can build Java programs.
-gt_JAVACOMP([1.5])
+gt_JAVACOMP([1.8])
 AC_CHECK_PROG([JAR], [jar], [jar])
 if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then
   BUILDJAVA=yes
index f13ef201f2d854bd9545b5fc9cd3fad1a16af127..8fca624069918ddbf486ace9dd71ff7056944c9c 100644 (file)
@@ -1213,7 +1213,7 @@ msgdomain_write_java (message_list_ty *mlp, const char *canon_encoding,
      Java compilers create the class files in the source file's directory -
      which is in a temporary directory in our case.  */
   java_sources[0] = java_file_name;
-  if (compile_java_class (java_sources, 1, NULL, 0, "1.5", "1.6", directory,
+  if (compile_java_class (java_sources, 1, NULL, 0, "1.8", "1.8", directory,
                           true, false, true, verbose > 0))
     {
       if (!verbose)