8154070: Configuration script unable to detect boot JDK's modules support
authorerikj
Tue, 12 Apr 2016 15:20:39 +0200
changeset 37014 da8d0d4aa7ea
parent 37011 c84d0cce090e
child 37029 6c79f95cd24b
8154070: Configuration script unable to detect boot JDK's modules support Reviewed-by: alanb
common/autoconf/boot-jdk.m4
common/autoconf/generated-configure.sh
--- a/common/autoconf/boot-jdk.m4	Wed Jul 05 21:33:32 2017 +0200
+++ b/common/autoconf/boot-jdk.m4	Tue Apr 12 15:20:39 2016 +0200
@@ -305,7 +305,7 @@
   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
   AC_SUBST(BOOT_JDK_SOURCETARGET)
 
-  ADD_JVM_ARG_IF_OK([-Xpatch:], dummy, [$JAVA])
+  ADD_JVM_ARG_IF_OK([-Xpatch:foo=bar], dummy, [$JAVA])
   AC_MSG_CHECKING([if Boot JDK supports modules])
   if test "x$JVM_ARG_OK" = "xtrue"; then
     AC_MSG_RESULT([yes])
@@ -444,9 +444,9 @@
         BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | head -n 1`
 
         # Extra M4 quote needed to protect [] in grep expression.
-        [FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | grep  '\"1\.[9]\.'`]
+        [FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`]
         if test "x$FOUND_CORRECT_VERSION" = x; then
-          AC_MSG_NOTICE([Potential Boot JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring])
+          AC_MSG_NOTICE([Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring])
           AC_MSG_NOTICE([(Your Build JDK must be version 9)])
           BUILD_JDK_FOUND=no
         else
--- a/common/autoconf/generated-configure.sh	Wed Jul 05 21:33:32 2017 +0200
+++ b/common/autoconf/generated-configure.sh	Tue Apr 12 15:20:39 2016 +0200
@@ -4950,7 +4950,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1458755892
+DATE_WHEN_GENERATED=1460464859
 
 ###############################################################################
 #
@@ -29770,13 +29770,13 @@
 
 
 
-  $ECHO "Check if jvm arg is ok: -Xpatch:" >&5
-  $ECHO "Command: $JAVA -Xpatch: -version" >&5
-  OUTPUT=`$JAVA -Xpatch: -version 2>&1`
+  $ECHO "Check if jvm arg is ok: -Xpatch:foo=bar" >&5
+  $ECHO "Command: $JAVA -Xpatch:foo=bar -version" >&5
+  OUTPUT=`$JAVA -Xpatch:foo=bar -version 2>&1`
   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-    dummy="$dummy -Xpatch:"
+    dummy="$dummy -Xpatch:foo=bar"
     JVM_ARG_OK=true
   else
     $ECHO "Arg failed:" >&5
@@ -29856,10 +29856,10 @@
         BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | head -n 1`
 
         # Extra M4 quote needed to protect [] in grep expression.
-        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | grep  '\"1\.[9]\.'`
+        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
         if test "x$FOUND_CORRECT_VERSION" = x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
-$as_echo "$as_me: Potential Boot JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
+$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
           { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
 $as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
           BUILD_JDK_FOUND=no