]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Don't check for java nor javac when --disable-java is specified.
authorBruno Haible <bruno@clisp.org>
Mon, 20 Jun 2022 06:56:18 +0000 (08:56 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 20 Jun 2022 06:56:18 +0000 (08:56 +0200)
This avoid annoying dialogs on macOS when Java has not been installed so far.
Reported by Iain Sandoe <idsandoe@googlemail.com> in
<https://gcc.gnu.org/pipermail/gcc/2022-June/238929.html>.

* gettext-runtime/configure.ac: When JAVA_CHOICE is 'no', bypass the gt_JAVACOMP
and JAR tests.
* gettext-tools/configure.ac: When JAVA_CHOICE is 'no', bypass the gt_JAVAEXEC,
gt_JAVACOMP, and JAR tests.

gettext-runtime/configure.ac
gettext-tools/configure.ac

index 2b946c9f7fbd2f01b273a286b13cda33feaf016a..2894b33ca0339b9644796565123019263341dd75 100644 (file)
@@ -1,5 +1,5 @@
 dnl Configuration for the gettext-runtime directory of GNU gettext
-dnl Copyright (C) 1995-2010, 2012-2015, 2018-2021 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2010, 2012-2015, 2018-2022 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
@@ -33,14 +33,19 @@ AC_PROG_CC
 AC_PROG_INSTALL
 
 gt_JAVA_CHOICE
-
-gt_JAVACOMP([1.5], [1.6])
-AC_CHECK_PROG([JAR], [jar], [jar])
-if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then
-  BUILDJAVA=yes
-else
+AS_IF([test "$JAVA_CHOICE" != no], [
+  gt_JAVACOMP([1.5], [1.6])
+  AC_CHECK_PROG([JAR], [jar], [jar])
+  if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then
+    BUILDJAVA=yes
+  else
+    BUILDJAVA=no
+  fi
+], [
+  gt_JAVACOMP_DISABLED
+  JAR=
   BUILDJAVA=no
-fi
+])
 AC_SUBST([BUILDJAVA])
 
 gt_CSHARPCOMP
index 65476ab85a7dbc2fdefec9d0f5d42c01935cbe01..551b860dfdd4944ecf1b318a1e1ae342438f8d9a 100644 (file)
@@ -1,5 +1,5 @@
 dnl Configuration for the gettext-tools directory of GNU gettext
-dnl Copyright (C) 1995-2021 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2022 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
@@ -33,15 +33,21 @@ AC_PROG_CC
 AC_PROG_INSTALL
 
 gt_JAVA_CHOICE
-
-gt_JAVAEXEC
-gt_JAVACOMP([1.5])
-AC_CHECK_PROG([JAR], [jar], [jar])
-if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then
-  BUILDJAVA=yes
-else
+AS_IF([test "$JAVA_CHOICE" != no], [
+  gt_JAVAEXEC
+  gt_JAVACOMP([1.5])
+  AC_CHECK_PROG([JAR], [jar], [jar])
+  if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then
+    BUILDJAVA=yes
+  else
+    BUILDJAVA=no
+  fi
+], [
+  gt_JAVAEXEC_DISABLED
+  gt_JAVACOMP_DISABLED
+  JAR=
   BUILDJAVA=no
-fi
+])
 AC_SUBST([BUILDJAVA])
 if test -n "$HAVE_JAVAEXEC" && test $BUILDJAVA = yes; then
   TESTJAVA=yes