common/autoconf/jdk-options.m4

Tue, 18 Sep 2012 11:29:16 -0700

author
ohair
date
Tue, 18 Sep 2012 11:29:16 -0700
changeset 478
2ba6f4da4bf3
parent 459
3156dff953b1
child 494
e64f2cb57d05
permissions
-rw-r--r--

7197849: Update new build-infra makefiles
Reviewed-by: ihse, erikj, ohrstrom, 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)
erikj@459 63 # kernel: kernel footprint JVM that passes the TCK without major performance problems,
erikj@459 64 # ie normal interpreter and C1, only the serial GC, kernel jvmti etc
erikj@459 65 # zero: no machine code interpreter, no compiler
erikj@459 66 # zeroshark: zero interpreter and shark/llvm compiler backend
erikj@459 67 AC_MSG_CHECKING([which variants of the JVM that should be built])
erikj@459 68 AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
erikj@459 69 [JVM variants (separated by commas) to build (server, client, kernel, zero, zeroshark) @<:@server@:>@])])
erikj@459 70
erikj@459 71 if test "x$with_jvm_variants" = x; then
ohair@478 72 with_jvm_variants="server"
erikj@459 73 fi
erikj@459 74
erikj@459 75 JVM_VARIANTS=",$with_jvm_variants,"
erikj@459 76 TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
erikj@459 77
erikj@459 78 if test "x$TEST_VARIANTS" != "x,"; then
erikj@459 79 AC_MSG_ERROR([The available JVM variants are: server, client, kernel, zero, zeroshark])
erikj@459 80 fi
erikj@459 81 AC_MSG_RESULT([$with_jvm_variants])
erikj@459 82
erikj@459 83 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
erikj@459 84 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
erikj@459 85 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
erikj@459 86 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
erikj@459 87 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
erikj@459 88
erikj@459 89 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
erikj@459 90 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
erikj@459 91 AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.])
erikj@459 92 fi
erikj@459 93 fi
erikj@459 94 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
erikj@459 95 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
erikj@459 96 AC_MSG_ERROR([You cannot build a kernel JVM for a 64-bit machine.])
erikj@459 97 fi
erikj@459 98 fi
erikj@459 99
erikj@459 100 # Replace the commas with AND for use in the build directory name.
erikj@459 101 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
erikj@459 102 COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
erikj@459 103 if test "x$COUNT_VARIANTS" != "x,1"; then
erikj@459 104 BUILDING_MULTIPLE_JVM_VARIANTS=yes
erikj@459 105 else
erikj@459 106 BUILDING_MULTIPLE_JVM_VARIANTS=no
erikj@459 107 fi
erikj@459 108
erikj@459 109 AC_SUBST(JVM_VARIANTS)
erikj@459 110 AC_SUBST(JVM_VARIANT_SERVER)
erikj@459 111 AC_SUBST(JVM_VARIANT_CLIENT)
erikj@459 112 AC_SUBST(JVM_VARIANT_KERNEL)
erikj@459 113 AC_SUBST(JVM_VARIANT_ZERO)
erikj@459 114 AC_SUBST(JVM_VARIANT_ZEROSHARK)
erikj@459 115
ohair@478 116 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
ohair@478 117 MACOSX_UNIVERSAL="true"
ohair@478 118 fi
ohair@478 119
ohair@478 120 AC_SUBST(MACOSX_UNIVERSAL)
erikj@459 121
erikj@459 122 ])
erikj@459 123
erikj@459 124 AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_LEVEL],
erikj@459 125 [
erikj@459 126 ###############################################################################
erikj@459 127 #
erikj@459 128 # Set the debug level
erikj@459 129 # release: no debug information, all optimizations, no asserts.
erikj@459 130 # fastdebug: debug information (-g), all optimizations, all asserts
erikj@459 131 # slowdebug: debug information (-g), no optimizations, all asserts
erikj@459 132 #
erikj@459 133 DEBUG_LEVEL="release"
erikj@459 134 AC_MSG_CHECKING([which debug level to use])
erikj@459 135 AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug],
erikj@459 136 [set the debug level to fastdebug (shorthand for --with-debug-level=fastdebug) @<:@disabled@:>@])],
erikj@459 137 [
erikj@459 138 ENABLE_DEBUG="${enableval}"
erikj@459 139 DEBUG_LEVEL="fastdebug"
erikj@459 140 ], [ENABLE_DEBUG="no"])
erikj@459 141
erikj@459 142 AC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level],
erikj@459 143 [set the debug level (release, fastdebug, slowdebug) @<:@release@:>@])],
erikj@459 144 [
erikj@459 145 DEBUG_LEVEL="${withval}"
erikj@459 146 if test "x$ENABLE_DEBUG" = xyes; then
erikj@459 147 AC_MSG_ERROR([You cannot use both --enable-debug and --with-debug-level at the same time.])
erikj@459 148 fi
erikj@459 149 ])
erikj@459 150 AC_MSG_RESULT([$DEBUG_LEVEL])
erikj@459 151
erikj@459 152 if test "x$DEBUG_LEVEL" != xrelease && \
erikj@459 153 test "x$DEBUG_LEVEL" != xfastdebug && \
erikj@459 154 test "x$DEBUG_LEVEL" != xslowdebug; then
erikj@459 155 AC_MSG_ERROR([Allowed debug levels are: release, fastdebug and slowdebug])
erikj@459 156 fi
erikj@459 157
erikj@459 158
erikj@459 159 ###############################################################################
erikj@459 160 #
erikj@459 161 # Setup legacy vars/targets and new vars to deal with different debug levels.
erikj@459 162 #
erikj@459 163
erikj@459 164 case $DEBUG_LEVEL in
erikj@459 165 release )
erikj@459 166 VARIANT="OPT"
erikj@459 167 FASTDEBUG="false"
erikj@459 168 DEBUG_CLASSFILES="false"
erikj@459 169 BUILD_VARIANT_RELEASE=""
erikj@459 170 HOTSPOT_DEBUG_LEVEL="product"
erikj@459 171 HOTSPOT_EXPORT="product"
erikj@459 172 ;;
erikj@459 173 fastdebug )
erikj@459 174 VARIANT="DBG"
erikj@459 175 FASTDEBUG="true"
erikj@459 176 DEBUG_CLASSFILES="true"
erikj@459 177 BUILD_VARIANT_RELEASE="-fastdebug"
erikj@459 178 HOTSPOT_DEBUG_LEVEL="fastdebug"
erikj@459 179 HOTSPOT_EXPORT="fastdebug"
erikj@459 180 ;;
erikj@459 181 slowdebug )
erikj@459 182 VARIANT="DBG"
erikj@459 183 FASTDEBUG="false"
erikj@459 184 DEBUG_CLASSFILES="true"
erikj@459 185 BUILD_VARIANT_RELEASE="-debug"
erikj@459 186 HOTSPOT_DEBUG_LEVEL="jvmg"
erikj@459 187 HOTSPOT_EXPORT="debug"
erikj@459 188 ;;
erikj@459 189 esac
erikj@459 190
erikj@459 191 #####
erikj@459 192 # Generate the legacy makefile targets for hotspot.
erikj@459 193 # The hotspot api for selecting the build artifacts, really, needs to be improved.
erikj@459 194 #
erikj@459 195 HOTSPOT_TARGET=""
erikj@459 196
erikj@459 197 if test "x$JVM_VARIANT_SERVER" = xtrue; then
erikj@459 198 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
erikj@459 199 fi
erikj@459 200
erikj@459 201 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
erikj@459 202 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
erikj@459 203 fi
erikj@459 204
erikj@459 205 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
erikj@459 206 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
erikj@459 207 fi
erikj@459 208
erikj@459 209 if test "x$JVM_VARIANT_ZERO" = xtrue; then
erikj@459 210 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
erikj@459 211 fi
erikj@459 212
erikj@459 213 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
erikj@459 214 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
erikj@459 215 fi
erikj@459 216
erikj@459 217 HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
erikj@459 218
ohair@478 219 # On Macosx universal binaries are produced, but they only contain
ohair@478 220 # 64 bit intel. This invalidates control of which jvms are built
ohair@478 221 # from configure, but only server is valid anyway. Fix this
ohair@478 222 # when hotspot makefiles are rewritten.
ohair@478 223 if test "x$MACOSX_UNIVERSAL" = xtrue; then
ohair@478 224 HOTSPOT_TARGET=universal_product
ohair@478 225 fi
ohair@478 226
erikj@459 227 #####
erikj@459 228
erikj@459 229 AC_SUBST(DEBUG_LEVEL)
erikj@459 230 AC_SUBST(VARIANT)
erikj@459 231 AC_SUBST(FASTDEBUG)
erikj@459 232 AC_SUBST(DEBUG_CLASSFILES)
erikj@459 233 AC_SUBST(BUILD_VARIANT_RELEASE)
erikj@459 234 ])
erikj@459 235
erikj@459 236 AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
erikj@459 237 [
erikj@459 238
erikj@459 239 ###############################################################################
erikj@459 240 #
erikj@459 241 # Should we build only OpenJDK even if closed sources are present?
erikj@459 242 #
erikj@459 243 AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only],
erikj@459 244 [build OpenJDK regardless of the presence of closed repositories @<:@disabled@:>@])],,)
erikj@459 245
erikj@459 246 if test "x$enable_openjdk_only" = "xyes"; then
erikj@459 247 OPENJDK=true
erikj@459 248 elif test "x$enable_openjdk_only" = "xno"; then
erikj@459 249 OPENJDK=false
erikj@459 250 elif test -d "$SRC_ROOT/jdk/src/closed"; then
erikj@459 251 OPENJDK=false
erikj@459 252 else
erikj@459 253 OPENJDK=true
erikj@459 254 fi
erikj@459 255
erikj@459 256 if test "x$OPENJDK" = "xtrue"; then
erikj@459 257 SET_OPENJDK=OPENJDK=true
erikj@459 258 fi
erikj@459 259
erikj@459 260 AC_SUBST(SET_OPENJDK)
erikj@459 261
erikj@459 262 ###############################################################################
erikj@459 263 #
erikj@459 264 # JIGSAW or not. The JIGSAW variable is used during the intermediate
erikj@459 265 # stage when we are building both the old style JDK and the new style modularized JDK.
erikj@459 266 # When the modularized JDK is finalized, this option will go away.
erikj@459 267 #
erikj@459 268 AC_ARG_ENABLE([jigsaw], [AS_HELP_STRING([--enable-jigsaw],
erikj@459 269 [build Jigsaw images (not yet available) @<:@disabled@:>@])],,)
erikj@459 270
erikj@459 271 if test "x$enable_jigsaw" = "xyes"; then
erikj@459 272 JIGSAW=true
erikj@459 273 else
erikj@459 274 JIGSAW=false
erikj@459 275 fi
erikj@459 276 AC_SUBST(JIGSAW)
erikj@459 277
erikj@459 278 ###############################################################################
erikj@459 279 #
erikj@459 280 # Should we build a JDK/JVM with headful support (ie a graphical ui)?
erikj@459 281 # We always build headless support.
erikj@459 282 #
erikj@459 283 AC_MSG_CHECKING([headful support])
erikj@459 284 AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful],
erikj@459 285 [build headful support (graphical UI support) @<:@enabled@:>@])],
erikj@459 286 [SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes])
erikj@459 287
erikj@459 288 SUPPORT_HEADLESS=yes
erikj@459 289 BUILD_HEADLESS="BUILD_HEADLESS:=true"
erikj@459 290
erikj@459 291 if test "x$SUPPORT_HEADFUL" = xyes; then
erikj@459 292 # We are building both headful and headless.
erikj@459 293 headful_msg="inlude support for both headful and headless"
erikj@459 294 fi
erikj@459 295
erikj@459 296 if test "x$SUPPORT_HEADFUL" = xno; then
erikj@459 297 # Thus we are building headless only.
erikj@459 298 BUILD_HEADLESS="BUILD_HEADLESS:=true"
erikj@459 299 headful_msg="headless only"
erikj@459 300 fi
erikj@459 301
erikj@459 302 AC_MSG_RESULT([$headful_msg])
erikj@459 303
erikj@459 304 AC_SUBST(SUPPORT_HEADLESS)
erikj@459 305 AC_SUBST(SUPPORT_HEADFUL)
erikj@459 306 AC_SUBST(BUILD_HEADLESS)
erikj@459 307
erikj@459 308 ###############################################################################
erikj@459 309 #
erikj@459 310 # Should we compile nimbus swing L&F? We can probably remove this option
erikj@459 311 # since nimbus is officially part of javax now.
erikj@459 312 #
erikj@459 313 AC_MSG_CHECKING([whether to build nimbus L&F])
erikj@459 314 AC_ARG_ENABLE([nimbus], [AS_HELP_STRING([--disable-nimbus],
erikj@459 315 [disable Nimbus L&F @<:@enabled@:>@])],
erikj@459 316 [ENABLE_NIMBUS="${enableval}"], [ENABLE_NIMBUS='yes'])
erikj@459 317 AC_MSG_RESULT([$ENABLE_NIMBUS])
erikj@459 318 DISABLE_NIMBUS=
erikj@459 319 if test "x$ENABLE_NIMBUS" = xno; then
erikj@459 320 DISABLE_NIMBUS=true
erikj@459 321 fi
erikj@459 322 AC_SUBST(DISABLE_NIMBUS)
erikj@459 323
erikj@459 324 # Control wether Hotspot runs Queens test after build.
erikj@459 325 AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build],
erikj@459 326 [enable running of Queens test after Hotspot build (not yet available) @<:@disabled@:>@])],,
erikj@459 327 [enable_hotspot_test_in_build=no])
erikj@459 328 if test "x$enable_hotspot_test_in_build" = "xyes"; then
erikj@459 329 TEST_IN_BUILD=true
erikj@459 330 else
erikj@459 331 TEST_IN_BUILD=false
erikj@459 332 fi
erikj@459 333 AC_SUBST(TEST_IN_BUILD)
erikj@459 334
erikj@459 335 ###############################################################################
erikj@459 336 #
erikj@459 337 # Choose cacerts source file
erikj@459 338 #
erikj@459 339 AC_ARG_WITH(cacerts-file, [AS_HELP_STRING([--with-cacerts-file],
erikj@459 340 [specify alternative cacerts file])])
erikj@459 341 if test "x$with_cacerts_file" != x; then
erikj@459 342 CACERTS_FILE=$with_cacerts_file
erikj@459 343 else
erikj@459 344 if test "x$OPENJDK" = "xtrue"; then
erikj@459 345 CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
erikj@459 346 else
erikj@459 347 CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
erikj@459 348 fi
erikj@459 349 fi
erikj@459 350 AC_SUBST(CACERTS_FILE)
erikj@459 351
erikj@459 352 ###############################################################################
erikj@459 353 #
erikj@459 354 # Compress jars
erikj@459 355 #
erikj@459 356 COMPRESS_JARS=false
erikj@459 357
erikj@459 358 AC_SUBST(COMPRESS_JARS)
erikj@459 359
erikj@459 360 ###############################################################################
erikj@459 361 #
erikj@459 362 # Should we compile JFR
ohair@478 363 # default no, except for on closed-jdk
erikj@459 364 #
erikj@459 365 ENABLE_JFR=no
erikj@459 366
erikj@459 367 # Is the JFR source present
erikj@459 368
erikj@459 369 #
ohair@478 370 # For closed default is yes
erikj@459 371 #
ohair@478 372 if test "x${OPENJDK}" != "xtrue"; then
erikj@459 373 ENABLE_JFR=yes
erikj@459 374 fi
erikj@459 375
erikj@459 376 AC_MSG_CHECKING([whether to build jfr])
erikj@459 377 AC_ARG_ENABLE([jfr], [AS_HELP_STRING([--enable-jfr],
erikj@459 378 [enable jfr (default is no)])]
erikj@459 379 [ENABLE_JFR="${enableval}"])
erikj@459 380 AC_MSG_RESULT([${ENABLE_JFR}])
erikj@459 381
erikj@459 382 if test "x$ENABLE_JFR" = "xyes"; then
erikj@459 383 ENABLE_JFR=true
erikj@459 384 elif test "x$ENABLE_JFR" = "xno"; then
erikj@459 385 ENABLE_JFR=false
erikj@459 386 else
erikj@459 387 AC_MSG_ERROR([Invalid argument to --enable-jfr])
erikj@459 388 fi
erikj@459 389
erikj@459 390 AC_SUBST(ENABLE_JFR)
erikj@459 391 ])
erikj@459 392
erikj@459 393 AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS],
erikj@459 394 [
erikj@459 395 # Source the version numbers
erikj@459 396 . $AUTOCONF_DIR/version.numbers
erikj@459 397 if test "x$OPENJDK" = "xfalse"; then
erikj@459 398 . $AUTOCONF_DIR/closed.version.numbers
erikj@459 399 fi
erikj@459 400 # Now set the JDK version, milestone, build number etc.
erikj@459 401 AC_SUBST(JDK_MAJOR_VERSION)
erikj@459 402 AC_SUBST(JDK_MINOR_VERSION)
erikj@459 403 AC_SUBST(JDK_MICRO_VERSION)
erikj@459 404 AC_SUBST(JDK_UPDATE_VERSION)
erikj@459 405 AC_SUBST(JDK_BUILD_NUMBER)
erikj@459 406 AC_SUBST(MILESTONE)
erikj@459 407 AC_SUBST(LAUNCHER_NAME)
erikj@459 408 AC_SUBST(PRODUCT_NAME)
erikj@459 409 AC_SUBST(PRODUCT_SUFFIX)
erikj@459 410 AC_SUBST(JDK_RC_PLATFORM_NAME)
erikj@459 411 AC_SUBST(COMPANY_NAME)
erikj@459 412
erikj@459 413 COPYRIGHT_YEAR=`date +'%Y'`
erikj@459 414 AC_SUBST(COPYRIGHT_YEAR)
erikj@459 415
erikj@459 416 RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
erikj@459 417 AC_SUBST(RUNTIME_NAME)
erikj@459 418
erikj@459 419 if test "x$JDK_UPDATE_VERSION" != x; then
erikj@459 420 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
erikj@459 421 else
erikj@459 422 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
erikj@459 423 fi
erikj@459 424 AC_SUBST(JDK_VERSION)
erikj@459 425
erikj@459 426 if test "x$MILESTONE" != x; then
erikj@459 427 RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
erikj@459 428 else
erikj@459 429 RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
erikj@459 430 fi
erikj@459 431 AC_SUBST(RELEASE)
erikj@459 432
erikj@459 433 if test "x$JDK_BUILD_NUMBER" != x; then
erikj@459 434 FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
erikj@459 435 else
erikj@459 436 JDK_BUILD_NUMBER=b00
erikj@459 437 BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
erikj@459 438 # Avoid [:alnum:] since it depends on the locale.
erikj@459 439 CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
erikj@459 440 USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
erikj@459 441 FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
erikj@459 442 fi
erikj@459 443 AC_SUBST(FULL_VERSION)
erikj@459 444 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
erikj@459 445 AC_SUBST(COOKED_BUILD_NUMBER)
erikj@459 446 ])
erikj@459 447
erikj@459 448 AC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS],
erikj@459 449 [
ohair@478 450 HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
erikj@459 451 AC_SUBST(HOTSPOT_MAKE_ARGS)
erikj@459 452
erikj@459 453 # The name of the Service Agent jar.
erikj@459 454 SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
erikj@459 455 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
erikj@459 456 SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
erikj@459 457 fi
erikj@459 458 AC_SUBST(SALIB_NAME)
erikj@459 459
erikj@459 460 ])
erikj@459 461
erikj@459 462 AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
erikj@459 463 [
erikj@459 464 #
erikj@459 465 # ENABLE_DEBUG_SYMBOLS
erikj@459 466 # This must be done after the toolchain is setup, since we're looking at objcopy.
erikj@459 467 #
erikj@459 468 ENABLE_DEBUG_SYMBOLS=default
erikj@459 469
erikj@459 470 # default on macosx is no...
erikj@459 471 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
erikj@459 472 ENABLE_DEBUG_SYMBOLS=no
erikj@459 473 fi
erikj@459 474
erikj@459 475 AC_ARG_ENABLE([debug-symbols],
erikj@459 476 [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols (@<:@enabled@:>@)])],
erikj@459 477 [ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}],
erikj@459 478 )
erikj@459 479
erikj@459 480 AC_MSG_CHECKING([if we should generate debug symbols])
erikj@459 481
erikj@459 482 if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then
erikj@459 483 # explicit enabling of enable-debug-symbols and can't find objcopy
erikj@459 484 # this is an error
erikj@459 485 AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols])
erikj@459 486 fi
erikj@459 487
erikj@459 488 if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
erikj@459 489 # Default is on if objcopy is found, otherwise off
erikj@459 490 if test "x$OBJCOPY" != x; then
erikj@459 491 ENABLE_DEBUG_SYMBOLS=yes
erikj@459 492 else
erikj@459 493 ENABLE_DEBUG_SYMBOLS=no
erikj@459 494 fi
erikj@459 495 fi
erikj@459 496
erikj@459 497 AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS])
erikj@459 498
erikj@459 499 #
erikj@459 500 # ZIP_DEBUGINFO_FILES
erikj@459 501 #
erikj@459 502 ZIP_DEBUGINFO_FILES=yes
erikj@459 503
erikj@459 504 AC_ARG_ENABLE([zip-debug-info],
erikj@459 505 [AS_HELP_STRING([--disable-zip-debug-info],[don't zip debug-info files (@<:@enabled@:@)])],
erikj@459 506 [ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}],
erikj@459 507 )
erikj@459 508
erikj@459 509 AC_MSG_CHECKING([if we should zip debug-info files])
erikj@459 510 AC_MSG_RESULT([$ZIP_DEBUGINFO_FILES])
erikj@459 511
erikj@459 512 # Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes
erikj@459 513 # use that...
erikj@459 514 if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
erikj@459 515 ZIP_DEBUGINFO_FILES=1
erikj@459 516 else
erikj@459 517 ZIP_DEBUGINFO_FILES=0
erikj@459 518 fi
erikj@459 519
erikj@459 520 AC_SUBST(ENABLE_DEBUG_SYMBOLS)
erikj@459 521 AC_SUBST(ZIP_DEBUGINFO_FILES)
erikj@459 522 AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
erikj@459 523 AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
erikj@459 524 ])
ohair@478 525
ohair@478 526 # Support for customization of the build process. Some build files
ohair@478 527 # will include counterparts from this location, if they exist. This allows
ohair@478 528 # for a degree of customization of the build targets and the rules/recipes
ohair@478 529 # to create them
ohair@478 530 AC_ARG_WITH([custom-make-dir], [AS_HELP_STRING([--with-custom-make-dir],
ohair@478 531 [directory containing custom build/make files])], [CUSTOM_MAKE_DIR=$with_custom_make_dir])
ohair@478 532 AC_SUBST(CUSTOM_MAKE_DIR)

mercurial