common/autoconf/jdk-options.m4

changeset 2527
1c2063701dc0
parent 2498
8c54aca26212
parent 2513
b187cde4b6f0
child 2556
76a0f827e163
     1.1 --- a/common/autoconf/jdk-options.m4	Wed Oct 14 16:43:12 2020 +0800
     1.2 +++ b/common/autoconf/jdk-options.m4	Wed Oct 14 17:44:46 2020 +0800
     1.3 @@ -1,5 +1,5 @@
     1.4  #
     1.5 -# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
     1.6 +# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
     1.7  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8  #
     1.9  # This code is free software; you can redistribute it and/or modify it
    1.10 @@ -432,6 +432,30 @@
    1.11    COMPRESS_JARS=false
    1.12  
    1.13    AC_SUBST(COMPRESS_JARS)
    1.14 +
    1.15 +  ###############################################################################
    1.16 +  #
    1.17 +  # Enable or disable JFR
    1.18 +  #
    1.19 +  AC_MSG_CHECKING([whether to build jfr])
    1.20 +  AC_ARG_ENABLE(jfr, [AS_HELP_STRING([--enable-jfr],
    1.21 +      [Enable Java Flight Recorder support @<:@disabled@:>@])],,
    1.22 +      [enable_jfr=auto])
    1.23 +  if test "x$enable_jfr" = "xno" -o "x$enable_jfr" = "xauto"; then
    1.24 +    ENABLE_JFR=false
    1.25 +  elif test "x$enable_jfr" = "xyes" ; then
    1.26 +    if test "x$JVM_VARIANT_MINIMAL1" = "xtrue" -o "x$JVM_VARIANT_ZERO" = "xtrue"; then
    1.27 +      AC_MSG_ERROR([cannot enable JFR on minimal1 VM or zero build])
    1.28 +    elif test "x$OPENJDK_TARGET_OS" = xaix; then
    1.29 +      AC_MSG_ERROR([AIX does not support JFR])
    1.30 +    else
    1.31 +      ENABLE_JFR=true
    1.32 +    fi
    1.33 +  else
    1.34 +    AC_MSG_ERROR([--enable-jfr must either be set to yes or no])
    1.35 +  fi
    1.36 +  AC_MSG_RESULT([$ENABLE_JFR])
    1.37 +  AC_SUBST(ENABLE_JFR)
    1.38  ])
    1.39  
    1.40  ###############################################################################

mercurial