common/autoconf/jdk-options.m4

changeset 494
e64f2cb57d05
parent 478
2ba6f4da4bf3
child 495
e3182741ade2
equal deleted inserted replaced
488:8a3fe0ae06a8 494:e64f2cb57d05
62 # client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms) 62 # client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
63 # kernel: kernel footprint JVM that passes the TCK without major performance problems, 63 # kernel: kernel footprint JVM that passes the TCK without major performance problems,
64 # ie normal interpreter and C1, only the serial GC, kernel jvmti etc 64 # ie normal interpreter and C1, only the serial GC, kernel jvmti etc
65 # zero: no machine code interpreter, no compiler 65 # zero: no machine code interpreter, no compiler
66 # zeroshark: zero interpreter and shark/llvm compiler backend 66 # zeroshark: zero interpreter and shark/llvm compiler backend
67 AC_MSG_CHECKING([which variants of the JVM that should be built]) 67 AC_MSG_CHECKING([which variants of the JVM to build])
68 AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants], 68 AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
69 [JVM variants (separated by commas) to build (server, client, kernel, zero, zeroshark) @<:@server@:>@])]) 69 [JVM variants (separated by commas) to build (server, client, kernel, zero, zeroshark) @<:@server@:>@])])
70 70
71 if test "x$with_jvm_variants" = x; then 71 if test "x$with_jvm_variants" = x; then
72 with_jvm_variants="server" 72 with_jvm_variants="server"
239 ############################################################################### 239 ###############################################################################
240 # 240 #
241 # Should we build only OpenJDK even if closed sources are present? 241 # Should we build only OpenJDK even if closed sources are present?
242 # 242 #
243 AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only], 243 AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only],
244 [build OpenJDK regardless of the presence of closed repositories @<:@disabled@:>@])],,) 244 [supress building closed source even if present @<:@disabled@:>@])],,[enable_openjdk_only="no"])
245 245
246 if test "x$enable_openjdk_only" = "xyes"; then 246 AC_MSG_CHECKING([for presence of closed sources])
247 if test -d "$SRC_ROOT/jdk/src/closed"; then
248 CLOSED_SOURCE_PRESENT=yes
249 else
250 CLOSED_SOURCE_PRESENT=no
251 fi
252 AC_MSG_RESULT([$CLOSED_SOURCE_PRESENT])
253
254 AC_MSG_CHECKING([if closed source is supressed (openjdk-only)])
255 SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
256 AC_MSG_RESULT([$SUPRESS_CLOSED_SOURCE])
257
258 if test "x$CLOSED_SOURCE_PRESENT" = xno; then
259 OPENJDK=true
260 if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
261 AC_MSG_WARN([No closed source present, --enable-openjdk-only makes no sense])
262 fi
263 else
264 if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
247 OPENJDK=true 265 OPENJDK=true
248 elif test "x$enable_openjdk_only" = "xno"; then 266 else
249 OPENJDK=false 267 OPENJDK=false
250 elif test -d "$SRC_ROOT/jdk/src/closed"; then 268 fi
251 OPENJDK=false
252 else
253 OPENJDK=true
254 fi 269 fi
255 270
256 if test "x$OPENJDK" = "xtrue"; then 271 if test "x$OPENJDK" = "xtrue"; then
257 SET_OPENJDK=OPENJDK=true 272 SET_OPENJDK="OPENJDK=true"
258 fi 273 fi
259 274
260 AC_SUBST(SET_OPENJDK) 275 AC_SUBST(SET_OPENJDK)
261
262 ###############################################################################
263 #
264 # JIGSAW or not. The JIGSAW variable is used during the intermediate
265 # stage when we are building both the old style JDK and the new style modularized JDK.
266 # When the modularized JDK is finalized, this option will go away.
267 #
268 AC_ARG_ENABLE([jigsaw], [AS_HELP_STRING([--enable-jigsaw],
269 [build Jigsaw images (not yet available) @<:@disabled@:>@])],,)
270
271 if test "x$enable_jigsaw" = "xyes"; then
272 JIGSAW=true
273 else
274 JIGSAW=false
275 fi
276 AC_SUBST(JIGSAW)
277 276
278 ############################################################################### 277 ###############################################################################
279 # 278 #
280 # Should we build a JDK/JVM with headful support (ie a graphical ui)? 279 # Should we build a JDK/JVM with headful support (ie a graphical ui)?
281 # We always build headless support. 280 # We always build headless support.
282 # 281 #
283 AC_MSG_CHECKING([headful support]) 282 AC_MSG_CHECKING([headful support])
284 AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful], 283 AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful],
285 [build headful support (graphical UI support) @<:@enabled@:>@])], 284 [disable building headful support (graphical UI support) @<:@enabled@:>@])],
286 [SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes]) 285 [SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes])
287 286
288 SUPPORT_HEADLESS=yes 287 SUPPORT_HEADLESS=yes
289 BUILD_HEADLESS="BUILD_HEADLESS:=true" 288 BUILD_HEADLESS="BUILD_HEADLESS:=true"
290 289
303 302
304 AC_SUBST(SUPPORT_HEADLESS) 303 AC_SUBST(SUPPORT_HEADLESS)
305 AC_SUBST(SUPPORT_HEADFUL) 304 AC_SUBST(SUPPORT_HEADFUL)
306 AC_SUBST(BUILD_HEADLESS) 305 AC_SUBST(BUILD_HEADLESS)
307 306
308 ###############################################################################
309 #
310 # Should we compile nimbus swing L&F? We can probably remove this option
311 # since nimbus is officially part of javax now.
312 #
313 AC_MSG_CHECKING([whether to build nimbus L&F])
314 AC_ARG_ENABLE([nimbus], [AS_HELP_STRING([--disable-nimbus],
315 [disable Nimbus L&F @<:@enabled@:>@])],
316 [ENABLE_NIMBUS="${enableval}"], [ENABLE_NIMBUS='yes'])
317 AC_MSG_RESULT([$ENABLE_NIMBUS])
318 DISABLE_NIMBUS=
319 if test "x$ENABLE_NIMBUS" = xno; then
320 DISABLE_NIMBUS=true
321 fi
322 AC_SUBST(DISABLE_NIMBUS)
323
324 # Control wether Hotspot runs Queens test after build. 307 # Control wether Hotspot runs Queens test after build.
325 AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build], 308 AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build],
326 [enable running of Queens test after Hotspot build (not yet available) @<:@disabled@:>@])],, 309 [run the Queens test after Hotspot build @<:@disabled@:>@])],,
327 [enable_hotspot_test_in_build=no]) 310 [enable_hotspot_test_in_build=no])
328 if test "x$enable_hotspot_test_in_build" = "xyes"; then 311 if test "x$enable_hotspot_test_in_build" = "xyes"; then
329 TEST_IN_BUILD=true 312 TEST_IN_BUILD=true
330 else 313 else
331 TEST_IN_BUILD=false 314 TEST_IN_BUILD=false
354 # Compress jars 337 # Compress jars
355 # 338 #
356 COMPRESS_JARS=false 339 COMPRESS_JARS=false
357 340
358 AC_SUBST(COMPRESS_JARS) 341 AC_SUBST(COMPRESS_JARS)
359
360 ###############################################################################
361 #
362 # Should we compile JFR
363 # default no, except for on closed-jdk
364 #
365 ENABLE_JFR=no
366
367 # Is the JFR source present
368
369 #
370 # For closed default is yes
371 #
372 if test "x${OPENJDK}" != "xtrue"; then
373 ENABLE_JFR=yes
374 fi
375
376 AC_MSG_CHECKING([whether to build jfr])
377 AC_ARG_ENABLE([jfr], [AS_HELP_STRING([--enable-jfr],
378 [enable jfr (default is no)])]
379 [ENABLE_JFR="${enableval}"])
380 AC_MSG_RESULT([${ENABLE_JFR}])
381
382 if test "x$ENABLE_JFR" = "xyes"; then
383 ENABLE_JFR=true
384 elif test "x$ENABLE_JFR" = "xno"; then
385 ENABLE_JFR=false
386 else
387 AC_MSG_ERROR([Invalid argument to --enable-jfr])
388 fi
389
390 AC_SUBST(ENABLE_JFR)
391 ]) 342 ])
392 343
393 AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS], 344 AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS],
394 [ 345 [
395 # Source the version numbers 346 # Source the version numbers
407 AC_SUBST(LAUNCHER_NAME) 358 AC_SUBST(LAUNCHER_NAME)
408 AC_SUBST(PRODUCT_NAME) 359 AC_SUBST(PRODUCT_NAME)
409 AC_SUBST(PRODUCT_SUFFIX) 360 AC_SUBST(PRODUCT_SUFFIX)
410 AC_SUBST(JDK_RC_PLATFORM_NAME) 361 AC_SUBST(JDK_RC_PLATFORM_NAME)
411 AC_SUBST(COMPANY_NAME) 362 AC_SUBST(COMPANY_NAME)
363 AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
364 AC_SUBST(MACOSX_BUNDLE_ID_BASE)
412 365
413 COPYRIGHT_YEAR=`date +'%Y'` 366 COPYRIGHT_YEAR=`date +'%Y'`
414 AC_SUBST(COPYRIGHT_YEAR) 367 AC_SUBST(COPYRIGHT_YEAR)
415 368
416 RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX" 369 RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
435 else 388 else
436 JDK_BUILD_NUMBER=b00 389 JDK_BUILD_NUMBER=b00
437 BUILD_DATE=`date '+%Y_%m_%d_%H_%M'` 390 BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
438 # Avoid [:alnum:] since it depends on the locale. 391 # Avoid [:alnum:] since it depends on the locale.
439 CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'` 392 CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
440 USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'` 393 USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
441 FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}" 394 FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
442 fi 395 fi
443 AC_SUBST(FULL_VERSION) 396 AC_SUBST(FULL_VERSION)
444 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'` 397 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
445 AC_SUBST(COOKED_BUILD_NUMBER) 398 AC_SUBST(COOKED_BUILD_NUMBER)
471 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 424 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
472 ENABLE_DEBUG_SYMBOLS=no 425 ENABLE_DEBUG_SYMBOLS=no
473 fi 426 fi
474 427
475 AC_ARG_ENABLE([debug-symbols], 428 AC_ARG_ENABLE([debug-symbols],
476 [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols (@<:@enabled@:>@)])], 429 [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])],
477 [ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}], 430 [ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}],
478 ) 431 )
479 432
480 AC_MSG_CHECKING([if we should generate debug symbols]) 433 AC_MSG_CHECKING([if we should generate debug symbols])
481 434
485 AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols]) 438 AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols])
486 fi 439 fi
487 440
488 if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then 441 if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
489 # Default is on if objcopy is found, otherwise off 442 # Default is on if objcopy is found, otherwise off
490 if test "x$OBJCOPY" != x; then 443 if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
491 ENABLE_DEBUG_SYMBOLS=yes 444 ENABLE_DEBUG_SYMBOLS=yes
492 else 445 else
493 ENABLE_DEBUG_SYMBOLS=no 446 ENABLE_DEBUG_SYMBOLS=no
494 fi 447 fi
495 fi 448 fi
500 # ZIP_DEBUGINFO_FILES 453 # ZIP_DEBUGINFO_FILES
501 # 454 #
502 ZIP_DEBUGINFO_FILES=yes 455 ZIP_DEBUGINFO_FILES=yes
503 456
504 AC_ARG_ENABLE([zip-debug-info], 457 AC_ARG_ENABLE([zip-debug-info],
505 [AS_HELP_STRING([--disable-zip-debug-info],[don't zip debug-info files (@<:@enabled@:@)])], 458 [AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])],
506 [ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}], 459 [ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}],
507 ) 460 )
508 461
509 AC_MSG_CHECKING([if we should zip debug-info files]) 462 AC_MSG_CHECKING([if we should zip debug-info files])
510 AC_MSG_RESULT([$ZIP_DEBUGINFO_FILES]) 463 AC_MSG_RESULT([$ZIP_DEBUGINFO_FILES])
526 # Support for customization of the build process. Some build files 479 # Support for customization of the build process. Some build files
527 # will include counterparts from this location, if they exist. This allows 480 # will include counterparts from this location, if they exist. This allows
528 # for a degree of customization of the build targets and the rules/recipes 481 # for a degree of customization of the build targets and the rules/recipes
529 # to create them 482 # to create them
530 AC_ARG_WITH([custom-make-dir], [AS_HELP_STRING([--with-custom-make-dir], 483 AC_ARG_WITH([custom-make-dir], [AS_HELP_STRING([--with-custom-make-dir],
531 [directory containing custom build/make files])], [CUSTOM_MAKE_DIR=$with_custom_make_dir]) 484 [use this directory for custom build/make files])], [CUSTOM_MAKE_DIR=$with_custom_make_dir])
532 AC_SUBST(CUSTOM_MAKE_DIR) 485 AC_SUBST(CUSTOM_MAKE_DIR)

mercurial