common/autoconf/jdk-options.m4

Sun, 30 Dec 2012 12:15:02 +0100

author
erikj
date
Sun, 30 Dec 2012 12:15:02 +0100
changeset 560
2d9bb72b4e34
parent 542
6b93e7a4401d
child 561
abc8078e070b
permissions
-rw-r--r--

8004490: build-infra: mac: hotspot is always built in product, regardless of --with-debug-level setting
Reviewed-by: tbell

erikj@459 1 #
erikj@459 2 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
erikj@459 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
erikj@459 4 #
erikj@459 5 # This code is free software; you can redistribute it and/or modify it
erikj@459 6 # under the terms of the GNU General Public License version 2 only, as
erikj@459 7 # published by the Free Software Foundation. Oracle designates this
erikj@459 8 # particular file as subject to the "Classpath" exception as provided
erikj@459 9 # by Oracle in the LICENSE file that accompanied this code.
erikj@459 10 #
erikj@459 11 # This code is distributed in the hope that it will be useful, but WITHOUT
erikj@459 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
erikj@459 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
erikj@459 14 # version 2 for more details (a copy is included in the LICENSE file that
erikj@459 15 # accompanied this code).
erikj@459 16 #
erikj@459 17 # You should have received a copy of the GNU General Public License version
erikj@459 18 # 2 along with this work; if not, write to the Free Software Foundation,
erikj@459 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
erikj@459 20 #
erikj@459 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
erikj@459 22 # or visit www.oracle.com if you need additional information or have any
erikj@459 23 # questions.
erikj@459 24 #
erikj@459 25
erikj@459 26 AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VARIANT],
erikj@459 27 [
erikj@459 28 ###############################################################################
erikj@459 29 #
erikj@459 30 # Check which variant of the JDK that we want to build.
erikj@459 31 # Currently we have:
erikj@459 32 # normal: standard edition
ohair@478 33 # but the custom make system may add other variants
erikj@459 34 #
erikj@459 35 # Effectively the JDK variant gives a name to a specific set of
erikj@459 36 # modules to compile into the JDK. In the future, these modules
erikj@459 37 # might even be Jigsaw modules.
erikj@459 38 #
erikj@459 39 AC_MSG_CHECKING([which variant of the JDK to build])
erikj@459 40 AC_ARG_WITH([jdk-variant], [AS_HELP_STRING([--with-jdk-variant],
ohair@478 41 [JDK variant to build (normal) @<:@normal@:>@])])
erikj@459 42
erikj@459 43 if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
erikj@459 44 JDK_VARIANT="normal"
erikj@459 45 else
ohair@478 46 AC_MSG_ERROR([The available JDK variants are: normal])
erikj@459 47 fi
ohair@478 48
erikj@459 49 AC_SUBST(JDK_VARIANT)
erikj@459 50
erikj@459 51 AC_MSG_RESULT([$JDK_VARIANT])
erikj@459 52 ])
erikj@459 53
erikj@459 54 AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS],
erikj@459 55 [
erikj@459 56
erikj@459 57 ###############################################################################
erikj@459 58 #
erikj@459 59 # Check which variants of the JVM that we want to build.
erikj@459 60 # Currently we have:
erikj@459 61 # server: normal interpreter and a tiered C1/C2 compiler
erikj@459 62 # client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
dholmes@542 63 # minimal1: reduced form of client with optional VM services and features stripped out
erikj@459 64 # kernel: kernel footprint JVM that passes the TCK without major performance problems,
erikj@459 65 # ie normal interpreter and C1, only the serial GC, kernel jvmti etc
erikj@459 66 # zero: no machine code interpreter, no compiler
erikj@459 67 # zeroshark: zero interpreter and shark/llvm compiler backend
ohair@494 68 AC_MSG_CHECKING([which variants of the JVM to build])
erikj@459 69 AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
dholmes@542 70 [JVM variants (separated by commas) to build (server, client, minimal1, kernel, zero, zeroshark) @<:@server@:>@])])
erikj@459 71
erikj@459 72 if test "x$with_jvm_variants" = x; then
ohair@478 73 with_jvm_variants="server"
erikj@459 74 fi
erikj@459 75
erikj@459 76 JVM_VARIANTS=",$with_jvm_variants,"
dholmes@542 77 TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
erikj@459 78
erikj@459 79 if test "x$TEST_VARIANTS" != "x,"; then
dholmes@542 80 AC_MSG_ERROR([The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark])
erikj@459 81 fi
erikj@459 82 AC_MSG_RESULT([$with_jvm_variants])
erikj@459 83
erikj@459 84 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
erikj@459 85 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
dholmes@542 86 JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
erikj@459 87 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
erikj@459 88 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
erikj@459 89 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
erikj@459 90
erikj@459 91 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
erikj@459 92 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
erikj@459 93 AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.])
erikj@459 94 fi
erikj@459 95 fi
erikj@459 96 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
erikj@459 97 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
erikj@459 98 AC_MSG_ERROR([You cannot build a kernel JVM for a 64-bit machine.])
erikj@459 99 fi
erikj@459 100 fi
dholmes@542 101 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
dholmes@542 102 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
dholmes@542 103 AC_MSG_ERROR([You cannot build a minimal JVM for a 64-bit machine.])
dholmes@542 104 fi
dholmes@542 105 fi
erikj@459 106
erikj@459 107 # Replace the commas with AND for use in the build directory name.
erikj@459 108 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
dholmes@542 109 COUNT_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/'`
erikj@459 110 if test "x$COUNT_VARIANTS" != "x,1"; then
erikj@459 111 BUILDING_MULTIPLE_JVM_VARIANTS=yes
erikj@459 112 else
erikj@459 113 BUILDING_MULTIPLE_JVM_VARIANTS=no
erikj@459 114 fi
erikj@459 115
erikj@459 116 AC_SUBST(JVM_VARIANTS)
erikj@459 117 AC_SUBST(JVM_VARIANT_SERVER)
erikj@459 118 AC_SUBST(JVM_VARIANT_CLIENT)
dholmes@542 119 AC_SUBST(JVM_VARIANT_MINIMAL1)
erikj@459 120 AC_SUBST(JVM_VARIANT_KERNEL)
erikj@459 121 AC_SUBST(JVM_VARIANT_ZERO)
erikj@459 122 AC_SUBST(JVM_VARIANT_ZEROSHARK)
erikj@459 123
ohair@478 124 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
ohair@478 125 MACOSX_UNIVERSAL="true"
ohair@478 126 fi
ohair@478 127
ohair@478 128 AC_SUBST(MACOSX_UNIVERSAL)
erikj@459 129
erikj@459 130 ])
erikj@459 131
erikj@459 132 AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_LEVEL],
erikj@459 133 [
erikj@459 134 ###############################################################################
erikj@459 135 #
erikj@459 136 # Set the debug level
erikj@459 137 # release: no debug information, all optimizations, no asserts.
erikj@459 138 # fastdebug: debug information (-g), all optimizations, all asserts
erikj@459 139 # slowdebug: debug information (-g), no optimizations, all asserts
erikj@459 140 #
erikj@459 141 DEBUG_LEVEL="release"
erikj@459 142 AC_MSG_CHECKING([which debug level to use])
erikj@459 143 AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug],
erikj@459 144 [set the debug level to fastdebug (shorthand for --with-debug-level=fastdebug) @<:@disabled@:>@])],
erikj@459 145 [
erikj@459 146 ENABLE_DEBUG="${enableval}"
erikj@459 147 DEBUG_LEVEL="fastdebug"
erikj@459 148 ], [ENABLE_DEBUG="no"])
erikj@459 149
erikj@459 150 AC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level],
erikj@459 151 [set the debug level (release, fastdebug, slowdebug) @<:@release@:>@])],
erikj@459 152 [
erikj@459 153 DEBUG_LEVEL="${withval}"
erikj@459 154 if test "x$ENABLE_DEBUG" = xyes; then
erikj@459 155 AC_MSG_ERROR([You cannot use both --enable-debug and --with-debug-level at the same time.])
erikj@459 156 fi
erikj@459 157 ])
erikj@459 158 AC_MSG_RESULT([$DEBUG_LEVEL])
erikj@459 159
erikj@459 160 if test "x$DEBUG_LEVEL" != xrelease && \
erikj@459 161 test "x$DEBUG_LEVEL" != xfastdebug && \
erikj@459 162 test "x$DEBUG_LEVEL" != xslowdebug; then
erikj@459 163 AC_MSG_ERROR([Allowed debug levels are: release, fastdebug and slowdebug])
erikj@459 164 fi
erikj@459 165
erikj@459 166
erikj@459 167 ###############################################################################
erikj@459 168 #
erikj@459 169 # Setup legacy vars/targets and new vars to deal with different debug levels.
erikj@459 170 #
erikj@459 171
erikj@459 172 case $DEBUG_LEVEL in
erikj@459 173 release )
erikj@459 174 VARIANT="OPT"
erikj@459 175 FASTDEBUG="false"
erikj@459 176 DEBUG_CLASSFILES="false"
erikj@459 177 BUILD_VARIANT_RELEASE=""
erikj@459 178 HOTSPOT_DEBUG_LEVEL="product"
erikj@459 179 HOTSPOT_EXPORT="product"
erikj@459 180 ;;
erikj@459 181 fastdebug )
erikj@459 182 VARIANT="DBG"
erikj@459 183 FASTDEBUG="true"
erikj@459 184 DEBUG_CLASSFILES="true"
erikj@459 185 BUILD_VARIANT_RELEASE="-fastdebug"
erikj@459 186 HOTSPOT_DEBUG_LEVEL="fastdebug"
erikj@459 187 HOTSPOT_EXPORT="fastdebug"
erikj@459 188 ;;
erikj@459 189 slowdebug )
erikj@459 190 VARIANT="DBG"
erikj@459 191 FASTDEBUG="false"
erikj@459 192 DEBUG_CLASSFILES="true"
erikj@459 193 BUILD_VARIANT_RELEASE="-debug"
erikj@459 194 HOTSPOT_DEBUG_LEVEL="jvmg"
erikj@459 195 HOTSPOT_EXPORT="debug"
erikj@459 196 ;;
erikj@459 197 esac
erikj@459 198
erikj@459 199 #####
erikj@459 200 # Generate the legacy makefile targets for hotspot.
erikj@459 201 # The hotspot api for selecting the build artifacts, really, needs to be improved.
dholmes@542 202 # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
dholmes@542 203 # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
dholmes@542 204 # But until then ...
erikj@459 205 HOTSPOT_TARGET=""
erikj@459 206
erikj@459 207 if test "x$JVM_VARIANT_SERVER" = xtrue; then
erikj@459 208 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
erikj@459 209 fi
erikj@459 210
erikj@459 211 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
erikj@459 212 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
erikj@459 213 fi
erikj@459 214
dholmes@542 215 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
dholmes@542 216 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
dholmes@542 217 fi
dholmes@542 218
erikj@459 219 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
erikj@459 220 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
erikj@459 221 fi
erikj@459 222
erikj@459 223 if test "x$JVM_VARIANT_ZERO" = xtrue; then
erikj@459 224 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
erikj@459 225 fi
erikj@459 226
erikj@459 227 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
erikj@459 228 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
erikj@459 229 fi
erikj@459 230
erikj@459 231 HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
erikj@459 232
ohair@478 233 # On Macosx universal binaries are produced, but they only contain
ohair@478 234 # 64 bit intel. This invalidates control of which jvms are built
ohair@478 235 # from configure, but only server is valid anyway. Fix this
ohair@478 236 # when hotspot makefiles are rewritten.
ohair@478 237 if test "x$MACOSX_UNIVERSAL" = xtrue; then
erikj@560 238 HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
ohair@478 239 fi
ohair@478 240
erikj@459 241 #####
erikj@459 242
erikj@459 243 AC_SUBST(DEBUG_LEVEL)
erikj@459 244 AC_SUBST(VARIANT)
erikj@459 245 AC_SUBST(FASTDEBUG)
erikj@459 246 AC_SUBST(DEBUG_CLASSFILES)
erikj@459 247 AC_SUBST(BUILD_VARIANT_RELEASE)
erikj@459 248 ])
erikj@459 249
erikj@459 250 AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
erikj@459 251 [
erikj@459 252
erikj@459 253 ###############################################################################
erikj@459 254 #
erikj@459 255 # Should we build only OpenJDK even if closed sources are present?
erikj@459 256 #
erikj@459 257 AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only],
ohair@494 258 [supress building closed source even if present @<:@disabled@:>@])],,[enable_openjdk_only="no"])
erikj@459 259
ohair@494 260 AC_MSG_CHECKING([for presence of closed sources])
ohair@494 261 if test -d "$SRC_ROOT/jdk/src/closed"; then
ohair@494 262 CLOSED_SOURCE_PRESENT=yes
ohair@494 263 else
ohair@494 264 CLOSED_SOURCE_PRESENT=no
ohair@494 265 fi
ohair@494 266 AC_MSG_RESULT([$CLOSED_SOURCE_PRESENT])
ohair@494 267
ohair@494 268 AC_MSG_CHECKING([if closed source is supressed (openjdk-only)])
ohair@494 269 SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
ohair@494 270 AC_MSG_RESULT([$SUPRESS_CLOSED_SOURCE])
ohair@494 271
ohair@494 272 if test "x$CLOSED_SOURCE_PRESENT" = xno; then
ohair@494 273 OPENJDK=true
ohair@494 274 if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
ohair@494 275 AC_MSG_WARN([No closed source present, --enable-openjdk-only makes no sense])
ohair@494 276 fi
ohair@494 277 else
ohair@494 278 if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
erikj@459 279 OPENJDK=true
ohair@494 280 else
erikj@459 281 OPENJDK=false
ohair@494 282 fi
erikj@459 283 fi
erikj@459 284
erikj@459 285 if test "x$OPENJDK" = "xtrue"; then
ohair@494 286 SET_OPENJDK="OPENJDK=true"
erikj@459 287 fi
erikj@459 288
erikj@459 289 AC_SUBST(SET_OPENJDK)
erikj@459 290
erikj@459 291 ###############################################################################
erikj@459 292 #
erikj@459 293 # Should we build a JDK/JVM with headful support (ie a graphical ui)?
erikj@459 294 # We always build headless support.
erikj@459 295 #
erikj@459 296 AC_MSG_CHECKING([headful support])
erikj@459 297 AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful],
ohair@494 298 [disable building headful support (graphical UI support) @<:@enabled@:>@])],
erikj@459 299 [SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes])
erikj@459 300
erikj@459 301 SUPPORT_HEADLESS=yes
erikj@459 302 BUILD_HEADLESS="BUILD_HEADLESS:=true"
erikj@459 303
erikj@459 304 if test "x$SUPPORT_HEADFUL" = xyes; then
erikj@459 305 # We are building both headful and headless.
erikj@459 306 headful_msg="inlude support for both headful and headless"
erikj@459 307 fi
erikj@459 308
erikj@459 309 if test "x$SUPPORT_HEADFUL" = xno; then
erikj@459 310 # Thus we are building headless only.
erikj@459 311 BUILD_HEADLESS="BUILD_HEADLESS:=true"
erikj@459 312 headful_msg="headless only"
erikj@459 313 fi
erikj@459 314
erikj@459 315 AC_MSG_RESULT([$headful_msg])
erikj@459 316
erikj@459 317 AC_SUBST(SUPPORT_HEADLESS)
erikj@459 318 AC_SUBST(SUPPORT_HEADFUL)
erikj@459 319 AC_SUBST(BUILD_HEADLESS)
erikj@459 320
erikj@459 321 # Control wether Hotspot runs Queens test after build.
erikj@459 322 AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build],
ohair@494 323 [run the Queens test after Hotspot build @<:@disabled@:>@])],,
erikj@459 324 [enable_hotspot_test_in_build=no])
erikj@459 325 if test "x$enable_hotspot_test_in_build" = "xyes"; then
erikj@459 326 TEST_IN_BUILD=true
erikj@459 327 else
erikj@459 328 TEST_IN_BUILD=false
erikj@459 329 fi
erikj@459 330 AC_SUBST(TEST_IN_BUILD)
erikj@459 331
erikj@459 332 ###############################################################################
erikj@459 333 #
erikj@459 334 # Choose cacerts source file
erikj@459 335 #
erikj@459 336 AC_ARG_WITH(cacerts-file, [AS_HELP_STRING([--with-cacerts-file],
erikj@459 337 [specify alternative cacerts file])])
erikj@459 338 if test "x$with_cacerts_file" != x; then
erikj@459 339 CACERTS_FILE=$with_cacerts_file
erikj@459 340 else
erikj@459 341 if test "x$OPENJDK" = "xtrue"; then
erikj@459 342 CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
erikj@459 343 else
erikj@459 344 CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
erikj@459 345 fi
erikj@459 346 fi
erikj@459 347 AC_SUBST(CACERTS_FILE)
erikj@459 348
erikj@459 349 ###############################################################################
erikj@459 350 #
ihse@495 351 # Enable or disable unlimited crypto
ihse@495 352 #
ihse@495 353 AC_ARG_ENABLE(unlimited-crypto, [AS_HELP_STRING([--enable-unlimited-crypto],
ihse@495 354 [Enable unlimited crypto policy @<:@disabled@:>@])],,
ihse@495 355 [enable_unlimited_crypto=no])
ihse@495 356 if test "x$enable_unlimited_crypto" = "xyes"; then
ihse@495 357 UNLIMITED_CRYPTO=true
ihse@495 358 else
ihse@495 359 UNLIMITED_CRYPTO=false
ihse@495 360 fi
ihse@495 361 AC_SUBST(UNLIMITED_CRYPTO)
ihse@495 362
ihse@495 363 ###############################################################################
ihse@495 364 #
erikj@459 365 # Compress jars
erikj@459 366 #
erikj@459 367 COMPRESS_JARS=false
erikj@459 368
erikj@459 369 AC_SUBST(COMPRESS_JARS)
erikj@459 370 ])
erikj@459 371
erikj@459 372 AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS],
erikj@459 373 [
erikj@459 374 # Source the version numbers
erikj@459 375 . $AUTOCONF_DIR/version.numbers
erikj@459 376 if test "x$OPENJDK" = "xfalse"; then
erikj@459 377 . $AUTOCONF_DIR/closed.version.numbers
erikj@459 378 fi
erikj@459 379 # Now set the JDK version, milestone, build number etc.
erikj@459 380 AC_SUBST(JDK_MAJOR_VERSION)
erikj@459 381 AC_SUBST(JDK_MINOR_VERSION)
erikj@459 382 AC_SUBST(JDK_MICRO_VERSION)
erikj@459 383 AC_SUBST(JDK_UPDATE_VERSION)
erikj@459 384 AC_SUBST(JDK_BUILD_NUMBER)
erikj@459 385 AC_SUBST(MILESTONE)
erikj@459 386 AC_SUBST(LAUNCHER_NAME)
erikj@459 387 AC_SUBST(PRODUCT_NAME)
erikj@459 388 AC_SUBST(PRODUCT_SUFFIX)
erikj@459 389 AC_SUBST(JDK_RC_PLATFORM_NAME)
erikj@459 390 AC_SUBST(COMPANY_NAME)
ohair@494 391 AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
ohair@494 392 AC_SUBST(MACOSX_BUNDLE_ID_BASE)
erikj@459 393
erikj@459 394 COPYRIGHT_YEAR=`date +'%Y'`
erikj@459 395 AC_SUBST(COPYRIGHT_YEAR)
erikj@459 396
erikj@459 397 RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
erikj@459 398 AC_SUBST(RUNTIME_NAME)
erikj@459 399
erikj@459 400 if test "x$JDK_UPDATE_VERSION" != x; then
erikj@459 401 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
erikj@459 402 else
erikj@459 403 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
erikj@459 404 fi
erikj@459 405 AC_SUBST(JDK_VERSION)
erikj@459 406
erikj@459 407 if test "x$MILESTONE" != x; then
erikj@459 408 RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
erikj@459 409 else
erikj@459 410 RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
erikj@459 411 fi
erikj@459 412 AC_SUBST(RELEASE)
erikj@459 413
erikj@459 414 if test "x$JDK_BUILD_NUMBER" != x; then
erikj@459 415 FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
erikj@459 416 else
erikj@459 417 JDK_BUILD_NUMBER=b00
erikj@459 418 BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
erikj@459 419 # Avoid [:alnum:] since it depends on the locale.
erikj@459 420 CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
ohair@494 421 USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
erikj@459 422 FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
erikj@459 423 fi
erikj@459 424 AC_SUBST(FULL_VERSION)
erikj@459 425 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
erikj@459 426 AC_SUBST(COOKED_BUILD_NUMBER)
erikj@459 427 ])
erikj@459 428
erikj@459 429 AC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS],
erikj@459 430 [
ohair@478 431 HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
erikj@459 432 AC_SUBST(HOTSPOT_MAKE_ARGS)
erikj@459 433
erikj@459 434 # The name of the Service Agent jar.
erikj@459 435 SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
erikj@459 436 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
erikj@459 437 SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
erikj@459 438 fi
erikj@459 439 AC_SUBST(SALIB_NAME)
erikj@459 440
erikj@459 441 ])
erikj@459 442
erikj@459 443 AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
erikj@459 444 [
erikj@459 445 #
erikj@459 446 # ENABLE_DEBUG_SYMBOLS
erikj@459 447 # This must be done after the toolchain is setup, since we're looking at objcopy.
erikj@459 448 #
erikj@459 449 AC_ARG_ENABLE([debug-symbols],
erikj@533 450 [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])])
erikj@459 451
erikj@459 452 AC_MSG_CHECKING([if we should generate debug symbols])
erikj@459 453
erikj@533 454 if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
erikj@459 455 # explicit enabling of enable-debug-symbols and can't find objcopy
erikj@459 456 # this is an error
erikj@459 457 AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols])
erikj@459 458 fi
erikj@459 459
erikj@533 460 if test "x$enable_debug_symbols" = "xyes"; then
erikj@533 461 ENABLE_DEBUG_SYMBOLS=true
erikj@533 462 elif test "x$enable_debug_symbols" = "xno"; then
erikj@533 463 ENABLE_DEBUG_SYMBOLS=false
erikj@533 464 else
erikj@533 465 # default on macosx is false
erikj@533 466 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
erikj@533 467 ENABLE_DEBUG_SYMBOLS=false
erikj@459 468 # Default is on if objcopy is found, otherwise off
erikj@533 469 elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
erikj@533 470 ENABLE_DEBUG_SYMBOLS=true
erikj@459 471 else
erikj@533 472 ENABLE_DEBUG_SYMBOLS=false
erikj@459 473 fi
erikj@459 474 fi
erikj@459 475
erikj@459 476 AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS])
erikj@459 477
erikj@459 478 #
erikj@459 479 # ZIP_DEBUGINFO_FILES
erikj@459 480 #
erikj@459 481 AC_ARG_ENABLE([zip-debug-info],
erikj@533 482 [AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])])
erikj@459 483
erikj@459 484 AC_MSG_CHECKING([if we should zip debug-info files])
erikj@533 485 AC_MSG_RESULT([${enable_zip_debug_info}])
erikj@459 486
erikj@533 487 if test "x${enable_zip_debug_info}" = "xno"; then
erikj@533 488 ZIP_DEBUGINFO_FILES=false
erikj@459 489 else
erikj@533 490 ZIP_DEBUGINFO_FILES=true
erikj@459 491 fi
erikj@459 492
erikj@459 493 AC_SUBST(ENABLE_DEBUG_SYMBOLS)
erikj@459 494 AC_SUBST(ZIP_DEBUGINFO_FILES)
erikj@459 495 AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
erikj@459 496 AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
erikj@459 497 ])
ohair@478 498
ohair@478 499 # Support for customization of the build process. Some build files
ohair@478 500 # will include counterparts from this location, if they exist. This allows
ohair@478 501 # for a degree of customization of the build targets and the rules/recipes
ohair@478 502 # to create them
ohair@478 503 AC_ARG_WITH([custom-make-dir], [AS_HELP_STRING([--with-custom-make-dir],
ohair@494 504 [use this directory for custom build/make files])], [CUSTOM_MAKE_DIR=$with_custom_make_dir])
ohair@478 505 AC_SUBST(CUSTOM_MAKE_DIR)

mercurial