jdk-options.m4 revision 573:6f8f7a5449f6
1273562Smarcel# 2287111Smarcel# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 3273562Smarcel# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4273562Smarcel# 5273562Smarcel# This code is free software; you can redistribute it and/or modify it 6273562Smarcel# under the terms of the GNU General Public License version 2 only, as 7273562Smarcel# published by the Free Software Foundation. Oracle designates this 8273562Smarcel# particular file as subject to the "Classpath" exception as provided 9273562Smarcel# by Oracle in the LICENSE file that accompanied this code. 10273562Smarcel# 11273562Smarcel# This code is distributed in the hope that it will be useful, but WITHOUT 12282100Smarcel# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13273562Smarcel# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14273562Smarcel# version 2 for more details (a copy is included in the LICENSE file that 15287111Smarcel# accompanied this code). 16287111Smarcel# 17287111Smarcel# You should have received a copy of the GNU General Public License version 18273562Smarcel# 2 along with this work; if not, write to the Free Software Foundation, 19273562Smarcel# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20273562Smarcel# 21273562Smarcel# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22273562Smarcel# or visit www.oracle.com if you need additional information or have any 23287111Smarcel# questions. 24282100Smarcel# 25287111Smarcel 26287111SmarcelAC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VARIANT], 27287111Smarcel[ 28282100Smarcel############################################################################### 29282100Smarcel# 30282100Smarcel# Check which variant of the JDK that we want to build. 31282100Smarcel# Currently we have: 32282100Smarcel# normal: standard edition 33282100Smarcel# but the custom make system may add other variants 34282100Smarcel# 35282100Smarcel# Effectively the JDK variant gives a name to a specific set of 36282100Smarcel# modules to compile into the JDK. In the future, these modules 37282100Smarcel# might even be Jigsaw modules. 38282100Smarcel# 39282100SmarcelAC_MSG_CHECKING([which variant of the JDK to build]) 40282100SmarcelAC_ARG_WITH([jdk-variant], [AS_HELP_STRING([--with-jdk-variant], 41282100Smarcel [JDK variant to build (normal) @<:@normal@:>@])]) 42282100Smarcel 43282100Smarcelif test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then 44282100Smarcel JDK_VARIANT="normal" 45282100Smarcelelse 46282100Smarcel AC_MSG_ERROR([The available JDK variants are: normal]) 47282100Smarcelfi 48273562Smarcel 49287111SmarcelAC_SUBST(JDK_VARIANT) 50273562Smarcel 51273562SmarcelAC_MSG_RESULT([$JDK_VARIANT]) 52273562Smarcel]) 53273562Smarcel 54287111SmarcelAC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS], 55287111Smarcel[ 56273562Smarcel 57273562Smarcel############################################################################### 58277353Smarcel# 59277353Smarcel# Check which variants of the JVM that we want to build. 60277353Smarcel# Currently we have: 61277353Smarcel# server: normal interpreter and a tiered C1/C2 compiler 62287111Smarcel# client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms) 63287111Smarcel# minimal1: reduced form of client with optional VM services and features stripped out 64273562Smarcel# kernel: kernel footprint JVM that passes the TCK without major performance problems, 65277353Smarcel# ie normal interpreter and C1, only the serial GC, kernel jvmti etc 66277353Smarcel# zero: no machine code interpreter, no compiler 67277353Smarcel# zeroshark: zero interpreter and shark/llvm compiler backend 68277353SmarcelAC_MSG_CHECKING([which variants of the JVM to build]) 69273562SmarcelAC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants], 70277353Smarcel [JVM variants (separated by commas) to build (server, client, minimal1, kernel, zero, zeroshark) @<:@server@:>@])]) 71277353Smarcel 72277353Smarcelif test "x$with_jvm_variants" = x; then 73277353Smarcel with_jvm_variants="server" 74273562Smarcelfi 75277353Smarcel 76277353SmarcelJVM_VARIANTS=",$with_jvm_variants," 77277353SmarcelTEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'` 78287111Smarcel 79273562Smarcelif test "x$TEST_VARIANTS" != "x,"; then 80277353Smarcel AC_MSG_ERROR([The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark]) 81287111Smarcelfi 82277353SmarcelAC_MSG_RESULT([$with_jvm_variants]) 83287111Smarcel 84273562SmarcelJVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'` 85277353SmarcelJVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'` 86277353SmarcelJVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'` 87277353SmarcelJVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'` 88277353SmarcelJVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'` 89273562SmarcelJVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'` 90277353Smarcel 91282100Smarcelif test "x$JVM_VARIANT_CLIENT" = xtrue; then 92282100Smarcel if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 93287111Smarcel AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.]) 94277353Smarcel fi 95287111Smarcelfi 96287111Smarcelif test "x$JVM_VARIANT_KERNEL" = xtrue; then 97298083Sphil if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 98298083Sphil AC_MSG_ERROR([You cannot build a kernel JVM for a 64-bit machine.]) 99287111Smarcel fi 100298083Sphilfi 101298083Sphilif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then 102298083Sphil if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 103273562Smarcel AC_MSG_ERROR([You cannot build a minimal JVM for a 64-bit machine.]) 104273562Smarcel fi 105273562Smarcelfi 106273562Smarcel 107273562Smarcel# Replace the commas with AND for use in the build directory name. 108273562SmarcelANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'` 109273562SmarcelCOUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'` 110273562Smarcelif test "x$COUNT_VARIANTS" != "x,1"; then 111273562Smarcel BUILDING_MULTIPLE_JVM_VARIANTS=yes 112273562Smarcelelse 113287111Smarcel BUILDING_MULTIPLE_JVM_VARIANTS=no 114287111Smarcelfi 115273562Smarcel 116273562SmarcelAC_SUBST(JVM_VARIANTS) 117273562SmarcelAC_SUBST(JVM_VARIANT_SERVER) 118273562SmarcelAC_SUBST(JVM_VARIANT_CLIENT) 119273562SmarcelAC_SUBST(JVM_VARIANT_MINIMAL1) 120277353SmarcelAC_SUBST(JVM_VARIANT_KERNEL) 121273562SmarcelAC_SUBST(JVM_VARIANT_ZERO) 122273562SmarcelAC_SUBST(JVM_VARIANT_ZEROSHARK) 123273562Smarcel 124273562Smarcelif test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 125273562Smarcel MACOSX_UNIVERSAL="true" 126273562Smarcelfi 127273562Smarcel 128273562SmarcelAC_SUBST(MACOSX_UNIVERSAL) 129273562Smarcel 130273562Smarcel]) 131273562Smarcel 132273562SmarcelAC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_LEVEL], 133273562Smarcel[ 134273562Smarcel############################################################################### 135273562Smarcel# 136273562Smarcel# Set the debug level 137273562Smarcel# release: no debug information, all optimizations, no asserts. 138273562Smarcel# fastdebug: debug information (-g), all optimizations, all asserts 139273562Smarcel# slowdebug: debug information (-g), no optimizations, all asserts 140273562Smarcel# 141273562SmarcelDEBUG_LEVEL="release" 142273562SmarcelAC_MSG_CHECKING([which debug level to use]) 143273562SmarcelAC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], 144277353Smarcel [set the debug level to fastdebug (shorthand for --with-debug-level=fastdebug) @<:@disabled@:>@])], 145273562Smarcel [ 146273562Smarcel ENABLE_DEBUG="${enableval}" 147273562Smarcel DEBUG_LEVEL="fastdebug" 148273562Smarcel ], [ENABLE_DEBUG="no"]) 149273562Smarcel 150273562SmarcelAC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level], 151273562Smarcel [set the debug level (release, fastdebug, slowdebug) @<:@release@:>@])], 152273562Smarcel [ 153273562Smarcel DEBUG_LEVEL="${withval}" 154273562Smarcel if test "x$ENABLE_DEBUG" = xyes; then 155273562Smarcel AC_MSG_ERROR([You cannot use both --enable-debug and --with-debug-level at the same time.]) 156273562Smarcel fi 157273562Smarcel ]) 158273562SmarcelAC_MSG_RESULT([$DEBUG_LEVEL]) 159273562Smarcel 160273562Smarcelif test "x$DEBUG_LEVEL" != xrelease && \ 161273562Smarcel test "x$DEBUG_LEVEL" != xfastdebug && \ 162273562Smarcel test "x$DEBUG_LEVEL" != xslowdebug; then 163273562Smarcel AC_MSG_ERROR([Allowed debug levels are: release, fastdebug and slowdebug]) 164273562Smarcelfi 165273562Smarcel 166273562Smarcel 167273562Smarcel############################################################################### 168273562Smarcel# 169273562Smarcel# Setup legacy vars/targets and new vars to deal with different debug levels. 170298083Sphil# 171298083Sphil 172298083Sphilcase $DEBUG_LEVEL in 173298083Sphil release ) 174298083Sphil VARIANT="OPT" 175298083Sphil FASTDEBUG="false" 176273562Smarcel DEBUG_CLASSFILES="false" 177273562Smarcel BUILD_VARIANT_RELEASE="" 178273562Smarcel HOTSPOT_DEBUG_LEVEL="product" 179273562Smarcel HOTSPOT_EXPORT="product" 180273562Smarcel ;; 181273562Smarcel fastdebug ) 182273562Smarcel VARIANT="DBG" 183273562Smarcel FASTDEBUG="true" 184273562Smarcel DEBUG_CLASSFILES="true" 185273562Smarcel BUILD_VARIANT_RELEASE="-fastdebug" 186273562Smarcel HOTSPOT_DEBUG_LEVEL="fastdebug" 187273562Smarcel HOTSPOT_EXPORT="fastdebug" 188273562Smarcel ;; 189273562Smarcel slowdebug ) 190273562Smarcel VARIANT="DBG" 191273562Smarcel FASTDEBUG="false" 192273562Smarcel DEBUG_CLASSFILES="true" 193273562Smarcel BUILD_VARIANT_RELEASE="-debug" 194298083Sphil HOTSPOT_DEBUG_LEVEL="jvmg" 195298083Sphil HOTSPOT_EXPORT="debug" 196298083Sphil ;; 197298083Sphilesac 198298083Sphil 199298083Sphil##### 200298083Sphil# Generate the legacy makefile targets for hotspot. 201298083Sphil# The hotspot api for selecting the build artifacts, really, needs to be improved. 202298083Sphil# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to 203298083Sphil# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc 204287111Smarcel# But until then ... 205287111SmarcelHOTSPOT_TARGET="" 206287111Smarcel 207287111Smarcelif test "x$JVM_VARIANT_SERVER" = xtrue; then 208287111Smarcel HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} " 209287111Smarcelfi 210287111Smarcel 211287111Smarcelif test "x$JVM_VARIANT_CLIENT" = xtrue; then 212287111Smarcel HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 " 213287111Smarcelfi 214287111Smarcel 215287111Smarcelif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then 216287111Smarcel HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 " 217287111Smarcelfi 218287111Smarcel 219287111Smarcelif test "x$JVM_VARIANT_KERNEL" = xtrue; then 220287111Smarcel HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel " 221287111Smarcelfi 222287111Smarcel 223287111Smarcelif test "x$JVM_VARIANT_ZERO" = xtrue; then 224287111Smarcel HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero " 225287111Smarcelfi 226287111Smarcel 227287111Smarcelif test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 228287111Smarcel HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark " 229287111Smarcelfi 230287111Smarcel 231287111SmarcelHOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT" 232287111Smarcel 233298083Sphil# On Macosx universal binaries are produced, but they only contain 234298083Sphil# 64 bit intel. This invalidates control of which jvms are built 235298083Sphil# from configure, but only server is valid anyway. Fix this 236298083Sphil# when hotspot makefiles are rewritten. 237298083Sphilif test "x$MACOSX_UNIVERSAL" = xtrue; then 238298083Sphil HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT} 239298083Sphilfi 240298083Sphil 241298083Sphil##### 242298083Sphil 243298083SphilAC_SUBST(DEBUG_LEVEL) 244298083SphilAC_SUBST(VARIANT) 245298083SphilAC_SUBST(FASTDEBUG) 246298083SphilAC_SUBST(DEBUG_CLASSFILES) 247298083SphilAC_SUBST(BUILD_VARIANT_RELEASE) 248298083Sphil]) 249298083Sphil 250298083Sphil 251298083Sphil############################################################################### 252298083Sphil# 253298083Sphil# Should we build only OpenJDK even if closed sources are present? 254298083Sphil# 255298083SphilAC_DEFUN_ONCE([JDKOPT_SETUP_OPEN_OR_CUSTOM], 256298083Sphil[ 257298083Sphil AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only], 258298083Sphil [suppress building custom source even if present @<:@disabled@:>@])],,[enable_openjdk_only="no"]) 259298083Sphil 260298083Sphil AC_MSG_CHECKING([for presence of closed sources]) 261298083Sphil if test -d "$SRC_ROOT/jdk/src/closed"; then 262298083Sphil CLOSED_SOURCE_PRESENT=yes 263273562Smarcel else 264273562Smarcel CLOSED_SOURCE_PRESENT=no 265273562Smarcel fi 266273562Smarcel AC_MSG_RESULT([$CLOSED_SOURCE_PRESENT]) 267273562Smarcel 268273562Smarcel AC_MSG_CHECKING([if closed source is suppressed (openjdk-only)]) 269273562Smarcel SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only" 270273562Smarcel AC_MSG_RESULT([$SUPPRESS_CLOSED_SOURCE]) 271273562Smarcel 272273562Smarcel if test "x$CLOSED_SOURCE_PRESENT" = xno; then 273273562Smarcel OPENJDK=true 274273562Smarcel if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then 275273562Smarcel AC_MSG_WARN([No closed source present, --enable-openjdk-only makes no sense]) 276273562Smarcel fi 277273562Smarcel else 278273562Smarcel if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then 279273562Smarcel OPENJDK=true 280273562Smarcel else 281273562Smarcel OPENJDK=false 282273562Smarcel fi 283273562Smarcel fi 284273562Smarcel 285273562Smarcel if test "x$OPENJDK" = "xtrue"; then 286273562Smarcel SET_OPENJDK="OPENJDK=true" 287273562Smarcel fi 288273562Smarcel 289273562Smarcel AC_SUBST(SET_OPENJDK) 290273562Smarcel]) 291273562Smarcel 292273562SmarcelAC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS], 293273562Smarcel[ 294273562Smarcel 295273562Smarcel############################################################################### 296273562Smarcel# 297273562Smarcel# Should we build a JDK/JVM with headful support (ie a graphical ui)? 298273562Smarcel# We always build headless support. 299273562Smarcel# 300273562SmarcelAC_MSG_CHECKING([headful support]) 301273562SmarcelAC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful], 302273562Smarcel [disable building headful support (graphical UI support) @<:@enabled@:>@])], 303273562Smarcel [SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes]) 304273562Smarcel 305273562SmarcelSUPPORT_HEADLESS=yes 306273562SmarcelBUILD_HEADLESS="BUILD_HEADLESS:=true" 307273562Smarcel 308273562Smarcelif test "x$SUPPORT_HEADFUL" = xyes; then 309273562Smarcel # We are building both headful and headless. 310273562Smarcel headful_msg="inlude support for both headful and headless" 311273562Smarcelfi 312273562Smarcel 313273562Smarcelif test "x$SUPPORT_HEADFUL" = xno; then 314273562Smarcel # Thus we are building headless only. 315273562Smarcel BUILD_HEADLESS="BUILD_HEADLESS:=true" 316273562Smarcel headful_msg="headless only" 317273562Smarcelfi 318273562Smarcel 319273562SmarcelAC_MSG_RESULT([$headful_msg]) 320273562Smarcel 321273562SmarcelAC_SUBST(SUPPORT_HEADLESS) 322273562SmarcelAC_SUBST(SUPPORT_HEADFUL) 323273562SmarcelAC_SUBST(BUILD_HEADLESS) 324273562Smarcel 325273562Smarcel# Control wether Hotspot runs Queens test after build. 326273562SmarcelAC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build], 327273562Smarcel [run the Queens test after Hotspot build @<:@disabled@:>@])],, 328273562Smarcel [enable_hotspot_test_in_build=no]) 329273562Smarcelif test "x$enable_hotspot_test_in_build" = "xyes"; then 330273562Smarcel TEST_IN_BUILD=true 331273562Smarcelelse 332273562Smarcel TEST_IN_BUILD=false 333273562Smarcelfi 334273562SmarcelAC_SUBST(TEST_IN_BUILD) 335273562Smarcel 336277353Smarcel############################################################################### 337277353Smarcel# 338277353Smarcel# Choose cacerts source file 339277353Smarcel# 340277353SmarcelAC_ARG_WITH(cacerts-file, [AS_HELP_STRING([--with-cacerts-file], 341277353Smarcel [specify alternative cacerts file])]) 342277353Smarcelif test "x$with_cacerts_file" != x; then 343277353Smarcel CACERTS_FILE=$with_cacerts_file 344277353Smarcelelse 345277353Smarcel if test "x$OPENJDK" = "xtrue"; then 346277353Smarcel CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts 347277353Smarcel else 348273562Smarcel CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal 349273562Smarcel fi 350273562Smarcelfi 351273562SmarcelAC_SUBST(CACERTS_FILE) 352273562Smarcel 353273562Smarcel############################################################################### 354273562Smarcel# 355273562Smarcel# Enable or disable unlimited crypto 356273562Smarcel# 357273562SmarcelAC_ARG_ENABLE(unlimited-crypto, [AS_HELP_STRING([--enable-unlimited-crypto], 358273562Smarcel [Enable unlimited crypto policy @<:@disabled@:>@])],, 359273562Smarcel [enable_unlimited_crypto=no]) 360273562Smarcelif test "x$enable_unlimited_crypto" = "xyes"; then 361273562Smarcel UNLIMITED_CRYPTO=true 362273562Smarcelelse 363273562Smarcel UNLIMITED_CRYPTO=false 364273562Smarcelfi 365277353SmarcelAC_SUBST(UNLIMITED_CRYPTO) 366273562Smarcel 367273562Smarcel############################################################################### 368277353Smarcel# 369273562Smarcel# Compress jars 370273562Smarcel# 371277353SmarcelCOMPRESS_JARS=false 372273562Smarcel 373273562SmarcelAC_SUBST(COMPRESS_JARS) 374277353Smarcel]) 375273562Smarcel 376273562Smarcel############################################################################### 377273562Smarcel# 378287111Smarcel# Setup version numbers 379287111Smarcel# 380287111SmarcelAC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS], 381273562Smarcel[ 382273562Smarcel# Source the version numbers 383273562Smarcel. $AUTOCONF_DIR/version-numbers 384282100Smarcel 385273562Smarcel# Get the settings from parameters 386273562SmarcelAC_ARG_WITH(milestone, [AS_HELP_STRING([--with-milestone], 387282100Smarcel [Set milestone value for build @<:@internal@:>@])]) 388273562Smarcelif test "x$with_milestone" = xyes; then 389273562Smarcel AC_MSG_ERROR([Milestone must have a value]) 390282100Smarcelelif test "x$with_milestone" != x; then 391273562Smarcel MILESTONE="$with_milestone" 392273562Smarcelelse 393282100Smarcel MILESTONE=internal 394273562Smarcelfi 395273562Smarcel 396282100SmarcelAC_ARG_WITH(build-number, [AS_HELP_STRING([--with-build-number], 397273562Smarcel [Set build number value for build @<:@b00@:>@])]) 398273562Smarcelif test "x$with_build_number" = xyes; then 399282100Smarcel AC_MSG_ERROR([Build number must have a value]) 400273562Smarcelelif test "x$with_build_number" != x; then 401273562Smarcel JDK_BUILD_NUMBER="$with_build_number" 402282100Smarcelfi 403273562Smarcelif test "x$JDK_BUILD_NUMBER" = x; then 404273562Smarcel JDK_BUILD_NUMBER=b00 405287111Smarcelfi 406273562Smarcel 407273562SmarcelAC_ARG_WITH(user-release-suffix, [AS_HELP_STRING([--with-user-release-suffix], 408282100Smarcel [Add a custom string to the version string if build number isn't set.@<:@username_builddateb00@:>@])]) 409273562Smarcelif test "x$with_user_release_suffix" = xyes; then 410273562Smarcel AC_MSG_ERROR([Release suffix must have a value]) 411282100Smarcelelif test "x$with_user_release_suffix" != x; then 412273562Smarcel USER_RELEASE_SUFFIX="$with_user_release_suffix" 413273562Smarcelelse 414287111Smarcel BUILD_DATE=`date '+%Y_%m_%d_%H_%M'` 415287111Smarcel # Avoid [:alnum:] since it depends on the locale. 416287111Smarcel CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'` 417282100Smarcel USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 418273562Smarcelfi 419273562SmarcelAC_SUBST(USER_RELEASE_SUFFIX) 420287111Smarcel 421287111Smarcel# Now set the JDK version, milestone, build number etc. 422287111SmarcelAC_SUBST(JDK_MAJOR_VERSION) 423287111SmarcelAC_SUBST(JDK_MINOR_VERSION) 424287111SmarcelAC_SUBST(JDK_MICRO_VERSION) 425287111SmarcelAC_SUBST(JDK_UPDATE_VERSION) 426287111SmarcelAC_SUBST(JDK_BUILD_NUMBER) 427287111SmarcelAC_SUBST(MILESTONE) 428287111SmarcelAC_SUBST(LAUNCHER_NAME) 429287111SmarcelAC_SUBST(PRODUCT_NAME) 430287111SmarcelAC_SUBST(PRODUCT_SUFFIX) 431287111SmarcelAC_SUBST(JDK_RC_PLATFORM_NAME) 432287111SmarcelAC_SUBST(COMPANY_NAME) 433287111SmarcelAC_SUBST(MACOSX_BUNDLE_NAME_BASE) 434287111SmarcelAC_SUBST(MACOSX_BUNDLE_ID_BASE) 435287111Smarcel 436287111SmarcelCOPYRIGHT_YEAR=`date +'%Y'` 437287111SmarcelAC_SUBST(COPYRIGHT_YEAR) 438287111Smarcel 439287111Smarcelif test "x$JDK_UPDATE_VERSION" != x; then 440287111Smarcel JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}" 441287111Smarcelelse 442287111Smarcel JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}" 443287111Smarcelfi 444287111SmarcelAC_SUBST(JDK_VERSION) 445287111Smarcel 446287111SmarcelCOOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'` 447287111SmarcelAC_SUBST(COOKED_BUILD_NUMBER) 448287111Smarcel]) 449287111Smarcel 450287111SmarcelAC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS], 451287111Smarcel[ 452287111SmarcelHOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET" 453287111SmarcelAC_SUBST(HOTSPOT_MAKE_ARGS) 454287111Smarcel 455287111Smarcel# The name of the Service Agent jar. 456287111SmarcelSALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}" 457287111Smarcelif test "x$OPENJDK_TARGET_OS" = "xwindows"; then 458287111Smarcel SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}" 459287111Smarcelfi 460287111SmarcelAC_SUBST(SALIB_NAME) 461287111Smarcel 462287111Smarcel]) 463287111Smarcel 464287111SmarcelAC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS], 465287111Smarcel[ 466287111Smarcel# 467287111Smarcel# ENABLE_DEBUG_SYMBOLS 468287111Smarcel# This must be done after the toolchain is setup, since we're looking at objcopy. 469287111Smarcel# 470287111SmarcelAC_ARG_ENABLE([debug-symbols], 471287111Smarcel [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])]) 472287111Smarcel 473287111SmarcelAC_MSG_CHECKING([if we should generate debug symbols]) 474287111Smarcel 475287111Smarcelif test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then 476287111Smarcel # explicit enabling of enable-debug-symbols and can't find objcopy 477287111Smarcel # this is an error 478287111Smarcel AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols]) 479287111Smarcelfi 480287111Smarcel 481287111Smarcelif test "x$enable_debug_symbols" = "xyes"; then 482287111Smarcel ENABLE_DEBUG_SYMBOLS=true 483287111Smarcelelif test "x$enable_debug_symbols" = "xno"; then 484287111Smarcel ENABLE_DEBUG_SYMBOLS=false 485287111Smarcelelse 486287111Smarcel # default on macosx is false 487287111Smarcel if test "x$OPENJDK_TARGET_OS" = xmacosx; then 488287111Smarcel ENABLE_DEBUG_SYMBOLS=false 489287111Smarcel # Default is on if objcopy is found, otherwise off 490287111Smarcel elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then 491287111Smarcel ENABLE_DEBUG_SYMBOLS=true 492287111Smarcel else 493287111Smarcel ENABLE_DEBUG_SYMBOLS=false 494287111Smarcel fi 495287111Smarcelfi 496287111Smarcel 497287111SmarcelAC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS]) 498287111Smarcel 499287111Smarcel# 500287111Smarcel# ZIP_DEBUGINFO_FILES 501287111Smarcel# 502287111SmarcelAC_ARG_ENABLE([zip-debug-info], 503287111Smarcel [AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])]) 504287111Smarcel 505287111SmarcelAC_MSG_CHECKING([if we should zip debug-info files]) 506287111SmarcelAC_MSG_RESULT([${enable_zip_debug_info}]) 507287111Smarcel 508287111Smarcelif test "x${enable_zip_debug_info}" = "xno"; then 509287111Smarcel ZIP_DEBUGINFO_FILES=false 510287111Smarcelelse 511287111Smarcel ZIP_DEBUGINFO_FILES=true 512287111Smarcelfi 513287111Smarcel 514287111SmarcelAC_SUBST(ENABLE_DEBUG_SYMBOLS) 515287111SmarcelAC_SUBST(ZIP_DEBUGINFO_FILES) 516287111SmarcelAC_SUBST(CFLAGS_DEBUG_SYMBOLS) 517287111SmarcelAC_SUBST(CXXFLAGS_DEBUG_SYMBOLS) 518287111Smarcel]) 519287111Smarcel 520287111Smarcel# Support for customization of the build process. Some build files 521287111Smarcel# will include counterparts from this location, if they exist. This allows 522287111Smarcel# for a degree of customization of the build targets and the rules/recipes 523287111Smarcel# to create them 524287111SmarcelAC_ARG_WITH([custom-make-dir], [AS_HELP_STRING([--with-custom-make-dir], 525287111Smarcel [use this directory for custom build/make files])], [CUSTOM_MAKE_DIR=$with_custom_make_dir]) 526287111SmarcelAC_SUBST(CUSTOM_MAKE_DIR) 527287111Smarcel