2
# Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5
# This code is free software; you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License version 2 only, as
7
# published by the Free Software Foundation. Oracle designates this
8
# particular file as subject to the "Classpath" exception as provided
9
# by Oracle in the LICENSE file that accompanied this code.
11
# This code is distributed in the hope that it will be useful, but WITHOUT
12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14
# version 2 for more details (a copy is included in the LICENSE file that
15
# accompanied this code).
17
# You should have received a copy of the GNU General Public License version
18
# 2 along with this work; if not, write to the Free Software Foundation,
19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22
# or visit www.oracle.com if you need additional information or have any
26
###############################################################################
28
# Setup version numbers
31
# Verify that a given string represents a valid version number, and assign it
34
# Argument 1: the variable to assign to
35
# Argument 2: the value given by the user
36
AC_DEFUN([JDKVER_CHECK_AND_SET_NUMBER],
38
# Additional [] needed to keep m4 from mangling shell constructs.
39
if [ ! [[ "$2" =~ ^0*([1-9][0-9]*)$|^0*(0)$ ]] ] ; then
40
AC_MSG_ERROR(["$2" is not a valid numerical value for $1])
42
# Extract the version number without leading zeros.
43
cleaned_value=${BASH_REMATCH[[1]]}
44
if test "x$cleaned_value" = x; then
45
# Special case for zero
46
cleaned_value=${BASH_REMATCH[[2]]}
49
if test $cleaned_value -gt 255; then
50
AC_MSG_ERROR([$1 is given as $2. This is greater than 255 which is not allowed.])
52
if test "x$cleaned_value" != "x$2"; then
53
AC_MSG_WARN([Value for $1 has been sanitized from '$2' to '$cleaned_value'])
58
AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
60
# Source the version numbers file
61
. $TOPDIR/make/conf/version-numbers.conf
62
# Source the branding file
63
. $TOPDIR/make/conf/branding.conf
65
# Some non-version number information is set in that file
66
AC_SUBST(LAUNCHER_NAME)
67
AC_SUBST(PRODUCT_NAME)
68
AC_SUBST(PRODUCT_SUFFIX)
69
AC_SUBST(JDK_RC_PLATFORM_NAME)
70
AC_SUBST(HOTSPOT_VM_DISTRO)
72
# Note: UTIL_ARG_WITH treats empty strings as valid values when OPTIONAL is false!
74
# Outer [ ] to quote m4.
75
[ USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'` ]
77
# $USER may be not defined in dockers, so try to check with $WHOAMI
78
if test "x$USERNAME" = x && test "x$WHOAMI" != x; then
79
[ USERNAME=`$WHOAMI | $TR -d -c '[a-z][A-Z][0-9]'` ]
82
# Setup username (for use in adhoc version strings etc)
83
UTIL_ARG_WITH(NAME: build-user, TYPE: string,
86
DESC: [build username to use in version strings],
87
DEFAULT_DESC: [current username, sanitized],
88
CHECK_VALUE: [UTIL_CHECK_STRING_NON_EMPTY])
92
# Otherwise calculate from "branding.conf" included above.
93
UTIL_ARG_WITH(NAME: jdk-rc-name, TYPE: string,
94
DEFAULT: $PRODUCT_NAME $JDK_RC_PLATFORM_NAME,
95
DESC: [Set JDK RC name. This is used for FileDescription and ProductName
96
properties of MS Windows binaries.],
97
DEFAULT_DESC: [from branding.conf],
98
CHECK_VALUE: [UTIL_CHECK_STRING_NON_EMPTY_PRINTABLE])
101
# The vendor name, if any
102
# Only set COMPANY_NAME if '--with-vendor-name' was used and is not empty.
103
# Otherwise we will use the value from "branding.conf" included above.
104
UTIL_ARG_WITH(NAME: vendor-name, TYPE: string,
105
RESULT: COMPANY_NAME,
106
DEFAULT: $COMPANY_NAME,
107
DESC: [Set vendor name. Among others, used to set the 'java.vendor'
108
and 'java.vm.vendor' system properties.],
109
DEFAULT_DESC: [from branding.conf],
110
CHECK_VALUE: [UTIL_CHECK_STRING_NON_EMPTY_PRINTABLE])
111
AC_SUBST(COMPANY_NAME)
113
# Set the JDK RC Company name
114
# Otherwise uses the value set for "vendor-name".
115
UTIL_ARG_WITH(NAME: jdk-rc-company-name, TYPE: string,
116
DEFAULT: $COMPANY_NAME,
117
DESC: [Set JDK RC company name. This is used for CompanyName properties of MS Windows binaries.],
118
DEFAULT_DESC: [from branding.conf],
119
CHECK_VALUE: [UTIL_CHECK_STRING_NON_EMPTY_PRINTABLE])
120
AC_SUBST(JDK_RC_COMPANY_NAME)
122
# The vendor URL, if any
123
# Only set VENDOR_URL if '--with-vendor-url' was used and is not empty.
124
# Otherwise we will use the value from "branding.conf" included above.
125
UTIL_ARG_WITH(NAME: vendor-url, TYPE: string,
126
DEFAULT: $VENDOR_URL,
127
DESC: [Set the 'java.vendor.url' system property],
128
DEFAULT_DESC: [from branding.conf],
129
CHECK_VALUE: [UTIL_CHECK_STRING_NON_EMPTY_PRINTABLE])
132
# The vendor bug URL, if any
133
# Only set VENDOR_URL_BUG if '--with-vendor-bug-url' was used and is not empty.
134
# Otherwise we will use the value from "branding.conf" included above.
135
UTIL_ARG_WITH(NAME: vendor-bug-url, TYPE: string,
136
RESULT: VENDOR_URL_BUG,
137
DEFAULT: $VENDOR_URL_BUG,
138
DESC: [Set the 'java.vendor.url.bug' system property],
139
DEFAULT_DESC: [from branding.conf],
140
CHECK_VALUE: [UTIL_CHECK_STRING_NON_EMPTY_PRINTABLE])
141
AC_SUBST(VENDOR_URL_BUG)
143
# The vendor VM bug URL, if any
144
# Only set VENDOR_URL_VM_BUG if '--with-vendor-vm-bug-url' was used and is not empty.
145
# Otherwise we will use the value from "branding.conf" included above.
146
UTIL_ARG_WITH(NAME: vendor-vm-bug-url, TYPE: string,
147
RESULT: VENDOR_URL_VM_BUG,
148
DEFAULT: $VENDOR_URL_VM_BUG,
149
DESC: [Sets the bug URL which will be displayed when the VM crashes],
150
DEFAULT_DESC: [from branding.conf],
151
CHECK_VALUE: [UTIL_CHECK_STRING_NON_EMPTY_PRINTABLE])
152
AC_SUBST(VENDOR_URL_VM_BUG)
154
# Override version from arguments
156
# If --with-version-string is set, process it first. It is possible to
157
# override parts with more specific flags, since these are processed later.
158
UTIL_ARG_WITH(NAME: version-string, TYPE: string,
160
DESC: [Set version string],
161
DEFAULT_DESC: [calculated],
163
if test "x$RESULT" != x; then
164
# Additional [] needed to keep m4 from mangling shell constructs.
165
if [ [[ $RESULT =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z0-9]+))?(((\+)([0-9]*))?(-([-a-zA-Z0-9.]+))?)?$ ]] ]; then
166
VERSION_FEATURE=${BASH_REMATCH[[1]]}
167
VERSION_INTERIM=${BASH_REMATCH[[3]]}
168
VERSION_UPDATE=${BASH_REMATCH[[5]]}
169
VERSION_PATCH=${BASH_REMATCH[[7]]}
170
VERSION_EXTRA1=${BASH_REMATCH[[9]]}
171
VERSION_EXTRA2=${BASH_REMATCH[[11]]}
172
VERSION_EXTRA3=${BASH_REMATCH[[13]]}
173
VERSION_PRE=${BASH_REMATCH[[15]]}
174
version_plus_separator=${BASH_REMATCH[[18]]}
175
VERSION_BUILD=${BASH_REMATCH[[19]]}
176
VERSION_OPT=${BASH_REMATCH[[21]]}
177
# Unspecified numerical fields are interpreted as 0.
178
if test "x$VERSION_INTERIM" = x; then
181
if test "x$VERSION_UPDATE" = x; then
184
if test "x$VERSION_PATCH" = x; then
187
if test "x$VERSION_EXTRA1" = x; then
190
if test "x$VERSION_EXTRA2" = x; then
193
if test "x$VERSION_EXTRA3" = x; then
196
if test "x$version_plus_separator" != x \
197
&& test "x$VERSION_BUILD$VERSION_OPT" = x; then
198
AC_MSG_ERROR([Version string contains + but both 'BUILD' and 'OPT' are missing])
200
if test "x$VERSION_BUILD" = x0; then
201
AC_MSG_WARN([Version build 0 is interpreted as no build number])
204
# Stop the version part process from setting default values.
205
# We still allow them to explicitly override though.
206
NO_DEFAULT_VERSION_PARTS=true
208
FAILURE="--with-version-string fails to parse as a valid version string: $RESULT"
213
AC_ARG_WITH(version-pre, [AS_HELP_STRING([--with-version-pre],
214
[Set the base part of the version 'PRE' field (pre-release identifier) @<:@'internal'@:>@])],
215
[with_version_pre_present=true], [with_version_pre_present=false])
217
if test "x$with_version_pre_present" = xtrue; then
218
if test "x$with_version_pre" = xyes; then
219
AC_MSG_ERROR([--with-version-pre must have a value])
220
elif test "x$with_version_pre" = xno; then
221
# Interpret --without-* as empty string instead of the literal "no"
224
# Only [a-zA-Z0-9] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
225
[ VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-zA-Z0-9]'` ]
226
if test "x$VERSION_PRE" != "x$with_version_pre"; then
227
AC_MSG_WARN([--with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'])
231
if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
232
# Default is to use "internal" as pre
233
VERSION_PRE="internal"
237
AC_ARG_WITH(version-opt, [AS_HELP_STRING([--with-version-opt],
238
[Set version 'OPT' field (build metadata) @<:@<timestamp>.<user>.<dirname>@:>@])],
239
[with_version_opt_present=true], [with_version_opt_present=false])
241
if test "x$with_version_opt_present" = xtrue; then
242
if test "x$with_version_opt" = xyes; then
243
AC_MSG_ERROR([--with-version-opt must have a value])
244
elif test "x$with_version_opt" = xno; then
245
# Interpret --without-* as empty string instead of the literal "no"
248
# Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
249
[ VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'` ]
250
if test "x$VERSION_OPT" != "x$with_version_opt"; then
251
AC_MSG_WARN([--with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'])
255
if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
256
# Default is to calculate a string like this:
257
# 'adhoc.<username>.<base dir name>'
258
# Outer [ ] to quote m4.
259
[ basedirname=`$BASENAME "$WORKSPACE_ROOT" | $TR -d -c '[a-z][A-Z][0-9].-'` ]
260
VERSION_OPT="adhoc.$USERNAME.$basedirname"
264
AC_ARG_WITH(version-build, [AS_HELP_STRING([--with-version-build],
265
[Set version 'BUILD' field (build number) @<:@not specified@:>@])],
266
[with_version_build_present=true], [with_version_build_present=false])
268
if test "x$with_version_build_present" = xtrue; then
269
if test "x$with_version_build" = xyes; then
270
AC_MSG_ERROR([--with-version-build must have a value])
271
elif test "x$with_version_build" = xno; then
272
# Interpret --without-* as empty string instead of the literal "no"
274
elif test "x$with_version_build" = x; then
277
JDKVER_CHECK_AND_SET_NUMBER(VERSION_BUILD, $with_version_build)
278
if test "x$VERSION_BUILD" = "x0"; then
279
AC_MSG_WARN([--with-version-build=0 is interpreted as --without-version-build])
284
if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
285
# Default is to not have a build number.
290
# Default is to get value from version-numbers.conf
291
if test "x$NO_DEFAULT_VERSION_PARTS" = xtrue; then
292
DEFAULT_VERSION_FEATURE="$VERSION_FEATURE"
295
UTIL_ARG_WITH(NAME: version-feature, TYPE: string,
296
DEFAULT: $DEFAULT_VERSION_FEATURE,
297
DESC: [Set version 'FEATURE' field (first number)],
298
DEFAULT_DESC: [current source value],
300
JDKVER_CHECK_AND_SET_NUMBER(VERSION_FEATURE, $RESULT)
303
AC_ARG_WITH(version-interim, [AS_HELP_STRING([--with-version-interim],
304
[Set version 'INTERIM' field (second number) @<:@current source value@:>@])],
305
[with_version_interim_present=true], [with_version_interim_present=false])
307
if test "x$with_version_interim_present" = xtrue; then
308
if test "x$with_version_interim" = xyes; then
309
AC_MSG_ERROR([--with-version-interim must have a value])
310
elif test "x$with_version_interim" = xno; then
311
# Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
313
elif test "x$with_version_interim" = x; then
316
JDKVER_CHECK_AND_SET_NUMBER(VERSION_INTERIM, $with_version_interim)
319
if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
320
# Default is 0, if unspecified
321
VERSION_INTERIM=$DEFAULT_VERSION_INTERIM
325
AC_ARG_WITH(version-update, [AS_HELP_STRING([--with-version-update],
326
[Set version 'UPDATE' field (third number) @<:@current source value@:>@])],
327
[with_version_update_present=true], [with_version_update_present=false])
329
if test "x$with_version_update_present" = xtrue; then
330
if test "x$with_version_update" = xyes; then
331
AC_MSG_ERROR([--with-version-update must have a value])
332
elif test "x$with_version_update" = xno; then
333
# Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
335
elif test "x$with_version_update" = x; then
338
JDKVER_CHECK_AND_SET_NUMBER(VERSION_UPDATE, $with_version_update)
341
if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
342
# Default is 0, if unspecified
343
VERSION_UPDATE=$DEFAULT_VERSION_UPDATE
347
AC_ARG_WITH(version-patch, [AS_HELP_STRING([--with-version-patch],
348
[Set version 'PATCH' field (fourth number) @<:@not specified@:>@])],
349
[with_version_patch_present=true], [with_version_patch_present=false])
351
if test "x$with_version_patch_present" = xtrue; then
352
if test "x$with_version_patch" = xyes; then
353
AC_MSG_ERROR([--with-version-patch must have a value])
354
elif test "x$with_version_patch" = xno; then
355
# Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
357
elif test "x$with_version_patch" = x; then
360
JDKVER_CHECK_AND_SET_NUMBER(VERSION_PATCH, $with_version_patch)
363
if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
364
# Default is 0, if unspecified
365
VERSION_PATCH=$DEFAULT_VERSION_PATCH
369
# The 1st version extra number, if any
370
AC_ARG_WITH(version-extra1, [AS_HELP_STRING([--with-version-extra1],
371
[Set 1st version extra number @<:@not specified@:>@])],
372
[with_version_extra1_present=true], [with_version_extra1_present=false])
374
if test "x$with_version_extra1_present" = xtrue; then
375
if test "x$with_version_extra1" = xyes; then
376
AC_MSG_ERROR([--with-version-extra1 must have a value])
377
elif test "x$with_version_extra1" = xno; then
378
# Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
380
elif test "x$with_version_extra1" = x; then
383
JDKVER_CHECK_AND_SET_NUMBER(VERSION_EXTRA1, $with_version_extra1)
386
if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
387
VERSION_EXTRA1=$DEFAULT_VERSION_EXTRA1
391
# The 2nd version extra number, if any
392
AC_ARG_WITH(version-extra2, [AS_HELP_STRING([--with-version-extra2],
393
[Set 2nd version extra number @<:@not specified@:>@])],
394
[with_version_extra2_present=true], [with_version_extra2_present=false])
396
if test "x$with_version_extra2_present" = xtrue; then
397
if test "x$with_version_extra2" = xyes; then
398
AC_MSG_ERROR([--with-version-extra2 must have a value])
399
elif test "x$with_version_extra2" = xno; then
400
# Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
402
elif test "x$with_version_extra2" = x; then
405
JDKVER_CHECK_AND_SET_NUMBER(VERSION_EXTRA2, $with_version_extra2)
408
if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
409
VERSION_EXTRA2=$DEFAULT_VERSION_EXTRA2
413
# The 3rd version extra number, if any
414
AC_ARG_WITH(version-extra3, [AS_HELP_STRING([--with-version-extra3],
415
[Set 3rd version extra number @<:@not specified@:>@])],
416
[with_version_extra3_present=true], [with_version_extra3_present=false])
418
if test "x$with_version_extra3_present" = xtrue; then
419
if test "x$with_version_extra3" = xyes; then
420
AC_MSG_ERROR([--with-version-extra3 must have a value])
421
elif test "x$with_version_extra3" = xno; then
422
# Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
424
elif test "x$with_version_extra3" = x; then
427
JDKVER_CHECK_AND_SET_NUMBER(VERSION_EXTRA3, $with_version_extra3)
430
if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
431
VERSION_EXTRA3=$DEFAULT_VERSION_EXTRA3
435
# Calculate derived version properties
437
# Set VERSION_IS_GA based on if VERSION_PRE has a value
438
if test "x$VERSION_PRE" = x; then
444
# VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
445
VERSION_NUMBER_FOUR_POSITIONS=$VERSION_FEATURE.$VERSION_INTERIM.$VERSION_UPDATE.$VERSION_PATCH
447
# VERSION_NUMBER but always with all positions, with 0 for empty positions.
448
VERSION_NUMBER_ALL_POSITIONS=$VERSION_NUMBER_FOUR_POSITIONS.$VERSION_EXTRA1.$VERSION_EXTRA2.$VERSION_EXTRA3
450
stripped_version_number=$VERSION_NUMBER_ALL_POSITIONS
451
# Strip trailing zeroes from stripped_version_number
452
for i in 1 2 3 4 5 6 ; do stripped_version_number=${stripped_version_number%.0} ; done
453
VERSION_NUMBER=$stripped_version_number
455
# A build number of "0" is interpreted as "no build number".
456
if test "x$VERSION_BUILD" = x0; then
460
# Compute the complete version string, with additional build information
461
version_with_pre=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
462
if test "x$VERSION_BUILD" != x || \
463
( test "x$VERSION_OPT" != x && test "x$VERSION_PRE" = x ); then
464
# As per JEP 223, if build is set, or if opt is set but not pre,
465
# we need a + separator
466
version_with_build=$version_with_pre+$VERSION_BUILD
468
version_with_build=$version_with_pre
470
VERSION_STRING=$version_with_build${VERSION_OPT:+-$VERSION_OPT}
472
# The short version string, just VERSION_NUMBER and PRE, if present.
473
VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
476
UTIL_ARG_WITH(NAME: version-date, TYPE: string,
477
DEFAULT: $DEFAULT_VERSION_DATE,
478
DESC: [Set version date],
479
DEFAULT_DESC: [current source value],
481
if test "x$RESULT" = x; then
482
FAILURE="--with-version-date cannot be empty"
483
elif [ ! [[ $RESULT =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]] ]; then
484
FAILURE="\"$RESULT\" is not a valid version date"
488
# The vendor version string, if any
489
# DEFAULT is set to an empty string in the case of --with-vendor-version-string without
490
# any value, which would set VENDOR_VERSION_STRING_ENABLED to true and ultimately also
491
# cause VENDOR_VERSION_STRING to fall back to the value in DEFAULT
492
UTIL_ARG_WITH(NAME: vendor-version-string, TYPE: string,
495
DESC: [Set vendor version string],
496
DEFAULT_DESC: [not specified])
498
if test "x$VENDOR_VERSION_STRING_ENABLED" = xtrue; then
499
if [ ! [[ $VENDOR_VERSION_STRING =~ ^[[:graph:]]*$ ]] ]; then
500
AC_MSG_ERROR([--with--vendor-version-string contains non-graphical characters: $VENDOR_VERSION_STRING])
504
# Set the MACOSX Bundle Name base
505
UTIL_ARG_WITH(NAME: macosx-bundle-name-base, TYPE: string,
506
DEFAULT: $MACOSX_BUNDLE_NAME_BASE,
507
DESC: [Set the MacOSX Bundle Name base. This is the base name for calculating MacOSX Bundle Names.],
508
DEFAULT_DESC: [from branding.conf],
509
CHECK_VALUE: [UTIL_CHECK_STRING_NON_EMPTY_PRINTABLE])
510
AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
512
# If using the default value, append the VERSION_PRE if there is one
513
# to make it possible to tell official builds apart from developer builds
514
if test "x$VERSION_PRE" != x; then
515
MACOSX_BUNDLE_ID_BASE="$MACOSX_BUNDLE_ID_BASE-$VERSION_PRE"
518
# Set the MACOSX Bundle ID base
519
UTIL_ARG_WITH(NAME: macosx-bundle-id-base, TYPE: string,
520
DEFAULT: $MACOSX_BUNDLE_ID_BASE,
521
DESC: [Set the MacOSX Bundle ID base. This is the base ID for calculating MacOSX Bundle IDs.],
522
DEFAULT_DESC: [based on branding.conf and VERSION_PRE],
523
CHECK_VALUE: [UTIL_CHECK_STRING_NON_EMPTY_PRINTABLE])
524
AC_SUBST(MACOSX_BUNDLE_ID_BASE)
526
if test "x$VERSION_BUILD" != x; then
527
MACOSX_BUNDLE_BUILD_VERSION="$VERSION_BUILD"
529
MACOSX_BUNDLE_BUILD_VERSION=0
532
# If VERSION_OPT consists of only numbers and periods, add it.
533
if [ [[ $VERSION_OPT =~ ^[0-9\.]+$ ]] ]; then
534
MACOSX_BUNDLE_BUILD_VERSION="$MACOSX_BUNDLE_BUILD_VERSION.$VERSION_OPT"
537
# Set the MACOSX CFBundleVersion field
538
UTIL_ARG_WITH(NAME: macosx-bundle-build-version, TYPE: string,
539
DEFAULT: $MACOSX_BUNDLE_BUILD_VERSION,
540
DESC: [Set the MacOSX Bundle CFBundleVersion field. This key is a machine-readable
541
string composed of one to three period-separated integers and should represent the
543
DEFAULT_DESC: [the build number],
545
if test "x$RESULT" = x; then
546
FAILURE="--with-macosx-bundle-build-version must have a value"
547
elif [ ! [[ $RESULT =~ ^[0-9\.]*$ ]] ]; then
548
FAILURE="--with-macosx-bundle-build-version contains non numbers and periods: $RESULT"
551
AC_SUBST(MACOSX_BUNDLE_BUILD_VERSION)
553
# We could define --with flags for these, if really needed
554
VERSION_CLASSFILE_MAJOR="$DEFAULT_VERSION_CLASSFILE_MAJOR"
555
VERSION_CLASSFILE_MINOR="$DEFAULT_VERSION_CLASSFILE_MINOR"
556
VERSION_DOCS_API_SINCE="$DEFAULT_VERSION_DOCS_API_SINCE"
557
JDK_SOURCE_TARGET_VERSION="$DEFAULT_JDK_SOURCE_TARGET_VERSION"
559
AC_MSG_CHECKING([for version string])
560
AC_MSG_RESULT([$VERSION_STRING])
562
AC_SUBST(VERSION_FEATURE)
563
AC_SUBST(VERSION_INTERIM)
564
AC_SUBST(VERSION_UPDATE)
565
AC_SUBST(VERSION_PATCH)
566
AC_SUBST(VERSION_EXTRA1)
567
AC_SUBST(VERSION_EXTRA2)
568
AC_SUBST(VERSION_EXTRA3)
569
AC_SUBST(VERSION_PRE)
570
AC_SUBST(VERSION_BUILD)
571
AC_SUBST(VERSION_OPT)
572
AC_SUBST(VERSION_NUMBER)
573
AC_SUBST(VERSION_NUMBER_FOUR_POSITIONS)
574
AC_SUBST(VERSION_STRING)
575
AC_SUBST(VERSION_SHORT)
576
AC_SUBST(VERSION_IS_GA)
577
AC_SUBST(VERSION_DATE)
578
AC_SUBST(VENDOR_VERSION_STRING)
579
AC_SUBST(VERSION_CLASSFILE_MAJOR)
580
AC_SUBST(VERSION_CLASSFILE_MINOR)
581
AC_SUBST(VERSION_DOCS_API_SINCE)
582
AC_SUBST(JDK_SOURCE_TARGET_VERSION)