From 1f5be950e42992de64f0744f7767274f014dbfef Mon Sep 17 00:00:00 2001 From: Alex Lin Date: Tue, 10 Oct 2017 09:18:51 -0500 Subject: [PATCH] Unable to configure Trick with Java 9 #486 Changed the java version extractor to look for an optional decimal and number past the decimal. Now it can properly find "9" as the version number. --- autoconf/configure.ac | 2 +- configure | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 624bba0a..b09f79ab 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -140,7 +140,7 @@ AC_DEFUN([AX_JAVA],[ AS_IF([test "$USE_JAVA" = "1"],[ AC_PROG_AWK AX_PROG_JAVA_CC(javac) - JAVA_VER=`$JAVA_CC -version 2>&1 | $ac_cv_path_PERL -ne 'print $& if /\d+\.\d+/'` + JAVA_VER=`$JAVA_CC -version 2>&1 | $ac_cv_path_PERL -ne 'print $& if /\d+(\.\d+)?/'` AC_MSG_CHECKING([$JAVA_CC version >= 1.8]) AX_COMPARE_VERSION([$JAVA_VER],[ge],[1.8], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) diff --git a/configure b/configure index 77cee218..0e90678b 100755 --- a/configure +++ b/configure @@ -5469,7 +5469,7 @@ if test "$JAVA_CC" = "gcj"; then fi test -z "$JAVA_CC" && as_fn_error $? "no acceptable java compiler found in \$PATH" "$LINENO" 5 - JAVA_VER=`$JAVA_CC -version 2>&1 | $ac_cv_path_PERL -ne 'print $& if /\d+\.\d+/'` + JAVA_VER=`$JAVA_CC -version 2>&1 | $ac_cv_path_PERL -ne 'print $& if /\d+(\.\d+)?/'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking $JAVA_CC version >= 1.8" >&5 $as_echo_n "checking $JAVA_CC version >= 1.8... " >&6; }