annotate make/autoconf/help.m4 @ 51872:0ce279d8c9cd

8207941: javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java fails on machines without Arial font [testbug] Reviewed-by: goetz, psadhukhan
author mbaesken
date Tue, 24 Jul 2018 09:27:42 +0200
parents 3375a8039fde
children 247580edbf9d 2d18e5ed0f8d
rev   line source
ohair@12258 1 #
ihse@50061 2 # Copyright (c) 2011, 2018, 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 [
ihse@43046 28 AC_CHECK_PROGS(PKGHANDLER, 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
ihse@20648 37 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
ihse@20648 38 cygwin_help $MISSING_DEPENDENCY
ihse@20648 39 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
ihse@20648 40 msys_help $MISSING_DEPENDENCY
ihse@20648 41 else
ihse@20648 42 PKGHANDLER_COMMAND=
ohair@12258 43
ihse@20648 44 case $PKGHANDLER in
ihse@20648 45 apt-get)
ihse@20648 46 apt_help $MISSING_DEPENDENCY ;;
ihse@20648 47 yum)
ihse@20648 48 yum_help $MISSING_DEPENDENCY ;;
ihse@43046 49 brew)
ihse@43046 50 brew_help $MISSING_DEPENDENCY ;;
ihse@20648 51 port)
ihse@20648 52 port_help $MISSING_DEPENDENCY ;;
ihse@20648 53 pkgutil)
ihse@20648 54 pkgutil_help $MISSING_DEPENDENCY ;;
ihse@20648 55 pkgadd)
ihse@20648 56 pkgadd_help $MISSING_DEPENDENCY ;;
ihse@20648 57 esac
ihse@20648 58
ihse@20648 59 if test "x$PKGHANDLER_COMMAND" != x; then
ihse@20648 60 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
ihse@20648 61 fi
ihse@20363 62 fi
erikj@13132 63 ])
ohair@12258 64
ohair@14111 65 cygwin_help() {
ihse@20363 66 case $1 in
ohair@14111 67 unzip)
ihse@20648 68 PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
ihse@20648 69 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
ihse@20648 70 ;;
ohair@14111 71 zip)
ihse@20648 72 PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
ihse@20648 73 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
ihse@20648 74 ;;
ohair@14111 75 make)
ihse@20648 76 PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
ihse@20648 77 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
ihse@20648 78 ;;
ihse@20363 79 esac
ohair@14111 80 }
ohair@14111 81
ihse@20648 82 msys_help() {
ihse@20648 83 PKGHANDLER_COMMAND=""
ihse@20648 84 }
ihse@20648 85
erikj@13132 86 apt_help() {
ihse@20363 87 case $1 in
ihse@32809 88 reduced)
ihse@32809 89 PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
ohair@12258 90 devkit)
ihse@20363 91 PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
ohair@12258 92 openjdk)
erikj@36296 93 PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
ohair@12258 94 alsa)
ihse@20363 95 PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
ohair@12258 96 cups)
ihse@20363 97 PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
prr@47662 98 fontconfig)
prr@47662 99 PKGHANDLER_COMMAND="sudo apt-get install libfontconfig1-dev" ;;
ihse@20654 100 freetype)
ihse@20363 101 PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
ihse@32921 102 ffi)
ihse@32921 103 PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
ohair@12258 104 x11)
stsmirno@42422 105 PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
ohair@12258 106 ccache)
ihse@20363 107 PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
erikj@37402 108 dtrace)
erikj@37402 109 PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
ihse@20363 110 esac
ohair@12258 111 }
ohair@12258 112
erikj@13132 113 yum_help() {
ihse@20363 114 case $1 in
ohair@12258 115 devkit)
ihse@20363 116 PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
ohair@12258 117 openjdk)
erikj@36296 118 PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
ohair@12258 119 alsa)
ihse@20363 120 PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
ohair@12258 121 cups)
ihse@20363 122 PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
prr@47662 123 fontconfig)
prr@47662 124 PKGHANDLER_COMMAND="sudo yum install fontconfig-devel" ;;
ihse@20654 125 freetype)
ihse@20363 126 PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
ohair@12258 127 x11)
ihse@27330 128 PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
ohair@12258 129 ccache)
ihse@20363 130 PKGHANDLER_COMMAND="sudo yum install ccache" ;;
ihse@20363 131 esac
ohair@12258 132 }
ohair@12258 133
ihse@43046 134 brew_help() {
ihse@43046 135 case $1 in
ihse@43046 136 openjdk)
ihse@43046 137 PKGHANDLER_COMMAND="brew cask install java" ;;
ihse@43046 138 freetype)
ihse@43046 139 PKGHANDLER_COMMAND="brew install freetype" ;;
ihse@43046 140 ccache)
ihse@43046 141 PKGHANDLER_COMMAND="brew install ccache" ;;
ihse@43046 142 esac
ihse@43046 143 }
ihse@43046 144
erikj@13132 145 port_help() {
ihse@20363 146 PKGHANDLER_COMMAND=""
ohair@12258 147 }
ohair@12258 148
erikj@13132 149 pkgutil_help() {
ihse@20363 150 PKGHANDLER_COMMAND=""
ohair@12258 151 }
ohair@12258 152
erikj@13132 153 pkgadd_help() {
ihse@20363 154 PKGHANDLER_COMMAND=""
ohair@12258 155 }
erikj@13132 156
ihse@22721 157 # This function will check if we're called from the "configure" wrapper while
ihse@22721 158 # printing --help. If so, we will print out additional information that can
ihse@22721 159 # only be extracted within the autoconf script, and then exit. This must be
ihse@22721 160 # called at the very beginning in configure.ac.
ihse@22721 161 AC_DEFUN_ONCE([HELP_PRINT_ADDITIONAL_HELP_AND_EXIT],
ihse@22721 162 [
ihse@35747 163 if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
ihse@35747 164
ihse@35747 165 # Print available toolchains
ihse@22721 166 $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
ihse@22721 167 $PRINTF "Which are valid to use depends on the build platform.\n"
ihse@22721 168 for toolchain in $VALID_TOOLCHAINS_all; do
ihse@22721 169 # Use indirect variable referencing
ihse@22721 170 toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
ihse@22721 171 TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
ihse@22721 172 $PRINTF " %-10s %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
ihse@22721 173 done
erikj@37402 174 $PRINTF "\n"
erikj@37402 175
erikj@37402 176 # Print available jvm features
erikj@37402 177 $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
erikj@37402 178 $PRINTF "Which are valid to use depends on the target platform.\n "
erikj@37402 179 $PRINTF "%s " $VALID_JVM_FEATURES
erikj@37402 180 $PRINTF "\n"
ihse@22721 181
ihse@22721 182 # And now exit directly
ihse@22721 183 exit 0
ihse@22721 184 fi
ihse@22721 185 ])
ihse@22721 186
erikj@13132 187 AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
erikj@13132 188 [
ihse@20363 189 # Finally output some useful information to the user
erikj@13132 190
ihse@20363 191 printf "\n"
ihse@20363 192 printf "====================================================\n"
mduigou@22717 193 if test "x$no_create" != "xyes"; then
mduigou@22717 194 if test "x$IS_RECONFIGURE" != "xyes"; then
ihse@47275 195 printf "A new configuration has been successfully created in\n%s\n" "$OUTPUTDIR"
mduigou@22717 196 else
ihse@47275 197 printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUTDIR"
mduigou@22717 198 fi
mduigou@22717 199 else
mduigou@22717 200 if test "x$IS_RECONFIGURE" != "xyes"; then
mduigou@22717 201 printf "A configuration has been successfully checked but not created\n"
mduigou@22717 202 else
ihse@47275 203 printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUTDIR"
mduigou@22717 204 fi
mduigou@22717 205 fi
ihse@20363 206 if test "x$CONFIGURE_COMMAND_LINE" != x; then
ihse@20363 207 printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
ihse@20363 208 else
ihse@20363 209 printf "using default settings.\n"
ihse@20363 210 fi
erikj@13132 211
ihse@20363 212 printf "\n"
ihse@20363 213 printf "Configuration summary:\n"
ihse@20363 214 printf "* Debug level: $DEBUG_LEVEL\n"
simonis@23424 215 printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
erikj@37402 216 printf "* JVM variants: $JVM_VARIANTS\n"
ihse@50061 217 printf "* JVM features: "
ihse@50061 218
ihse@50061 219 for variant in $JVM_VARIANTS; do
ihse@50061 220 features_var_name=JVM_FEATURES_$variant
ihse@50061 221 JVM_FEATURES_FOR_VARIANT=${!features_var_name}
ihse@50061 222 printf "$variant: \'$JVM_FEATURES_FOR_VARIANT\' "
ihse@50061 223 done
ihse@50061 224 printf "\n"
ihse@50061 225
ihse@20363 226 printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
ihse@33926 227 printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
ohair@14111 228
ihse@20363 229 printf "\n"
ihse@20363 230 printf "Tools summary:\n"
ihse@20363 231 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
ihse@20363 232 printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
ihse@20363 233 fi
ihse@20363 234 printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
erikj@49019 235 printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
ihse@22721 236 printf "* C Compiler: Version $CC_VERSION_NUMBER (at $CC)\n"
ihse@22721 237 printf "* C++ Compiler: Version $CXX_VERSION_NUMBER (at $CXX)\n"
erikj@13132 238
ihse@20363 239 printf "\n"
ihse@20363 240 printf "Build performance summary:\n"
ihse@20363 241 printf "* Cores to use: $JOBS\n"
ihse@20363 242 printf "* Memory limit: $MEMORY_SIZE MB\n"
ihse@22474 243 if test "x$CCACHE_STATUS" != "x"; then
ihse@22474 244 printf "* ccache status: $CCACHE_STATUS\n"
ihse@22474 245 fi
ihse@20363 246 printf "\n"
erikj@13132 247
erikj@37402 248 if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
ihse@20363 249 printf "NOTE: You have requested to build more than one version of the JVM, which\n"
ihse@20363 250 printf "will result in longer build times.\n"
ihse@20363 251 printf "\n"
ihse@20363 252 fi
erikj@13132 253
ihse@20363 254 if test "x$FOUND_ALT_VARIABLES" != "x"; then
ihse@20363 255 printf "WARNING: You have old-style ALT_ environment variables set.\n"
ihse@20363 256 printf "These are not respected, and will be ignored. It is recommended\n"
ihse@20363 257 printf "that you clean your environment. The following variables are set:\n"
ihse@20363 258 printf "$FOUND_ALT_VARIABLES\n"
ihse@20363 259 printf "\n"
ihse@20363 260 fi
erikj@13132 261
ihse@20363 262 if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
ihse@20363 263 printf "WARNING: Your build output directory is not on a local disk.\n"
ihse@20363 264 printf "This will severely degrade build performance!\n"
ihse@20363 265 printf "It is recommended that you create an output directory on a local disk,\n"
ihse@20363 266 printf "and run the configure script again from that directory.\n"
ihse@20363 267 printf "\n"
ihse@20363 268 fi
erikj@13132 269
mduigou@22717 270 if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
ihse@20363 271 printf "WARNING: The result of this configuration has overridden an older\n"
ihse@20363 272 printf "configuration. You *should* run 'make clean' to make sure you get a\n"
ihse@20363 273 printf "proper build. Failure to do so might result in strange build problems.\n"
ihse@20363 274 printf "\n"
ihse@20363 275 fi
mduigou@22717 276
mduigou@22717 277 if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
mduigou@22717 278 printf "WARNING: The result of this configuration was not saved.\n"
mduigou@22717 279 printf "You should run without '--no-create | -n' to create the configuration.\n"
mduigou@22717 280 printf "\n"
mduigou@22717 281 fi
erikj@49019 282
erikj@49019 283 if test "x$UNSUPPORTED_TOOLCHAIN_VERSION" = "xyes"; then
erikj@49019 284 printf "WARNING: The toolchain version used is known to have issues. Please\n"
erikj@49019 285 printf "consider using a supported version unless you know what you are doing.\n"
erikj@49019 286 printf "\n"
erikj@49019 287 fi
erikj@13132 288 ])
ihse@27587 289
ihse@27587 290 AC_DEFUN_ONCE([HELP_REPEAT_WARNINGS],
ihse@27587 291 [
ihse@30417 292 # Locate config.log.
ihse@30417 293 if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
ihse@30417 294 CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
ihse@30417 295 elif test -e "./config.log"; then
ihse@30417 296 CONFIG_LOG_PATH="."
ihse@27587 297 fi
ihse@27587 298
ihse@30417 299 if test -e "$CONFIG_LOG_PATH/config.log"; then
ihse@30417 300 $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
ihse@30417 301 if test $? -eq 0; then
ihse@30417 302 printf "The following warnings were produced. Repeated here for convenience:\n"
ihse@30417 303 # We must quote sed expression (using []) to stop m4 from eating the [].
ihse@30417 304 $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e [ 's/^configure:[0-9]*: //' ]
ihse@30417 305 printf "\n"
ihse@30417 306 fi
ihse@30417 307 fi
ihse@27587 308 ])