common/autoconf/jdk-options.m4

changeset 533
e175ecff1391
parent 495
e3182741ade2
child 542
6b93e7a4401d
equal deleted inserted replaced
532:2795874efd16 533:e175ecff1391
430 [ 430 [
431 # 431 #
432 # ENABLE_DEBUG_SYMBOLS 432 # ENABLE_DEBUG_SYMBOLS
433 # This must be done after the toolchain is setup, since we're looking at objcopy. 433 # This must be done after the toolchain is setup, since we're looking at objcopy.
434 # 434 #
435 ENABLE_DEBUG_SYMBOLS=default
436
437 # default on macosx is no...
438 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
439 ENABLE_DEBUG_SYMBOLS=no
440 fi
441
442 AC_ARG_ENABLE([debug-symbols], 435 AC_ARG_ENABLE([debug-symbols],
443 [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])], 436 [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])])
444 [ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}],
445 )
446 437
447 AC_MSG_CHECKING([if we should generate debug symbols]) 438 AC_MSG_CHECKING([if we should generate debug symbols])
448 439
449 if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then 440 if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
450 # explicit enabling of enable-debug-symbols and can't find objcopy 441 # explicit enabling of enable-debug-symbols and can't find objcopy
451 # this is an error 442 # this is an error
452 AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols]) 443 AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols])
453 fi 444 fi
454 445
455 if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then 446 if test "x$enable_debug_symbols" = "xyes"; then
447 ENABLE_DEBUG_SYMBOLS=true
448 elif test "x$enable_debug_symbols" = "xno"; then
449 ENABLE_DEBUG_SYMBOLS=false
450 else
451 # default on macosx is false
452 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
453 ENABLE_DEBUG_SYMBOLS=false
456 # Default is on if objcopy is found, otherwise off 454 # Default is on if objcopy is found, otherwise off
457 if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then 455 elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
458 ENABLE_DEBUG_SYMBOLS=yes 456 ENABLE_DEBUG_SYMBOLS=true
459 else 457 else
460 ENABLE_DEBUG_SYMBOLS=no 458 ENABLE_DEBUG_SYMBOLS=false
461 fi 459 fi
462 fi 460 fi
463 461
464 AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS]) 462 AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS])
465 463
466 # 464 #
467 # ZIP_DEBUGINFO_FILES 465 # ZIP_DEBUGINFO_FILES
468 # 466 #
469 ZIP_DEBUGINFO_FILES=yes
470
471 AC_ARG_ENABLE([zip-debug-info], 467 AC_ARG_ENABLE([zip-debug-info],
472 [AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])], 468 [AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])])
473 [ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}],
474 )
475 469
476 AC_MSG_CHECKING([if we should zip debug-info files]) 470 AC_MSG_CHECKING([if we should zip debug-info files])
477 AC_MSG_RESULT([$ZIP_DEBUGINFO_FILES]) 471 AC_MSG_RESULT([${enable_zip_debug_info}])
478 472
479 # Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes 473 if test "x${enable_zip_debug_info}" = "xno"; then
480 # use that... 474 ZIP_DEBUGINFO_FILES=false
481 if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then 475 else
482 ZIP_DEBUGINFO_FILES=1 476 ZIP_DEBUGINFO_FILES=true
483 else
484 ZIP_DEBUGINFO_FILES=0
485 fi 477 fi
486 478
487 AC_SUBST(ENABLE_DEBUG_SYMBOLS) 479 AC_SUBST(ENABLE_DEBUG_SYMBOLS)
488 AC_SUBST(ZIP_DEBUGINFO_FILES) 480 AC_SUBST(ZIP_DEBUGINFO_FILES)
489 AC_SUBST(CFLAGS_DEBUG_SYMBOLS) 481 AC_SUBST(CFLAGS_DEBUG_SYMBOLS)

mercurial