common/autoconf/help.m4

changeset 2206
7ba4e17574e0
parent 2203
28b247535e18
child 2220
47fda751abb6
     1.1 --- a/common/autoconf/help.m4	Wed Mar 21 09:19:00 2018 -0700
     1.2 +++ b/common/autoconf/help.m4	Thu Apr 05 07:59:52 2018 -0700
     1.3 @@ -1,5 +1,5 @@
     1.4  #
     1.5 -# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
     1.6 +# Copyright (c) 2011, 2018, 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 @@ -151,6 +151,27 @@
    1.11    PKGHANDLER_COMMAND=""
    1.12  }
    1.13  
    1.14 +# This function will check if we're called from the "configure" wrapper while
    1.15 +# printing --help. If so, we will print out additional information that can
    1.16 +# only be extracted within the autoconf script, and then exit. This must be
    1.17 +# called at the very beginning in configure.ac.
    1.18 +AC_DEFUN_ONCE([HELP_PRINT_ADDITIONAL_HELP_AND_EXIT],
    1.19 +[
    1.20 +  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
    1.21 +    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
    1.22 +    $PRINTF "Which are valid to use depends on the build platform.\n"
    1.23 +    for toolchain in $VALID_TOOLCHAINS_all; do
    1.24 +      # Use indirect variable referencing
    1.25 +      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
    1.26 +      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
    1.27 +      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
    1.28 +    done
    1.29 +
    1.30 +    # And now exit directly
    1.31 +    exit 0
    1.32 +  fi
    1.33 +])
    1.34 +
    1.35  AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
    1.36  [
    1.37    # Finally output some useful information to the user
    1.38 @@ -178,8 +199,9 @@
    1.39      printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
    1.40    fi
    1.41    printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
    1.42 -  printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
    1.43 -  printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
    1.44 +  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
    1.45 +  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
    1.46 +  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
    1.47  
    1.48    printf "\n"
    1.49    printf "Build performance summary:\n"

mercurial