changeset 2126:e1ef7db1e02d

8137259: configure needs to parse Verona-style version strings for bootjdk Reviewed-by: erikj, iris
author ihse
date Wed, 30 Sep 2015 14:09:32 +0200
parents 38df42f29314
children 9c37a640ddba
files common/autoconf/boot-jdk.m4 common/autoconf/generated-configure.sh
diffstat 2 files changed, 618 insertions(+), 174 deletions(-) [+]
line wrap: on
line diff
--- a/common/autoconf/boot-jdk.m4	Tue Sep 29 17:56:41 2015 -0700
+++ b/common/autoconf/boot-jdk.m4	Wed Sep 30 14:09:32 2015 +0200
@@ -77,7 +77,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          [FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`]
+          [FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`]
           if test "x$FOUND_CORRECT_VERSION" = x; then
             AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring])
             AC_MSG_NOTICE([(Your Boot JDK must be version 8 or 9)])
--- a/common/autoconf/generated-configure.sh	Tue Sep 29 17:56:41 2015 -0700
+++ b/common/autoconf/generated-configure.sh	Wed Sep 30 14:09:32 2015 +0200
@@ -823,9 +823,18 @@
 BOOT_JDK
 JAVA_CHECK
 JAVAC_CHECK
-COOKED_BUILD_NUMBER
-JDK_VERSION
-COPYRIGHT_YEAR
+VERSION_IS_GA
+VERSION_SHORT
+VERSION_STRING
+VERSION_NUMBER_FOUR_POSITIONS
+VERSION_NUMBER
+VERSION_OPT
+VERSION_BUILD
+VERSION_PRE
+VERSION_PATCH
+VERSION_SECURITY
+VERSION_MINOR
+VERSION_MAJOR
 MACOSX_BUNDLE_ID_BASE
 MACOSX_BUNDLE_NAME_BASE
 COMPANY_NAME
@@ -833,13 +842,7 @@
 PRODUCT_SUFFIX
 PRODUCT_NAME
 LAUNCHER_NAME
-MILESTONE
-JDK_BUILD_NUMBER
-JDK_UPDATE_VERSION
-JDK_MICRO_VERSION
-JDK_MINOR_VERSION
-JDK_MAJOR_VERSION
-USER_RELEASE_SUFFIX
+COPYRIGHT_YEAR
 COMPRESS_JARS
 UNLIMITED_CRYPTO
 CACERTS_FILE
@@ -1059,11 +1062,20 @@
 enable_hotspot_test_in_build
 with_cacerts_file
 enable_unlimited_crypto
+with_copyright_year
 with_milestone
 with_update_version
 with_user_release_suffix
 with_build_number
-with_copyright_year
+with_version_string
+with_version_pre
+with_version_opt_base
+with_version_opt_debuglevel
+with_version_build
+with_version_major
+with_version_minor
+with_version_security
+with_version_patch
 with_boot_jdk
 with_add_source_root
 with_override_source_root
@@ -1902,13 +1914,35 @@
   --with-builddeps-group  chgrp the downloaded build dependencies to this
                           group
   --with-cacerts-file     specify alternative cacerts file
-  --with-milestone        Set milestone value for build [internal]
-  --with-update-version   Set update version value for build [b00]
+  --with-copyright-year   Set copyright year value for build [current year]
+  --with-milestone        Deprecated. Option is kept for backwards
+                          compatibility and is ignored
+  --with-update-version   Deprecated. Option is kept for backwards
+                          compatibility and is ignored
   --with-user-release-suffix
-                          Add a custom string to the version string if build
-                          number is not set.[username_builddateb00]
-  --with-build-number     Set build number value for build [b00]
-  --with-copyright-year   Set copyright year value for build [current year]
+                          Deprecated. Option is kept for backwards
+                          compatibility and is ignored
+  --with-build-number     Deprecated. Option is kept for backwards
+                          compatibility and is ignored
+  --with-version-string   Set version string [calculated]
+  --with-version-pre      Set the base part of the version 'PRE' field
+                          (pre-release identifier) ['internal']
+  --with-version-opt-base Set version 'OPT' base field. Debug level will be
+                          appended. (build metadata)
+                          [<timestamp>.<user>.<dirname>]
+  --with-version-opt-debuglevel
+                          Set version 'OPT' field (build metadata)
+                          [<timestamp>.<user>.<dirname>]
+  --with-version-build    Set version 'BUILD' field (build number) [not
+                          specified]
+  --with-version-major    Set version 'MAJOR' field (first number) [current
+                          source value]
+  --with-version-minor    Set version 'MINOR' field (second number) [current
+                          source value]
+  --with-version-security Set version 'SECURITY' field (third number) [current
+                          source value]
+  --with-version-patch    Set version 'PATCH' field (fourth number) [not
+                          specified]
   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
   --with-add-source-root  for each and every source directory, look in this
                           additional source root for the same directory; if it
@@ -3818,7 +3852,7 @@
 
 
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -3987,20 +4021,60 @@
 
 
 
+
+
 ###############################################################################
 #
+# Enable or disable the elliptic curve crypto implementation
+#
+
+
+
+
+
+################################################################################
+#
+# Gcov coverage data for hotspot
+#
+
+
+#
+# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+###############################################################################
+#
 # Setup version numbers
 #
 
-
-
-
-
-
-################################################################################
-#
-# Gcov coverage data for hotspot
-#
+# Verify that a given string represents a valid version number, and assign it
+# to a variable.
+
+# Argument 1: the variable to assign to
+# Argument 2: the value given by the user
+
+
 
 
 #
@@ -4359,7 +4433,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1441958217
+DATE_WHEN_GENERATED=1443614957
 
 ###############################################################################
 #
@@ -20089,106 +20163,13 @@
 
   ###############################################################################
   #
-  # Enable or disable the elliptic curve crypto implementation
-  #
-
-
-  ###############################################################################
-  #
   # Compress jars
   #
   COMPRESS_JARS=false
 
 
 
-
-  # Source the version numbers
-  . $AUTOCONF_DIR/version-numbers
-
-  # Get the settings from parameters
-
-# Check whether --with-milestone was given.
-if test "${with_milestone+set}" = set; then :
-  withval=$with_milestone;
-fi
-
-  if test "x$with_milestone" = xyes; then
-    as_fn_error $? "Milestone must have a value" "$LINENO" 5
-  elif test "x$with_milestone" != x; then
-    MILESTONE="$with_milestone"
-  fi
-  if test "x$MILESTONE" = x; then
-    MILESTONE=internal
-  fi
-
-
-# Check whether --with-update-version was given.
-if test "${with_update_version+set}" = set; then :
-  withval=$with_update_version;
-fi
-
-  if test "x$with_update_version" = xyes; then
-    as_fn_error $? "Update version must have a value" "$LINENO" 5
-  elif test "x$with_update_version" != x; then
-    JDK_UPDATE_VERSION="$with_update_version"
-    # On macosx 10.7, it's not possible to set --with-update-version=0X due
-    # to a bug in expr (which reduces it to just X). To work around this, we
-    # always add a 0 to one digit update versions.
-    if test "${#JDK_UPDATE_VERSION}" = "1"; then
-      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
-    fi
-  fi
-
-
-# Check whether --with-user-release-suffix was given.
-if test "${with_user_release_suffix+set}" = set; then :
-  withval=$with_user_release_suffix;
-fi
-
-  if test "x$with_user_release_suffix" = xyes; then
-    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
-  elif test "x$with_user_release_suffix" != x; then
-    USER_RELEASE_SUFFIX="$with_user_release_suffix"
-  fi
-
-
-# Check whether --with-build-number was given.
-if test "${with_build_number+set}" = set; then :
-  withval=$with_build_number;
-fi
-
-  if test "x$with_build_number" = xyes; then
-    as_fn_error $? "Build number must have a value" "$LINENO" 5
-  elif test "x$with_build_number" != x; then
-    JDK_BUILD_NUMBER="$with_build_number"
-  fi
-  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
-  if test "x$JDK_BUILD_NUMBER" = x; then
-    JDK_BUILD_NUMBER=b00
-    if test "x$USER_RELEASE_SUFFIX" = x; then
-      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
-      # Avoid [:alnum:] since it depends on the locale.
-      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
-      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-    fi
-  fi
-
-  # Now set the JDK version, milestone, build number etc.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+  # Setup default copyright year. Mostly overridden when building close to a new year.
 
 # Check whether --with-copyright-year was given.
 if test "${with_copyright_year+set}" = set; then :
@@ -20204,14 +20185,480 @@
   fi
 
 
-  if test "x$JDK_UPDATE_VERSION" != x; then
-    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
-  else
-    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
-  fi
-
-
-  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
+
+  # Warn user that old version arguments are deprecated.
+
+
+# Check whether --with-milestone was given.
+if test "${with_milestone+set}" = set; then :
+  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
+$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
+fi
+
+
+
+
+# Check whether --with-update-version was given.
+if test "${with_update_version+set}" = set; then :
+  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
+$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
+fi
+
+
+
+
+# Check whether --with-user-release-suffix was given.
+if test "${with_user_release_suffix+set}" = set; then :
+  withval=$with_user_release_suffix; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&5
+$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
+fi
+
+
+
+
+# Check whether --with-build-number was given.
+if test "${with_build_number+set}" = set; then :
+  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
+$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
+fi
+
+
+
+  # Source the version numbers file
+  . $AUTOCONF_DIR/version-numbers
+
+  # Some non-version number information is set in that file
+
+
+
+
+
+
+
+
+  # Override version from arguments
+
+  # If --with-version-string is set, process it first. It is possible to
+  # override parts with more specific flags, since these are processed later.
+
+# Check whether --with-version-string was given.
+if test "${with_version_string+set}" = set; then :
+  withval=$with_version_string;
+fi
+
+  if test "x$with_version_string" = xyes; then
+    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
+  elif test "x$with_version_string" != x; then
+    # Additional [] needed to keep m4 from mangling shell constructs.
+    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?(_([a-zA-Z]+))?)?$ ]] ; then
+      VERSION_MAJOR=${BASH_REMATCH[1]}
+      VERSION_MINOR=${BASH_REMATCH[3]}
+      VERSION_SECURITY=${BASH_REMATCH[5]}
+      VERSION_PATCH=${BASH_REMATCH[7]}
+      VERSION_PRE=${BASH_REMATCH[9]}
+      version_plus_separator=${BASH_REMATCH[11]}
+      VERSION_BUILD=${BASH_REMATCH[12]}
+      VERSION_OPT_BASE=${BASH_REMATCH[14]}
+      VERSION_OPT_DEBUGLEVEL=${BASH_REMATCH[16]}
+      # Unspecified numerical fields are interpreted as 0.
+      if test "x$VERSION_MINOR" = x; then
+        VERSION_MINOR=0
+      fi
+      if test "x$VERSION_SECURITY" = x; then
+        VERSION_SECURITY=0
+      fi
+      if test "x$VERSION_PATCH" = x; then
+        VERSION_PATCH=0
+      fi
+      if test "x$version_plus_separator" != x \
+          && test "x$VERSION_BUILD$VERSION_OPT_BASE$VERSION_OPT_DEBUGLEVEL" = x; then
+        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
+      fi
+      # Stop the version part process from setting default values.
+      # We still allow them to explicitely override though.
+      NO_DEFAULT_VERSION_PARTS=true
+    else
+      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
+    fi
+  fi
+
+
+# Check whether --with-version-pre was given.
+if test "${with_version_pre+set}" = set; then :
+  withval=$with_version_pre; with_version_pre_present=true
+else
+  with_version_pre_present=false
+fi
+
+
+  if test "x$with_version_pre_present" = xtrue; then
+    if test "x$with_version_pre" = xyes; then
+      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
+    elif test "x$with_version_pre" = xno; then
+      # Interpret --without-* as empty string instead of the literal "no"
+      VERSION_PRE=
+    else
+      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
+       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
+      if test "x$VERSION_PRE" != "x$with_version_pre"; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
+$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
+      fi
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is to use "internal" as pre
+      VERSION_PRE="internal"
+    fi
+  fi
+
+
+# Check whether --with-version-opt-base was given.
+if test "${with_version_opt_base+set}" = set; then :
+  withval=$with_version_opt_base; with_version_opt_base_present=true
+else
+  with_version_opt_base_present=false
+fi
+
+
+  if test "x$with_version_opt_base_present" = xtrue; then
+    if test "x$with_version_opt_base" = xyes; then
+      as_fn_error $? "--with-version-opt-base must have a value" "$LINENO" 5
+    elif test "x$with_version_opt_base" = xno; then
+      # Interpret --without-* as empty string instead of the literal "no"
+      VERSION_OPT_BASE=
+    else
+      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT_BASE. Outer [ ] to quote m4.
+       VERSION_OPT_BASE=`$ECHO "$with_version_opt_base" | $TR -c -d '[a-z][A-Z][0-9].-'`
+      if test "x$VERSION_OPT_BASE" != "x$with_version_opt_base"; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt-base value has been sanitized from '$with_version_opt_base' to '$VERSION_OPT_BASE'" >&5
+$as_echo "$as_me: WARNING: --with-version-opt-base value has been sanitized from '$with_version_opt_base' to '$VERSION_OPT_BASE'" >&2;}
+      fi
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
+      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
+      # Outer [ ] to quote m4.
+       username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
+       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
+      VERSION_OPT_BASE="$timestamp.$username.$basedirname"
+    fi
+  fi
+
+
+# Check whether --with-version-opt-debuglevel was given.
+if test "${with_version_opt_debuglevel+set}" = set; then :
+  withval=$with_version_opt_debuglevel; with_version_opt_debuglevel_present=true
+else
+  with_version_opt_debuglevel_present=false
+fi
+
+
+  if test "x$with_version_opt_debuglevel_present" = xtrue; then
+    if test "x$with_version_opt_debuglevel" = xyes; then
+      as_fn_error $? "--with-version-opt-debuglevel must have a value" "$LINENO" 5
+    elif test "x$with_version_opt_debuglevel" = xno; then
+      # Interpret --without-* as empty string instead of the literal "no"
+      VERSION_OPT_DEBUGLEVEL=
+    else
+      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT_DEBUGLEVEL. Outer [ ] to quote m4.
+       VERSION_OPT_DEBUGLEVEL=`$ECHO "$with_version_opt_debuglevel" | $TR -c -d '[a-z][A-Z][0-9].-'`
+      if test "x$VERSION_OPT_DEBUGLEVEL" != "x$with_version_opt_debuglevel"; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt-debuglevel value has been sanitized from '$with_version_opt_debuglevel' to '$VERSION_OPT_DEBUGLEVEL'" >&5
+$as_echo "$as_me: WARNING: --with-version-opt-debuglevel value has been sanitized from '$with_version_opt_debuglevel' to '$VERSION_OPT_DEBUGLEVEL'" >&2;}
+      fi
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is to use the debug level name, except for release which is empty.
+      if test "x$DEBUG_LEVEL" != "xrelease"; then
+        VERSION_OPT_DEBUGLEVEL="$DEBUG_LEVEL"
+      else
+        VERSION_OPT_DEBUGLEVEL=""
+      fi
+    fi
+  fi
+
+# Check whether --with-version-build was given.
+if test "${with_version_build+set}" = set; then :
+  withval=$with_version_build; with_version_build_present=true
+else
+  with_version_build_present=false
+fi
+
+
+  if test "x$with_version_build_present" = xtrue; then
+    if test "x$with_version_build" = xyes; then
+      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
+    elif test "x$with_version_build" = xno; then
+      # Interpret --without-* as empty string instead of the literal "no"
+      VERSION_BUILD=
+    elif test "x$with_version_build" = x; then
+      VERSION_BUILD=
+    else
+
+  # Additional [] needed to keep m4 from mangling shell constructs.
+  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
+    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
+  fi
+  # Extract the version number without leading zeros.
+  cleaned_value=${BASH_REMATCH[1]}
+  if test "x$cleaned_value" = x; then
+    # Special case for zero
+    cleaned_value=${BASH_REMATCH[2]}
+  fi
+
+  if test $cleaned_value -gt 255; then
+    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
+  fi
+  if test "x$cleaned_value" != "x$with_version_build"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
+$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
+  fi
+  VERSION_BUILD=$cleaned_value
+
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is to not have a build number.
+      VERSION_BUILD=""
+      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
+      VERSION_BUILD=0
+    fi
+  fi
+
+
+# Check whether --with-version-major was given.
+if test "${with_version_major+set}" = set; then :
+  withval=$with_version_major; with_version_major_present=true
+else
+  with_version_major_present=false
+fi
+
+
+  if test "x$with_version_major_present" = xtrue; then
+    if test "x$with_version_major" = xyes; then
+      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
+    else
+
+  # Additional [] needed to keep m4 from mangling shell constructs.
+  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
+    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
+  fi
+  # Extract the version number without leading zeros.
+  cleaned_value=${BASH_REMATCH[1]}
+  if test "x$cleaned_value" = x; then
+    # Special case for zero
+    cleaned_value=${BASH_REMATCH[2]}
+  fi
+
+  if test $cleaned_value -gt 255; then
+    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
+  fi
+  if test "x$cleaned_value" != "x$with_version_major"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
+$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
+  fi
+  VERSION_MAJOR=$cleaned_value
+
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is to get value from version-numbers
+      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
+    fi
+  fi
+
+
+# Check whether --with-version-minor was given.
+if test "${with_version_minor+set}" = set; then :
+  withval=$with_version_minor; with_version_minor_present=true
+else
+  with_version_minor_present=false
+fi
+
+
+  if test "x$with_version_minor_present" = xtrue; then
+    if test "x$with_version_minor" = xyes; then
+      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
+    elif test "x$with_version_minor" = xno; then
+      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
+      VERSION_MINOR=0
+    elif test "x$with_version_minor" = x; then
+      VERSION_MINOR=0
+    else
+
+  # Additional [] needed to keep m4 from mangling shell constructs.
+  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
+    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
+  fi
+  # Extract the version number without leading zeros.
+  cleaned_value=${BASH_REMATCH[1]}
+  if test "x$cleaned_value" = x; then
+    # Special case for zero
+    cleaned_value=${BASH_REMATCH[2]}
+  fi
+
+  if test $cleaned_value -gt 255; then
+    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
+  fi
+  if test "x$cleaned_value" != "x$with_version_minor"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
+$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
+  fi
+  VERSION_MINOR=$cleaned_value
+
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is 0, if unspecified
+      VERSION_MINOR=0
+    fi
+  fi
+
+
+# Check whether --with-version-security was given.
+if test "${with_version_security+set}" = set; then :
+  withval=$with_version_security; with_version_security_present=true
+else
+  with_version_security_present=false
+fi
+
+
+  if test "x$with_version_security_present" = xtrue; then
+    if test "x$with_version_security" = xyes; then
+      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
+    elif test "x$with_version_security" = xno; then
+      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
+      VERSION_SECURITY=0
+    elif test "x$with_version_security" = x; then
+      VERSION_SECURITY=0
+    else
+
+  # Additional [] needed to keep m4 from mangling shell constructs.
+  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
+    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
+  fi
+  # Extract the version number without leading zeros.
+  cleaned_value=${BASH_REMATCH[1]}
+  if test "x$cleaned_value" = x; then
+    # Special case for zero
+    cleaned_value=${BASH_REMATCH[2]}
+  fi
+
+  if test $cleaned_value -gt 255; then
+    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
+  fi
+  if test "x$cleaned_value" != "x$with_version_security"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
+$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
+  fi
+  VERSION_SECURITY=$cleaned_value
+
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is 0, if unspecified
+      VERSION_SECURITY=0
+    fi
+  fi
+
+
+# Check whether --with-version-patch was given.
+if test "${with_version_patch+set}" = set; then :
+  withval=$with_version_patch; with_version_patch_present=true
+else
+  with_version_patch_present=false
+fi
+
+
+  if test "x$with_version_patch_present" = xtrue; then
+    if test "x$with_version_patch" = xyes; then
+      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
+    elif test "x$with_version_patch" = xno; then
+      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
+      VERSION_PATCH=0
+    elif test "x$with_version_patch" = x; then
+      VERSION_PATCH=0
+    else
+
+  # Additional [] needed to keep m4 from mangling shell constructs.
+  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
+    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
+  fi
+  # Extract the version number without leading zeros.
+  cleaned_value=${BASH_REMATCH[1]}
+  if test "x$cleaned_value" = x; then
+    # Special case for zero
+    cleaned_value=${BASH_REMATCH[2]}
+  fi
+
+  if test $cleaned_value -gt 255; then
+    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
+  fi
+  if test "x$cleaned_value" != "x$with_version_patch"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
+$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
+  fi
+  VERSION_PATCH=$cleaned_value
+
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is 0, if unspecified
+      VERSION_PATCH=0
+    fi
+  fi
+
+  # Calculate derived version properties
+
+  # Set opt to "opt-base" if debug level is empty (i.e. release), or
+  # "opt-base_debug-level" otherwise.
+  VERSION_OPT=$VERSION_OPT_BASE${VERSION_OPT_DEBUGLEVEL:+_$VERSION_OPT_DEBUGLEVEL}
+
+  # Set VERSION_IS_GA based on if VERSION_PRE has a value
+  if test "x$VERSION_PRE" = x; then
+    VERSION_IS_GA=true
+  else
+    VERSION_IS_GA=false
+  fi
+
+  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
+  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
+
+  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
+  # Strip trailing zeroes from stripped_version_number
+  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
+  VERSION_NUMBER=$stripped_version_number
+
+  # The complete version string, with additional build information
+  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
+    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
+  else
+    # If either build or opt is set, we need a + separator
+    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
+  fi
+
+  # The short version string, just VERSION_NUMBER and PRE, if present.
+  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
+$as_echo_n "checking for version string... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
+$as_echo "$VERSION_STRING" >&6; }
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
@@ -20268,7 +20715,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -20597,7 +21044,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -20788,7 +21235,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -20972,7 +21419,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -21155,7 +21602,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -21338,7 +21785,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -21512,7 +21959,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -21831,7 +22278,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -22156,7 +22603,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -22368,7 +22815,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -22545,7 +22992,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -22750,7 +23197,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -22927,7 +23374,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -23132,7 +23579,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -23309,7 +23756,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -23514,7 +23961,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -23691,7 +24138,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -23883,7 +24330,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -24058,7 +24505,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -24251,7 +24698,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -24426,7 +24873,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -24618,7 +25065,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -24793,7 +25240,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -24986,7 +25433,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -25161,7 +25608,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -25335,7 +25782,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -41092,13 +41539,13 @@
     # The \$ are escaped to the shell, and the $(...) variables
     # are evaluated by make.
     RC_FLAGS="$RC_FLAGS \
-        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
+        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
-        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
+        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
-        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
-        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
+        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
+        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
   fi
 
 
@@ -42241,10 +42688,6 @@
     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
   fi
 
-  # Setup release name
-  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
-
-
   # Set some additional per-OS defines.
   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
@@ -52252,18 +52695,18 @@
 
 
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
 
-    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
-      ENABLE_INTREE_EC=yes
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
+    ENABLE_INTREE_EC=yes
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-    else
-      ENABLE_INTREE_EC=no
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    fi
+  else
+    ENABLE_INTREE_EC=no
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  fi
 
 
 
@@ -54366,6 +54809,7 @@
   printf "* JDK variant:    $JDK_VARIANT\n"
   printf "* JVM variants:   $with_jvm_variants\n"
   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
+  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
 
   printf "\n"
   printf "Tools summary:\n"