common/autoconf/jdk-options.m4

Mon, 29 Oct 2012 14:06:57 -0700

author
ihse
date
Mon, 29 Oct 2012 14:06:57 -0700
changeset 495
e3182741ade2
parent 494
e64f2cb57d05
child 533
e175ecff1391
permissions
-rw-r--r--

8001897: build-infra: misc adjustments to configure script
Reviewed-by: ohair

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
ohair@494 67 AC_MSG_CHECKING([which variants of the JVM to build])
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],
ohair@494 244 [supress building closed source even if present @<:@disabled@:>@])],,[enable_openjdk_only="no"])
erikj@459 245
ohair@494 246 AC_MSG_CHECKING([for presence of closed sources])
ohair@494 247 if test -d "$SRC_ROOT/jdk/src/closed"; then
ohair@494 248 CLOSED_SOURCE_PRESENT=yes
ohair@494 249 else
ohair@494 250 CLOSED_SOURCE_PRESENT=no
ohair@494 251 fi
ohair@494 252 AC_MSG_RESULT([$CLOSED_SOURCE_PRESENT])
ohair@494 253
ohair@494 254 AC_MSG_CHECKING([if closed source is supressed (openjdk-only)])
ohair@494 255 SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
ohair@494 256 AC_MSG_RESULT([$SUPRESS_CLOSED_SOURCE])
ohair@494 257
ohair@494 258 if test "x$CLOSED_SOURCE_PRESENT" = xno; then
ohair@494 259 OPENJDK=true
ohair@494 260 if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
ohair@494 261 AC_MSG_WARN([No closed source present, --enable-openjdk-only makes no sense])
ohair@494 262 fi
ohair@494 263 else
ohair@494 264 if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
erikj@459 265 OPENJDK=true
ohair@494 266 else
erikj@459 267 OPENJDK=false
ohair@494 268 fi
erikj@459 269 fi
erikj@459 270
erikj@459 271 if test "x$OPENJDK" = "xtrue"; then
ohair@494 272 SET_OPENJDK="OPENJDK=true"
erikj@459 273 fi
erikj@459 274
erikj@459 275 AC_SUBST(SET_OPENJDK)
erikj@459 276
erikj@459 277 ###############################################################################
erikj@459 278 #
erikj@459 279 # Should we build a JDK/JVM with headful support (ie a graphical ui)?
erikj@459 280 # We always build headless support.
erikj@459 281 #
erikj@459 282 AC_MSG_CHECKING([headful support])
erikj@459 283 AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful],
ohair@494 284 [disable building headful support (graphical UI support) @<:@enabled@:>@])],
erikj@459 285 [SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes])
erikj@459 286
erikj@459 287 SUPPORT_HEADLESS=yes
erikj@459 288 BUILD_HEADLESS="BUILD_HEADLESS:=true"
erikj@459 289
erikj@459 290 if test "x$SUPPORT_HEADFUL" = xyes; then
erikj@459 291 # We are building both headful and headless.
erikj@459 292 headful_msg="inlude support for both headful and headless"
erikj@459 293 fi
erikj@459 294
erikj@459 295 if test "x$SUPPORT_HEADFUL" = xno; then
erikj@459 296 # Thus we are building headless only.
erikj@459 297 BUILD_HEADLESS="BUILD_HEADLESS:=true"
erikj@459 298 headful_msg="headless only"
erikj@459 299 fi
erikj@459 300
erikj@459 301 AC_MSG_RESULT([$headful_msg])
erikj@459 302
erikj@459 303 AC_SUBST(SUPPORT_HEADLESS)
erikj@459 304 AC_SUBST(SUPPORT_HEADFUL)
erikj@459 305 AC_SUBST(BUILD_HEADLESS)
erikj@459 306
erikj@459 307 # Control wether Hotspot runs Queens test after build.
erikj@459 308 AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build],
ohair@494 309 [run the Queens test after Hotspot build @<:@disabled@:>@])],,
erikj@459 310 [enable_hotspot_test_in_build=no])
erikj@459 311 if test "x$enable_hotspot_test_in_build" = "xyes"; then
erikj@459 312 TEST_IN_BUILD=true
erikj@459 313 else
erikj@459 314 TEST_IN_BUILD=false
erikj@459 315 fi
erikj@459 316 AC_SUBST(TEST_IN_BUILD)
erikj@459 317
erikj@459 318 ###############################################################################
erikj@459 319 #
erikj@459 320 # Choose cacerts source file
erikj@459 321 #
erikj@459 322 AC_ARG_WITH(cacerts-file, [AS_HELP_STRING([--with-cacerts-file],
erikj@459 323 [specify alternative cacerts file])])
erikj@459 324 if test "x$with_cacerts_file" != x; then
erikj@459 325 CACERTS_FILE=$with_cacerts_file
erikj@459 326 else
erikj@459 327 if test "x$OPENJDK" = "xtrue"; then
erikj@459 328 CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
erikj@459 329 else
erikj@459 330 CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
erikj@459 331 fi
erikj@459 332 fi
erikj@459 333 AC_SUBST(CACERTS_FILE)
erikj@459 334
erikj@459 335 ###############################################################################
erikj@459 336 #
ihse@495 337 # Enable or disable unlimited crypto
ihse@495 338 #
ihse@495 339 AC_ARG_ENABLE(unlimited-crypto, [AS_HELP_STRING([--enable-unlimited-crypto],
ihse@495 340 [Enable unlimited crypto policy @<:@disabled@:>@])],,
ihse@495 341 [enable_unlimited_crypto=no])
ihse@495 342 if test "x$enable_unlimited_crypto" = "xyes"; then
ihse@495 343 UNLIMITED_CRYPTO=true
ihse@495 344 else
ihse@495 345 UNLIMITED_CRYPTO=false
ihse@495 346 fi
ihse@495 347 AC_SUBST(UNLIMITED_CRYPTO)
ihse@495 348
ihse@495 349 ###############################################################################
ihse@495 350 #
erikj@459 351 # Compress jars
erikj@459 352 #
erikj@459 353 COMPRESS_JARS=false
erikj@459 354
erikj@459 355 AC_SUBST(COMPRESS_JARS)
erikj@459 356 ])
erikj@459 357
erikj@459 358 AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS],
erikj@459 359 [
erikj@459 360 # Source the version numbers
erikj@459 361 . $AUTOCONF_DIR/version.numbers
erikj@459 362 if test "x$OPENJDK" = "xfalse"; then
erikj@459 363 . $AUTOCONF_DIR/closed.version.numbers
erikj@459 364 fi
erikj@459 365 # Now set the JDK version, milestone, build number etc.
erikj@459 366 AC_SUBST(JDK_MAJOR_VERSION)
erikj@459 367 AC_SUBST(JDK_MINOR_VERSION)
erikj@459 368 AC_SUBST(JDK_MICRO_VERSION)
erikj@459 369 AC_SUBST(JDK_UPDATE_VERSION)
erikj@459 370 AC_SUBST(JDK_BUILD_NUMBER)
erikj@459 371 AC_SUBST(MILESTONE)
erikj@459 372 AC_SUBST(LAUNCHER_NAME)
erikj@459 373 AC_SUBST(PRODUCT_NAME)
erikj@459 374 AC_SUBST(PRODUCT_SUFFIX)
erikj@459 375 AC_SUBST(JDK_RC_PLATFORM_NAME)
erikj@459 376 AC_SUBST(COMPANY_NAME)
ohair@494 377 AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
ohair@494 378 AC_SUBST(MACOSX_BUNDLE_ID_BASE)
erikj@459 379
erikj@459 380 COPYRIGHT_YEAR=`date +'%Y'`
erikj@459 381 AC_SUBST(COPYRIGHT_YEAR)
erikj@459 382
erikj@459 383 RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
erikj@459 384 AC_SUBST(RUNTIME_NAME)
erikj@459 385
erikj@459 386 if test "x$JDK_UPDATE_VERSION" != x; then
erikj@459 387 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
erikj@459 388 else
erikj@459 389 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
erikj@459 390 fi
erikj@459 391 AC_SUBST(JDK_VERSION)
erikj@459 392
erikj@459 393 if test "x$MILESTONE" != x; then
erikj@459 394 RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
erikj@459 395 else
erikj@459 396 RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
erikj@459 397 fi
erikj@459 398 AC_SUBST(RELEASE)
erikj@459 399
erikj@459 400 if test "x$JDK_BUILD_NUMBER" != x; then
erikj@459 401 FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
erikj@459 402 else
erikj@459 403 JDK_BUILD_NUMBER=b00
erikj@459 404 BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
erikj@459 405 # Avoid [:alnum:] since it depends on the locale.
erikj@459 406 CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
ohair@494 407 USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
erikj@459 408 FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
erikj@459 409 fi
erikj@459 410 AC_SUBST(FULL_VERSION)
erikj@459 411 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
erikj@459 412 AC_SUBST(COOKED_BUILD_NUMBER)
erikj@459 413 ])
erikj@459 414
erikj@459 415 AC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS],
erikj@459 416 [
ohair@478 417 HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
erikj@459 418 AC_SUBST(HOTSPOT_MAKE_ARGS)
erikj@459 419
erikj@459 420 # The name of the Service Agent jar.
erikj@459 421 SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
erikj@459 422 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
erikj@459 423 SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
erikj@459 424 fi
erikj@459 425 AC_SUBST(SALIB_NAME)
erikj@459 426
erikj@459 427 ])
erikj@459 428
erikj@459 429 AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
erikj@459 430 [
erikj@459 431 #
erikj@459 432 # ENABLE_DEBUG_SYMBOLS
erikj@459 433 # This must be done after the toolchain is setup, since we're looking at objcopy.
erikj@459 434 #
erikj@459 435 ENABLE_DEBUG_SYMBOLS=default
erikj@459 436
erikj@459 437 # default on macosx is no...
erikj@459 438 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
erikj@459 439 ENABLE_DEBUG_SYMBOLS=no
erikj@459 440 fi
erikj@459 441
erikj@459 442 AC_ARG_ENABLE([debug-symbols],
ohair@494 443 [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])],
erikj@459 444 [ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}],
erikj@459 445 )
erikj@459 446
erikj@459 447 AC_MSG_CHECKING([if we should generate debug symbols])
erikj@459 448
erikj@459 449 if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then
erikj@459 450 # explicit enabling of enable-debug-symbols and can't find objcopy
erikj@459 451 # this is an error
erikj@459 452 AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols])
erikj@459 453 fi
erikj@459 454
erikj@459 455 if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
erikj@459 456 # Default is on if objcopy is found, otherwise off
ohair@494 457 if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
erikj@459 458 ENABLE_DEBUG_SYMBOLS=yes
erikj@459 459 else
erikj@459 460 ENABLE_DEBUG_SYMBOLS=no
erikj@459 461 fi
erikj@459 462 fi
erikj@459 463
erikj@459 464 AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS])
erikj@459 465
erikj@459 466 #
erikj@459 467 # ZIP_DEBUGINFO_FILES
erikj@459 468 #
erikj@459 469 ZIP_DEBUGINFO_FILES=yes
erikj@459 470
erikj@459 471 AC_ARG_ENABLE([zip-debug-info],
ohair@494 472 [AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])],
erikj@459 473 [ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}],
erikj@459 474 )
erikj@459 475
erikj@459 476 AC_MSG_CHECKING([if we should zip debug-info files])
erikj@459 477 AC_MSG_RESULT([$ZIP_DEBUGINFO_FILES])
erikj@459 478
erikj@459 479 # Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes
erikj@459 480 # use that...
erikj@459 481 if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
erikj@459 482 ZIP_DEBUGINFO_FILES=1
erikj@459 483 else
erikj@459 484 ZIP_DEBUGINFO_FILES=0
erikj@459 485 fi
erikj@459 486
erikj@459 487 AC_SUBST(ENABLE_DEBUG_SYMBOLS)
erikj@459 488 AC_SUBST(ZIP_DEBUGINFO_FILES)
erikj@459 489 AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
erikj@459 490 AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
erikj@459 491 ])
ohair@478 492
ohair@478 493 # Support for customization of the build process. Some build files
ohair@478 494 # will include counterparts from this location, if they exist. This allows
ohair@478 495 # for a degree of customization of the build targets and the rules/recipes
ohair@478 496 # to create them
ohair@478 497 AC_ARG_WITH([custom-make-dir], [AS_HELP_STRING([--with-custom-make-dir],
ohair@494 498 [use this directory for custom build/make files])], [CUSTOM_MAKE_DIR=$with_custom_make_dir])
ohair@478 499 AC_SUBST(CUSTOM_MAKE_DIR)

mercurial