--- old/common/autoconf/generated-configure.sh 2015-06-10 15:43:38.011125866 +0200 +++ new/common/autoconf/generated-configure.sh 2015-06-10 15:43:37.851125863 +0200 @@ -825,9 +825,17 @@ BOOT_JDK JAVA_CHECK JAVAC_CHECK -COOKED_BUILD_NUMBER -JDK_VERSION -COPYRIGHT_YEAR +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 @@ -835,13 +843,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 RMICONNECTOR_IIOP UNLIMITED_CRYPTO @@ -1063,11 +1065,20 @@ with_cacerts_file enable_unlimited_crypto enable_rmiconnector_iiop +with_copyright_year with_milestone with_update_version with_user_release_suffix with_build_number -with_copyright_year +with_version_string +with_version_pre_base +with_version_pre_debuglevel +with_version_opt +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 @@ -1909,13 +1920,34 @@ --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-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] + --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 + 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-base Set the base part of the version 'PRE' field + (pre-release identifier) ['internal'] + --with-version-pre-debuglevel + Set the debug level part of the version 'PRE' field + (pre-release identifier) [current debug level] + --with-version-opt Set version 'OPT' field (build metadata) + [..] + --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 @@ -3825,7 +3857,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 @@ -3994,16 +4026,17 @@ + + ############################################################################### # -# Setup version numbers +# Enable or disable the elliptic curve crypto implementation # - ################################################################################ # # Gcov coverage data for hotspot @@ -4011,6 +4044,45 @@ # +# 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 +# + +# 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 + + + + +# # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # @@ -4366,7 +4438,7 @@ #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1432629750 +DATE_WHEN_GENERATED=1433857590 ############################################################################### # @@ -20088,12 +20160,6 @@ ############################################################################### # - # Enable or disable the elliptic curve crypto implementation - # - - - ############################################################################### - # # --enable-rmiconnector-iiop # # Check whether --enable-rmiconnector-iiop was given. @@ -20116,117 +20182,491 @@ + # Setup default copyright year. Mostly overridden when building close to a new year. - # Source the version numbers - . $AUTOCONF_DIR/version-numbers +# Check whether --with-copyright-year was given. +if test "${with_copyright_year+set}" = set; then : + withval=$with_copyright_year; +fi + + if test "x$with_copyright_year" = xyes; then + as_fn_error $? "Copyright year must have a value" "$LINENO" 5 + elif test "x$with_copyright_year" != x; then + COPYRIGHT_YEAR="$with_copyright_year" + else + COPYRIGHT_YEAR=`date +'%Y'` + fi + + + + # Warn user that old version arguments are deprecated. - # Get the settings from parameters # Check whether --with-milestone was given. if test "${with_milestone+set}" = set; then : - withval=$with_milestone; + 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 - 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; + 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 - 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; + 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 - 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; + 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_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" + 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]+))?(\.([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then + VERSION_MAJOR=${BASH_REMATCH[1]} + VERSION_MINOR=${BASH_REMATCH[3]} + VERSION_SECURITY=${BASH_REMATCH[5]} + VERSION_PATCH=${BASH_REMATCH[7]} + VERSION_PRE_BASE=${BASH_REMATCH[9]} + VERSION_PRE_DEBUGLEVEL=${BASH_REMATCH[11]} + version_plus_separator=${BASH_REMATCH[13]} + VERSION_BUILD=${BASH_REMATCH[14]} + VERSION_OPT=${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" = 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 - # 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'` + + +# Check whether --with-version-pre-base was given. +if test "${with_version_pre_base+set}" = set; then : + withval=$with_version_pre_base; with_version_pre_base_present=true +else + with_version_pre_base_present=false +fi + + + if test "x$with_version_pre_base_present" = xtrue; then + if test "x$with_version_pre_base" = xyes; then + as_fn_error $? "--with-version-pre-base must have a value" "$LINENO" 5 + elif test "x$with_version_pre_base" = xno; then + # Interpret --without-* as empty string instead of the literal "no" + VERSION_PRE_BASE= + else + # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4. + VERSION_PRE_BASE=`$ECHO "$with_version_pre_base" | $TR -c -d '[a-z][A-Z]'` + if test "x$VERSION_PRE_BASE" != "x$with_version_pre_base"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre-base value has been sanitized from '$with_version_pre_base' to '$VERSION_PRE_BASE'" >&5 +$as_echo "$as_me: WARNING: --with-version-pre-base value has been sanitized from '$with_version_pre_base' to '$VERSION_PRE_BASE'" >&2;} + fi + fi + else + if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then + # Default is to use "internal" as pre + VERSION_PRE_BASE="internal" fi fi - # Now set the JDK version, milestone, build number etc. +# Check whether --with-version-pre-debuglevel was given. +if test "${with_version_pre_debuglevel+set}" = set; then : + withval=$with_version_pre_debuglevel; with_version_pre_debuglevel_present=true +else + with_version_pre_debuglevel_present=false +fi + if test "x$with_version_pre_debuglevel_present" = xtrue; then + if test "x$with_version_pre_debuglevel" = xyes; then + as_fn_error $? "--with-version-pre-debuglevel must have a value" "$LINENO" 5 + elif test "x$with_version_pre_debuglevel" = xno; then + # Interpret --without-* as empty string instead of the literal "no" + VERSION_PRE_DEBUGLEVEL= + else + # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4. + VERSION_PRE_DEBUGLEVEL=`$ECHO "$with_version_pre_debuglevel" | $TR -c -d '[a-z][A-Z]'` + if test "x$VERSION_PRE_DEBUGLEVEL" != "x$with_version_pre_debuglevel"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre-debuglevel value has been sanitized from '$with_version_pre_debuglevel' to '$VERSION_PRE_DEBUGLEVEL'" >&5 +$as_echo "$as_me: WARNING: --with-version-pre-debuglevel value has been sanitized from '$with_version_pre_debuglevel' to '$VERSION_PRE_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_PRE_DEBUGLEVEL="$DEBUG_LEVEL" + else + VERSION_PRE_DEBUGLEVEL="" + fi + fi + fi +# Check whether --with-version-opt was given. +if test "${with_version_opt+set}" = set; then : + withval=$with_version_opt; with_version_opt_present=true +else + with_version_opt_present=false +fi + if test "x$with_version_opt_present" = xtrue; then + if test "x$with_version_opt" = xyes; then + as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5 + elif test "x$with_version_opt" = xno; then + # Interpret --without-* as empty string instead of the literal "no" + VERSION_OPT= + else + # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4. + VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'` + if test "x$VERSION_OPT" != "x$with_version_opt"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5 +$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;} + fi + fi + else + if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then + # Default is to calculate a string like this .. + 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="$timestamp.$username.$basedirname" + 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-copyright-year was given. -if test "${with_copyright_year+set}" = set; then : - withval=$with_copyright_year; +# 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_copyright_year" = xyes; then - as_fn_error $? "Copyright year must have a value" "$LINENO" 5 - elif test "x$with_copyright_year" != x; then - COPYRIGHT_YEAR="$with_copyright_year" + + 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 - COPYRIGHT_YEAR=`date +'%Y'` + 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 - if test "x$JDK_UPDATE_VERSION" != x; then - JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}" + fi else - JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}" + if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then + # Default is 0, if unspecified + VERSION_MINOR=0 + fi fi - COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'` +# 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 pre to "pre-base" if debug level is empty (i.e. release), or + # "pre-base.debug-level" otherwise. + if test "x$VERSION_PRE_BASE" = x && test "x$VERSION_PRE_DEBUGLEVEL" != x; then + as_fn_error $? "Cannot set version-pre-debuglevel when version-pre-base is empty" "$LINENO" 5 + fi + VERSION_PRE=$VERSION_PRE_BASE${VERSION_PRE_DEBUGLEVEL:+.$VERSION_PRE_DEBUGLEVEL} + + # 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; } + + + + + + + + + + + @@ -41065,13 +41505,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_FOUR_POSITIONS)\" \ -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 @@ -42148,10 +42588,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" @@ -52159,18 +52595,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 + else + ENABLE_INTREE_EC=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - fi + fi @@ -54273,6 +54709,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"