1 #
   2 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any
  23 # questions.
  24 #
  25 
  26 ###############################################################################
  27 # Check which variant of the JDK that we want to build.
  28 # Currently we have:
  29 #    normal:   standard edition
  30 # but the custom make system may add other variants
  31 #
  32 # Effectively the JDK variant gives a name to a specific set of
  33 # modules to compile into the JDK.
  34 AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VARIANT],
  35 [
  36   AC_MSG_CHECKING([which variant of the JDK to build])
  37   AC_ARG_WITH([jdk-variant], [AS_HELP_STRING([--with-jdk-variant],
  38       [JDK variant to build (normal) @<:@normal@:>@])])
  39 
  40   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
  41     JDK_VARIANT="normal"
  42   else
  43     AC_MSG_ERROR([The available JDK variants are: normal])
  44   fi
  45 
  46   AC_SUBST(JDK_VARIANT)
  47 
  48   AC_MSG_RESULT([$JDK_VARIANT])
  49 ])
  50 
  51 ###############################################################################
  52 # Set the debug level
  53 #    release: no debug information, all optimizations, no asserts.
  54 #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
  55 #    fastdebug: debug information (-g), all optimizations, all asserts
  56 #    slowdebug: debug information (-g), no optimizations, all asserts
  57 AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_LEVEL],
  58 [
  59   DEBUG_LEVEL="release"
  60   AC_MSG_CHECKING([which debug level to use])
  61   AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug],
  62       [set the debug level to fastdebug (shorthand for --with-debug-level=fastdebug) @<:@disabled@:>@])],
  63       [
  64         ENABLE_DEBUG="${enableval}"
  65         DEBUG_LEVEL="fastdebug"
  66       ], [ENABLE_DEBUG="no"])
  67 
  68   AC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level],
  69       [set the debug level (release, fastdebug, slowdebug, optimized) @<:@release@:>@])],
  70       [
  71         DEBUG_LEVEL="${withval}"
  72         if test "x$ENABLE_DEBUG" = xyes; then
  73           AC_MSG_ERROR([You cannot use both --enable-debug and --with-debug-level at the same time.])
  74         fi
  75       ])
  76   AC_MSG_RESULT([$DEBUG_LEVEL])
  77 
  78   if test "x$DEBUG_LEVEL" != xrelease && \
  79       test "x$DEBUG_LEVEL" != xoptimized && \
  80       test "x$DEBUG_LEVEL" != xfastdebug && \
  81       test "x$DEBUG_LEVEL" != xslowdebug; then
  82     AC_MSG_ERROR([Allowed debug levels are: release, fastdebug, slowdebug and optimized])
  83   fi
  84 
  85   # Translate DEBUG_LEVEL to debug level used by Hotspot
  86   HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
  87   if test "x$DEBUG_LEVEL" = xrelease; then
  88     HOTSPOT_DEBUG_LEVEL="product"
  89   elif test "x$DEBUG_LEVEL" = xslowdebug; then
  90     HOTSPOT_DEBUG_LEVEL="debug"
  91   fi
  92 
  93   if test "x$DEBUG_LEVEL" = xoptimized; then
  94     # The debug level 'optimized' is a little special because it is currently only
  95     # applicable to the HotSpot build where it means to build a completely
  96     # optimized version of the VM without any debugging code (like for the
  97     # 'release' debug level which is called 'product' in the HotSpot build) but
  98     # with the exception that it can contain additional code which is otherwise
  99     # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
 100     # test new and/or experimental features which are not intended for customer
 101     # shipment. Because these new features need to be tested and benchmarked in
 102     # real world scenarios, we want to build the containing JDK at the 'release'
 103     # debug level.
 104     DEBUG_LEVEL="release"
 105   fi
 106 
 107   AC_SUBST(HOTSPOT_DEBUG_LEVEL)
 108   AC_SUBST(DEBUG_LEVEL)
 109 ])
 110 
 111 ###############################################################################
 112 #
 113 # Should we build only OpenJDK even if closed sources are present?
 114 #
 115 AC_DEFUN_ONCE([JDKOPT_SETUP_OPEN_OR_CUSTOM],
 116 [
 117   AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only],
 118       [suppress building custom source even if present @<:@disabled@:>@])],,[enable_openjdk_only="no"])
 119 
 120   AC_MSG_CHECKING([if custom source is suppressed (openjdk-only)])
 121   AC_MSG_RESULT([$enable_openjdk_only])
 122   if test "x$enable_openjdk_only" = "xyes"; then
 123     SUPPRESS_CUSTOM_SOURCE="true"
 124   elif test "x$enable_openjdk_only" = "xno"; then
 125     SUPPRESS_CUSTOM_SOURCE="false"
 126   else
 127     AC_MSG_ERROR([Invalid value for --enable-openjdk-only: $enable_openjdk_only])
 128   fi
 129 
 130   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
 131   # the IncludeCustomExtension macro.
 132   BASIC_DEPRECATED_ARG_WITH(custom-make-dir)
 133 ])
 134 
 135 AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
 136 [
 137   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
 138   # We always build headless support.
 139   AC_MSG_CHECKING([headful support])
 140   AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful],
 141       [disable building headful support (graphical UI support) @<:@enabled@:>@])],
 142       [SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes])
 143 
 144   SUPPORT_HEADLESS=yes
 145   BUILD_HEADLESS="BUILD_HEADLESS:=true"
 146 
 147   if test "x$SUPPORT_HEADFUL" = xyes; then
 148     # We are building both headful and headless.
 149     headful_msg="include support for both headful and headless"
 150   fi
 151 
 152   if test "x$SUPPORT_HEADFUL" = xno; then
 153     # Thus we are building headless only.
 154     BUILD_HEADLESS="BUILD_HEADLESS:=true"
 155     headful_msg="headless only"
 156   fi
 157 
 158   AC_MSG_RESULT([$headful_msg])
 159 
 160   AC_SUBST(SUPPORT_HEADLESS)
 161   AC_SUBST(SUPPORT_HEADFUL)
 162   AC_SUBST(BUILD_HEADLESS)
 163 
 164   # Choose cacerts source file
 165   AC_ARG_WITH(cacerts-file, [AS_HELP_STRING([--with-cacerts-file],
 166       [specify alternative cacerts file])])
 167   if test "x$with_cacerts_file" != x; then
 168     CACERTS_FILE=$with_cacerts_file
 169   fi
 170   AC_SUBST(CACERTS_FILE)
 171 
 172   # Enable or disable unlimited crypto
 173   AC_ARG_ENABLE(unlimited-crypto, [AS_HELP_STRING([--enable-unlimited-crypto],
 174       [Enable unlimited crypto policy @<:@disabled@:>@])],,
 175       [enable_unlimited_crypto=no])
 176   if test "x$enable_unlimited_crypto" = "xyes"; then
 177     UNLIMITED_CRYPTO=true
 178   else
 179     UNLIMITED_CRYPTO=false
 180   fi
 181   AC_SUBST(UNLIMITED_CRYPTO)
 182 
 183   # Should we build the serviceability agent (SA)?
 184   INCLUDE_SA=true
 185   if HOTSPOT_CHECK_JVM_VARIANT(zero) || HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
 186     INCLUDE_SA=false
 187   fi
 188   if test "x$OPENJDK_TARGET_OS" = xaix ; then
 189     INCLUDE_SA=false
 190   fi
 191   AC_SUBST(INCLUDE_SA)
 192 
 193   # Compress jars
 194   COMPRESS_JARS=false
 195 
 196   AC_SUBST(COMPRESS_JARS)
 197 
 198   # Setup default copyright year. Mostly overridden when building close to a new year.
 199   AC_ARG_WITH(copyright-year, [AS_HELP_STRING([--with-copyright-year],
 200       [Set copyright year value for build @<:@current year@:>@])])
 201   if test "x$with_copyright_year" = xyes; then
 202     AC_MSG_ERROR([Copyright year must have a value])
 203   elif test "x$with_copyright_year" != x; then
 204     COPYRIGHT_YEAR="$with_copyright_year"
 205   else
 206     COPYRIGHT_YEAR=`$DATE +'%Y'`
 207   fi
 208   AC_SUBST(COPYRIGHT_YEAR)
 209 ])
 210 
 211 ###############################################################################
 212 #
 213 # Enable or disable the elliptic curve crypto implementation
 214 #
 215 AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC],
 216 [
 217   AC_MSG_CHECKING([if elliptic curve crypto implementation is present])
 218 
 219   if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
 220     ENABLE_INTREE_EC=yes
 221     AC_MSG_RESULT([yes])
 222   else
 223     ENABLE_INTREE_EC=no
 224     AC_MSG_RESULT([no])
 225   fi
 226 
 227   AC_SUBST(ENABLE_INTREE_EC)
 228 ])
 229 
 230 AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
 231 [
 232   #
 233   # NATIVE_DEBUG_SYMBOLS
 234   # This must be done after the toolchain is setup, since we're looking at objcopy.
 235   #
 236   AC_MSG_CHECKING([what type of native debug symbols to use])
 237   AC_ARG_WITH([native-debug-symbols],
 238       [AS_HELP_STRING([--with-native-debug-symbols],
 239       [set the native debug symbol configuration (none, internal, external, zipped) @<:@varying@:>@])],
 240       [
 241         if test "x$OPENJDK_TARGET_OS" = xaix; then
 242           if test "x$withval" = xexternal || test "x$withval" = xzipped; then
 243             AC_MSG_ERROR([AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols])
 244           fi
 245         fi
 246       ],
 247       [
 248         if test "x$OPENJDK_TARGET_OS" = xaix; then
 249           # AIX doesn't support 'zipped' so use 'internal' as default
 250           with_native_debug_symbols="internal"
 251         else
 252           if test "x$STATIC_BUILD" = xtrue; then
 253             with_native_debug_symbols="none"
 254           else
 255             with_native_debug_symbols="zipped"
 256           fi
 257         fi
 258       ])
 259   NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
 260   AC_MSG_RESULT([$NATIVE_DEBUG_SYMBOLS])
 261 
 262   if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
 263 
 264     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
 265       if test "x$OBJCOPY" = x; then
 266         # enabling of enable-debug-symbols and can't find objcopy
 267         # this is an error
 268         AC_MSG_ERROR([Unable to find objcopy, cannot enable native debug symbols])
 269       fi
 270     fi
 271 
 272     COMPILE_WITH_DEBUG_SYMBOLS=true
 273     COPY_DEBUG_SYMBOLS=true
 274     ZIP_EXTERNAL_DEBUG_SYMBOLS=true
 275 
 276     # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
 277     DEBUG_BINARIES=false
 278     STRIP_POLICY=min_strip
 279 
 280   elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
 281     COMPILE_WITH_DEBUG_SYMBOLS=false
 282     COPY_DEBUG_SYMBOLS=false
 283     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
 284 
 285     DEBUG_BINARIES=false
 286     STRIP_POLICY=no_strip
 287   elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
 288     COMPILE_WITH_DEBUG_SYMBOLS=true
 289     COPY_DEBUG_SYMBOLS=false
 290     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
 291 
 292     # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
 293     DEBUG_BINARIES=true
 294     STRIP_POLICY=no_strip
 295     STRIP=""
 296 
 297   elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
 298 
 299     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
 300       if test "x$OBJCOPY" = x; then
 301         # enabling of enable-debug-symbols and can't find objcopy
 302         # this is an error
 303         AC_MSG_ERROR([Unable to find objcopy, cannot enable native debug symbols])
 304       fi
 305     fi
 306 
 307     COMPILE_WITH_DEBUG_SYMBOLS=true
 308     COPY_DEBUG_SYMBOLS=true
 309     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
 310 
 311     # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
 312     DEBUG_BINARIES=false
 313     STRIP_POLICY=min_strip
 314   else
 315     AC_MSG_ERROR([Allowed native debug symbols are: none, internal, external, zipped])
 316   fi
 317 
 318   # --enable-debug-symbols is deprecated.
 319   # Please use --with-native-debug-symbols=[internal,external,zipped] .
 320   BASIC_DEPRECATED_ARG_ENABLE(debug-symbols, debug_symbols,
 321         [Please use --with-native-debug-symbols=[[internal,external,zipped]] .])
 322 
 323   # --enable-zip-debug-info is deprecated.
 324   # Please use --with-native-debug-symbols=zipped .
 325   BASIC_DEPRECATED_ARG_ENABLE(zip-debug-info, zip_debug_info,
 326                               [Please use --with-native-debug-symbols=zipped .])
 327 
 328   AC_SUBST(COMPILE_WITH_DEBUG_SYMBOLS)
 329   AC_SUBST(COPY_DEBUG_SYMBOLS)
 330   AC_SUBST(ZIP_EXTERNAL_DEBUG_SYMBOLS)
 331 
 332   # Legacy values
 333   AC_SUBST(DEBUG_BINARIES)
 334   AC_SUBST(STRIP_POLICY)
 335 ])
 336 
 337 ################################################################################
 338 #
 339 # Gcov coverage data for hotspot
 340 #
 341 AC_DEFUN_ONCE([JDKOPT_SETUP_CODE_COVERAGE],
 342 [
 343   AC_ARG_ENABLE(native-coverage, [AS_HELP_STRING([--enable-native-coverage],
 344       [enable native compilation with code coverage data@<:@disabled@:>@])])
 345   GCOV_ENABLED="false"
 346   if test "x$enable_native_coverage" = "xyes"; then
 347     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
 348       AC_MSG_CHECKING([if native coverage is enabled])
 349       AC_MSG_RESULT([yes])
 350       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
 351       GCOV_LDFLAGS="-fprofile-arcs"
 352       LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
 353       LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
 354       LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
 355       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
 356       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
 357       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
 358       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
 359       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
 360       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
 361       GCOV_ENABLED="true"
 362     else
 363       AC_MSG_ERROR([--enable-native-coverage only works with toolchain type gcc])
 364     fi
 365   elif test "x$enable_native_coverage" = "xno"; then
 366     AC_MSG_CHECKING([if native coverage is enabled])
 367     AC_MSG_RESULT([no])
 368   elif test "x$enable_native_coverage" != "x"; then
 369     AC_MSG_ERROR([--enable-native-coverage can only be assigned "yes" or "no"])
 370   fi
 371 
 372   AC_SUBST(GCOV_ENABLED)
 373 ])
 374 
 375 ################################################################################
 376 #
 377 # Static build support.  When enabled will generate static
 378 # libraries instead of shared libraries for all JDK libs.
 379 #
 380 AC_DEFUN_ONCE([JDKOPT_SETUP_STATIC_BUILD],
 381 [
 382   AC_ARG_ENABLE([static-build], [AS_HELP_STRING([--enable-static-build],
 383     [enable static library build @<:@disabled@:>@])])
 384   STATIC_BUILD=false
 385   if test "x$enable_static_build" = "xyes"; then
 386     AC_MSG_CHECKING([if static build is enabled])
 387     AC_MSG_RESULT([yes])
 388     if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
 389       AC_MSG_ERROR([--enable-static-build is only supported for macosx builds])
 390     fi
 391     STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
 392     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
 393     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
 394     CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
 395     CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
 396     STATIC_BUILD=true
 397   elif test "x$enable_static_build" = "xno"; then
 398     AC_MSG_CHECKING([if static build is enabled])
 399     AC_MSG_RESULT([no])
 400   elif test "x$enable_static_build" != "x"; then
 401     AC_MSG_ERROR([--enable-static-build can only be assigned "yes" or "no"])
 402   fi
 403 
 404   AC_SUBST(STATIC_BUILD)
 405 ])
 406 
 407 ################################################################################
 408 #
 409 # jlink options.
 410 # We always keep packaged modules in JDK image.
 411 #
 412 AC_DEFUN_ONCE([JDKOPT_SETUP_JLINK_OPTIONS],
 413 [
 414   AC_ARG_ENABLE([keep-packaged-modules], [AS_HELP_STRING([--disable-keep-packaged-modules],
 415     [Do not keep packaged modules in jdk image @<:@enable@:>@])])
 416 
 417   if test "x$enable_keep_packaged_modules" = "xyes"; then
 418     AC_MSG_CHECKING([if packaged modules are kept])
 419     AC_MSG_RESULT([yes])
 420     JLINK_KEEP_PACKAGED_MODULES=true
 421   elif test "x$enable_keep_packaged_modules" = "xno"; then
 422     AC_MSG_CHECKING([if packaged modules are kept])
 423     AC_MSG_RESULT([no])
 424     JLINK_KEEP_PACKAGED_MODULES=false
 425   elif test "x$enable_keep_packaged_modules" = "x"; then
 426     AC_MSG_RESULT([yes (default)])
 427     JLINK_KEEP_PACKAGED_MODULES=true
 428   else
 429     AC_MSG_ERROR([--enable-keep-packaged-modules accepts no argument])
 430   fi
 431 
 432   AC_SUBST(JLINK_KEEP_PACKAGED_MODULES)
 433 ])
 434 
 435 ################################################################################
 436 #
 437 # Check if building of the jtreg failure handler should be enabled.
 438 #
 439 AC_DEFUN_ONCE([JDKOPT_ENABLE_DISABLE_FAILURE_HANDLER],
 440 [
 441   AC_ARG_ENABLE([jtreg-failure-handler], [AS_HELP_STRING([--enable-jtreg-failure-handler],
 442     [forces build of the jtreg failure handler to be enabled, missing dependencies
 443      become fatal errors. Default is auto, where the failure handler is built if all
 444      dependencies are present and otherwise just disabled.])])
 445 
 446   AC_MSG_CHECKING([if jtreg failure handler should be built])
 447 
 448   if test "x$enable_jtreg_failure_handler" = "xyes"; then
 449     if test "x$JT_HOME" = "x"; then
 450       AC_MSG_ERROR([Cannot enable jtreg failure handler without jtreg.])
 451     else
 452       BUILD_FAILURE_HANDLER=true
 453       AC_MSG_RESULT([yes, forced])
 454     fi
 455   elif test "x$enable_jtreg_failure_handler" = "xno"; then
 456     BUILD_FAILURE_HANDLER=false
 457     AC_MSG_RESULT([no, forced])
 458   elif test "x$enable_jtreg_failure_handler" = "xauto" \
 459       || test "x$enable_jtreg_failure_handler" = "x"; then
 460     if test "x$JT_HOME" = "x"; then
 461       BUILD_FAILURE_HANDLER=false
 462       AC_MSG_RESULT([no, missing jtreg])
 463     else
 464       BUILD_FAILURE_HANDLER=true
 465       AC_MSG_RESULT([yes, jtreg present])
 466     fi
 467   else
 468     AC_MSG_ERROR([Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler])
 469   fi
 470 
 471   AC_SUBST(BUILD_FAILURE_HANDLER)
 472 ])
 473 
 474 ################################################################################
 475 #
 476 # Enable or disable generation of the classlist at build time
 477 #
 478 AC_DEFUN_ONCE([JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST],
 479 [
 480   AC_ARG_ENABLE([generate-classlist], [AS_HELP_STRING([--disable-generate-classlist],
 481       [forces enabling or disabling of the generation of a CDS classlist at build time.
 482       Default is to generate it when either the server or client JVMs are built.])])
 483 
 484   # Check if it's likely that it's possible to generate the classlist. Depending
 485   # on exact jvm configuration it could be possible anyway.
 486   if HOTSPOT_CHECK_JVM_VARIANT(server) || HOTSPOT_CHECK_JVM_VARIANT(client); then
 487     ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
 488   else
 489     ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
 490   fi
 491 
 492   AC_MSG_CHECKING([if the CDS classlist generation should be enabled])
 493   if test "x$enable_generate_classlist" = "xyes"; then
 494     AC_MSG_RESULT([yes, forced])
 495     ENABLE_GENERATE_CLASSLIST="true"
 496     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
 497       AC_MSG_WARN([Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS])
 498     fi
 499   elif test "x$enable_generate_classlist" = "xno"; then
 500     AC_MSG_RESULT([no, forced])
 501     ENABLE_GENERATE_CLASSLIST="false"
 502   elif test "x$enable_generate_classlist" = "x"; then
 503     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
 504       AC_MSG_RESULT([yes])
 505       ENABLE_GENERATE_CLASSLIST="true"
 506     else
 507       AC_MSG_RESULT([no])
 508       ENABLE_GENERATE_CLASSLIST="false"
 509     fi
 510   else
 511     AC_MSG_ERROR([Invalid value for --enable-generate-classlist: $enable_generate_classlist])
 512   fi
 513 
 514   AC_SUBST([ENABLE_GENERATE_CLASSLIST])
 515 ])