Skip to content

Commit b104d70

Browse files
committed
Rollup merge of #24005 - ranma42:macosx-no-javac-popup, r=alexcrichton
MacOS X does not ship with Java installed by default. Instead it includes binary stubs that upon execution pop up a message suggesting the installation of the JDK. Since `javac` is only used when `antlr4` is available, it is possible to work around the popup by only probing for `javac` if `antlr4` has been successfully detected (in which case the JDK is probably already installed on the system). Fixes #23138.
2 parents 0f6049d + 0621a83 commit b104d70

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

configure

+8-1
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,6 @@ probe CFG_LD ld
669669
probe CFG_VALGRIND valgrind
670670
probe CFG_PERF perf
671671
probe CFG_ISCC iscc
672-
probe CFG_JAVAC javac
673672
probe CFG_ANTLR4 antlr4
674673
probe CFG_GRUN grun
675674
probe CFG_FLEX flex
@@ -679,6 +678,14 @@ probe CFG_XELATEX xelatex
679678
probe CFG_GDB gdb
680679
probe CFG_LLDB lldb
681680

681+
# On MacOS X, invoking `javac` pops up a dialog if the JDK is not
682+
# installed. Since `javac` is only used if `antlr4` is available,
683+
# probe for it only in this case.
684+
if [ ! -z "$CFG_ANTLR4" ]
685+
then
686+
probe CFG_JAVAC javac
687+
fi
688+
682689
if [ ! -z "$CFG_GDB" ]
683690
then
684691
# Store GDB's version

0 commit comments

Comments
 (0)