annotate make/autoconf/help.m4 @ 57834:00d9f8de0e3d

Automatic merge with records-and-sealed
author mcimadamore
date Thu, 19 Sep 2019 15:47:00 +0000
parents d7852bb72332
children
rev   line source
ohair@12258 1 #
mbaesken@55236 2 # Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
ohair@12258 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ohair@12258 4 #
ohair@12258 5 # This code is free software; you can redistribute it and/or modify it
ohair@12258 6 # under the terms of the GNU General Public License version 2 only, as
ohair@12258 7 # published by the Free Software Foundation. Oracle designates this
ohair@12258 8 # particular file as subject to the "Classpath" exception as provided
ohair@12258 9 # by Oracle in the LICENSE file that accompanied this code.
ohair@12258 10 #
ohair@12258 11 # This code is distributed in the hope that it will be useful, but WITHOUT
ohair@12258 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ohair@12258 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ohair@12258 14 # version 2 for more details (a copy is included in the LICENSE file that
ohair@12258 15 # accompanied this code).
ohair@12258 16 #
ohair@12258 17 # You should have received a copy of the GNU General Public License version
ohair@12258 18 # 2 along with this work; if not, write to the Free Software Foundation,
ohair@12258 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ohair@12258 20 #
ohair@12258 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@12258 22 # or visit www.oracle.com if you need additional information or have any
ohair@12258 23 # questions.
ohair@12258 24 #
ohair@12258 25
erikj@13132 26 AC_DEFUN_ONCE([HELP_SETUP_DEPENDENCY_HELP],
erikj@13132 27 [
mbaesken@55236 28 AC_CHECK_PROGS(PKGHANDLER, zypper apt-get yum brew port pkgutil pkgadd)
erikj@13132 29 ])
erikj@13132 30
erikj@13132 31 AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
erikj@13132 32 [
ihse@20363 33 # Print a helpful message on how to acquire the necessary build dependency.
prr@49665 34 # $1 is the help tag: cups, alsa etc
ihse@20363 35 MISSING_DEPENDENCY=$1
ohair@12258 36
erikj@56517 37 if test "x$MISSING_DEPENDENCY" = "xopenjdk"; then
erikj@56517 38 HELP_MSG="OpenJDK distributions are available at http://jdk.java.net/."
erikj@56517 39 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
ihse@20648 40 cygwin_help $MISSING_DEPENDENCY
ihse@20648 41 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
ihse@20648 42 msys_help $MISSING_DEPENDENCY
ihse@20648 43 else
ihse@20648 44 PKGHANDLER_COMMAND=
ohair@12258 45
ihse@20648 46 case $PKGHANDLER in
ihse@20648 47 apt-get)
ihse@20648 48 apt_help $MISSING_DEPENDENCY ;;
ihse@20648 49 yum)
ihse@20648 50 yum_help $MISSING_DEPENDENCY ;;
ihse@43046 51 brew)
ihse@43046 52 brew_help $MISSING_DEPENDENCY ;;
ihse@20648 53 port)
ihse@20648 54 port_help $MISSING_DEPENDENCY ;;
ihse@20648 55 pkgutil)
ihse@20648 56 pkgutil_help $MISSING_DEPENDENCY ;;
ihse@20648 57 pkgadd)
ihse@20648 58 pkgadd_help $MISSING_DEPENDENCY ;;
mbaesken@55236 59 zypper)
mbaesken@55236 60 zypper_help $MISSING_DEPENDENCY ;;
ihse@20648 61 esac
ihse@20648 62
ihse@20648 63 if test "x$PKGHANDLER_COMMAND" != x; then
ihse@20648 64 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
ihse@20648 65 fi
ihse@20363 66 fi
erikj@13132 67 ])
ohair@12258 68
ohair@14111 69 cygwin_help() {
ihse@20363 70 case $1 in
ohair@14111 71 unzip)
ihse@20648 72 PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
ihse@20648 73 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
ihse@20648 74 ;;
ohair@14111 75 zip)
ihse@20648 76 PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
ihse@20648 77 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
ihse@20648 78 ;;
ohair@14111 79 make)
ihse@20648 80 PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
ihse@20648 81 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
ihse@20648 82 ;;
ihse@20363 83 esac
ohair@14111 84 }
ohair@14111 85
ihse@20648 86 msys_help() {
ihse@20648 87 PKGHANDLER_COMMAND=""
ihse@20648 88 }
ihse@20648 89
erikj@13132 90 apt_help() {
ihse@20363 91 case $1 in
ihse@32809 92 reduced)
ihse@32809 93 PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
ohair@12258 94 devkit)
ihse@20363 95 PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
ohair@12258 96 alsa)
ihse@20363 97 PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
ohair@12258 98 cups)
ihse@20363 99 PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
prr@47662 100 fontconfig)
prr@47662 101 PKGHANDLER_COMMAND="sudo apt-get install libfontconfig1-dev" ;;
ihse@20654 102 freetype)
ihse@20363 103 PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
ihse@32921 104 ffi)
ihse@32921 105 PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
ohair@12258 106 x11)
simonis@53626 107 PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev" ;;
ohair@12258 108 ccache)
ihse@20363 109 PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
erikj@37402 110 dtrace)
erikj@37402 111 PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
ihse@20363 112 esac
ohair@12258 113 }
ohair@12258 114
mbaesken@55236 115 zypper_help() {
mbaesken@55236 116 case $1 in
mbaesken@55236 117 devkit)
mbaesken@55236 118 PKGHANDLER_COMMAND="sudo zypper install gcc gcc-c++" ;;
mbaesken@55236 119 alsa)
mbaesken@55236 120 PKGHANDLER_COMMAND="sudo zypper install alsa-devel" ;;
mbaesken@55236 121 cups)
mbaesken@55236 122 PKGHANDLER_COMMAND="sudo zypper install cups-devel" ;;
mbaesken@55236 123 fontconfig)
mbaesken@55236 124 PKGHANDLER_COMMAND="sudo zypper install fontconfig-devel" ;;
mbaesken@55236 125 freetype)
mbaesken@55236 126 PKGHANDLER_COMMAND="sudo zypper install freetype-devel" ;;
mbaesken@55236 127 x11)
mbaesken@55236 128 PKGHANDLER_COMMAND="sudo zypper install libX11-devel libXext-devel libXrender-devel libXrandr-devel libXtst-devel libXt-devel libXi-devel" ;;
mbaesken@55236 129 ccache)
mbaesken@55236 130 PKGHANDLER_COMMAND="sudo zypper install ccache" ;;
mbaesken@55236 131 esac
mbaesken@55236 132 }
mbaesken@55236 133
erikj@13132 134 yum_help() {
ihse@20363 135 case $1 in
ohair@12258 136 devkit)
ihse@20363 137 PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
ohair@12258 138 alsa)
ihse@20363 139 PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
ohair@12258 140 cups)
ihse@20363 141 PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
prr@47662 142 fontconfig)
prr@47662 143 PKGHANDLER_COMMAND="sudo yum install fontconfig-devel" ;;
ihse@20654 144 freetype)
ihse@20363 145 PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
ohair@12258 146 x11)
simonis@53626 147 PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXrandr-devel libXi-devel" ;;
ohair@12258 148 ccache)
ihse@20363 149 PKGHANDLER_COMMAND="sudo yum install ccache" ;;
ihse@20363 150 esac
ohair@12258 151 }
ohair@12258 152
ihse@43046 153 brew_help() {
ihse@43046 154 case $1 in
ihse@43046 155 freetype)
ihse@43046 156 PKGHANDLER_COMMAND="brew install freetype" ;;
ihse@43046 157 ccache)
ihse@43046 158 PKGHANDLER_COMMAND="brew install ccache" ;;
ihse@43046 159 esac
ihse@43046 160 }
ihse@43046 161
erikj@13132 162 port_help() {
ihse@20363 163 PKGHANDLER_COMMAND=""
ohair@12258 164 }
ohair@12258 165
erikj@13132 166 pkgutil_help() {
ihse@20363 167 PKGHANDLER_COMMAND=""
ohair@12258 168 }
ohair@12258 169
erikj@13132 170 pkgadd_help() {
ihse@20363 171 PKGHANDLER_COMMAND=""
ohair@12258 172 }
erikj@13132 173
ihse@22721 174 # This function will check if we're called from the "configure" wrapper while
ihse@22721 175 # printing --help. If so, we will print out additional information that can
ihse@22721 176 # only be extracted within the autoconf script, and then exit. This must be
ihse@22721 177 # called at the very beginning in configure.ac.
ihse@22721 178 AC_DEFUN_ONCE([HELP_PRINT_ADDITIONAL_HELP_AND_EXIT],
ihse@22721 179 [
ihse@35747 180 if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
ihse@35747 181
ihse@35747 182 # Print available toolchains
ihse@22721 183 $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
ihse@22721 184 $PRINTF "Which are valid to use depends on the build platform.\n"
ihse@22721 185 for toolchain in $VALID_TOOLCHAINS_all; do
ihse@22721 186 # Use indirect variable referencing
ihse@22721 187 toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
ihse@22721 188 TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
ihse@22721 189 $PRINTF " %-10s %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
ihse@22721 190 done
erikj@37402 191 $PRINTF "\n"
erikj@37402 192
erikj@37402 193 # Print available jvm features
erikj@37402 194 $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
erikj@37402 195 $PRINTF "Which are valid to use depends on the target platform.\n "
erikj@37402 196 $PRINTF "%s " $VALID_JVM_FEATURES
erikj@37402 197 $PRINTF "\n"
ihse@22721 198
ihse@22721 199 # And now exit directly
ihse@22721 200 exit 0
ihse@22721 201 fi
ihse@22721 202 ])
ihse@22721 203
erikj@13132 204 AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
erikj@13132 205 [
ihse@20363 206 # Finally output some useful information to the user
erikj@13132 207
ihse@20363 208 printf "\n"
ihse@20363 209 printf "====================================================\n"
mduigou@22717 210 if test "x$no_create" != "xyes"; then
mduigou@22717 211 if test "x$IS_RECONFIGURE" != "xyes"; then
ihse@47275 212 printf "A new configuration has been successfully created in\n%s\n" "$OUTPUTDIR"
mduigou@22717 213 else
ihse@47275 214 printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUTDIR"
mduigou@22717 215 fi
mduigou@22717 216 else
mduigou@22717 217 if test "x$IS_RECONFIGURE" != "xyes"; then
mduigou@22717 218 printf "A configuration has been successfully checked but not created\n"
mduigou@22717 219 else
ihse@47275 220 printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUTDIR"
mduigou@22717 221 fi
mduigou@22717 222 fi
ihse@20363 223 if test "x$CONFIGURE_COMMAND_LINE" != x; then
ihse@20363 224 printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
ihse@20363 225 else
ihse@20363 226 printf "using default settings.\n"
ihse@20363 227 fi
erikj@13132 228
ihse@20363 229 printf "\n"
ihse@20363 230 printf "Configuration summary:\n"
ihse@20363 231 printf "* Debug level: $DEBUG_LEVEL\n"
simonis@23424 232 printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
erikj@37402 233 printf "* JVM variants: $JVM_VARIANTS\n"
ihse@50061 234 printf "* JVM features: "
ihse@50061 235
ihse@50061 236 for variant in $JVM_VARIANTS; do
ihse@50061 237 features_var_name=JVM_FEATURES_$variant
ihse@50061 238 JVM_FEATURES_FOR_VARIANT=${!features_var_name}
ihse@50061 239 printf "$variant: \'$JVM_FEATURES_FOR_VARIANT\' "
ihse@50061 240 done
ihse@50061 241 printf "\n"
ihse@50061 242
ihse@20363 243 printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
ihse@33926 244 printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
ohair@14111 245
ihse@20363 246 printf "\n"
ihse@20363 247 printf "Tools summary:\n"
ihse@20363 248 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
ihse@20363 249 printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
ihse@20363 250 fi
ihse@20363 251 printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
erikj@49019 252 printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
ihse@22721 253 printf "* C Compiler: Version $CC_VERSION_NUMBER (at $CC)\n"
ihse@22721 254 printf "* C++ Compiler: Version $CXX_VERSION_NUMBER (at $CXX)\n"
erikj@13132 255
ihse@20363 256 printf "\n"
ihse@20363 257 printf "Build performance summary:\n"
ihse@20363 258 printf "* Cores to use: $JOBS\n"
ihse@20363 259 printf "* Memory limit: $MEMORY_SIZE MB\n"
ihse@22474 260 if test "x$CCACHE_STATUS" != "x"; then
ihse@22474 261 printf "* ccache status: $CCACHE_STATUS\n"
ihse@22474 262 fi
ihse@20363 263 printf "\n"
erikj@13132 264
erikj@37402 265 if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
ihse@20363 266 printf "NOTE: You have requested to build more than one version of the JVM, which\n"
ihse@20363 267 printf "will result in longer build times.\n"
ihse@20363 268 printf "\n"
ihse@20363 269 fi
erikj@13132 270
ihse@20363 271 if test "x$FOUND_ALT_VARIABLES" != "x"; then
ihse@20363 272 printf "WARNING: You have old-style ALT_ environment variables set.\n"
ihse@20363 273 printf "These are not respected, and will be ignored. It is recommended\n"
ihse@20363 274 printf "that you clean your environment. The following variables are set:\n"
ihse@20363 275 printf "$FOUND_ALT_VARIABLES\n"
ihse@20363 276 printf "\n"
ihse@20363 277 fi
erikj@13132 278
ihse@20363 279 if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
ihse@20363 280 printf "WARNING: Your build output directory is not on a local disk.\n"
ihse@20363 281 printf "This will severely degrade build performance!\n"
ihse@20363 282 printf "It is recommended that you create an output directory on a local disk,\n"
ihse@20363 283 printf "and run the configure script again from that directory.\n"
ihse@20363 284 printf "\n"
ihse@20363 285 fi
erikj@13132 286
mduigou@22717 287 if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
ihse@20363 288 printf "WARNING: The result of this configuration has overridden an older\n"
ihse@20363 289 printf "configuration. You *should* run 'make clean' to make sure you get a\n"
ihse@20363 290 printf "proper build. Failure to do so might result in strange build problems.\n"
ihse@20363 291 printf "\n"
ihse@20363 292 fi
mduigou@22717 293
mduigou@22717 294 if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
mduigou@22717 295 printf "WARNING: The result of this configuration was not saved.\n"
mduigou@22717 296 printf "You should run without '--no-create | -n' to create the configuration.\n"
mduigou@22717 297 printf "\n"
mduigou@22717 298 fi
erikj@49019 299
erikj@49019 300 if test "x$UNSUPPORTED_TOOLCHAIN_VERSION" = "xyes"; then
erikj@49019 301 printf "WARNING: The toolchain version used is known to have issues. Please\n"
erikj@49019 302 printf "consider using a supported version unless you know what you are doing.\n"
erikj@49019 303 printf "\n"
erikj@49019 304 fi
erikj@13132 305 ])
ihse@27587 306
ihse@27587 307 AC_DEFUN_ONCE([HELP_REPEAT_WARNINGS],
ihse@27587 308 [
ihse@30417 309 # Locate config.log.
ihse@30417 310 if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
ihse@30417 311 CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
ihse@30417 312 elif test -e "./config.log"; then
ihse@30417 313 CONFIG_LOG_PATH="."
ihse@27587 314 fi
ihse@27587 315
ihse@30417 316 if test -e "$CONFIG_LOG_PATH/config.log"; then
ihse@30417 317 $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
ihse@30417 318 if test $? -eq 0; then
ihse@30417 319 printf "The following warnings were produced. Repeated here for convenience:\n"
ihse@30417 320 # We must quote sed expression (using []) to stop m4 from eating the [].
ihse@30417 321 $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e [ 's/^configure:[0-9]*: //' ]
ihse@30417 322 printf "\n"
ihse@30417 323 fi
ihse@30417 324 fi
ihse@27587 325 ])