From: Bruno Haible Date: Mon, 20 Jun 2022 06:56:18 +0000 (+0200) Subject: Don't check for java nor javac when --disable-java is specified. X-Git-Tag: v0.22~205 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=971dcbdbebb05d7ae8aa6399a0c79442fa996c5c;p=thirdparty%2Fgettext.git Don't check for java nor javac when --disable-java is specified. This avoid annoying dialogs on macOS when Java has not been installed so far. Reported by Iain Sandoe in . * 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. --- diff --git a/gettext-runtime/configure.ac b/gettext-runtime/configure.ac index 2b946c9f7..2894b33ca 100644 --- a/gettext-runtime/configure.ac +++ b/gettext-runtime/configure.ac @@ -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 diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac index 65476ab85..551b860df 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-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