help.m4 revision 971:3e7caedda189
1178848Scokane# 2178848Scokane# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3178848Scokane# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4178848Scokane# 5178848Scokane# This code is free software; you can redistribute it and/or modify it 6178848Scokane# under the terms of the GNU General Public License version 2 only, as 7178848Scokane# published by the Free Software Foundation. Oracle designates this 8104349Sphk# particular file as subject to the "Classpath" exception as provided 9104349Sphk# by Oracle in the LICENSE file that accompanied this code. 10104349Sphk# 11104349Sphk# This code is distributed in the hope that it will be useful, but WITHOUT 12104349Sphk# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13104349Sphk# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14104349Sphk# version 2 for more details (a copy is included in the LICENSE file that 15104349Sphk# accompanied this code). 16104349Sphk# 17104349Sphk# You should have received a copy of the GNU General Public License version 18104349Sphk# 2 along with this work; if not, write to the Free Software Foundation, 19104349Sphk# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20104349Sphk# 21104349Sphk# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22104349Sphk# or visit www.oracle.com if you need additional information or have any 23104349Sphk# questions. 24104349Sphk# 25104349Sphk 26104349SphkAC_DEFUN_ONCE([HELP_SETUP_DEPENDENCY_HELP], 27104349Sphk[ 28104349Sphk AC_CHECK_PROGS(PKGHANDLER, apt-get yum port pkgutil pkgadd) 29178848Scokane]) 30104349Sphk 31104349SphkAC_DEFUN([HELP_MSG_MISSING_DEPENDENCY], 32104349Sphk[ 33104349Sphk # Print a helpful message on how to acquire the necessary build dependency. 34104349Sphk # $1 is the help tag: freetype, cups, pulse, alsa etc 35104349Sphk MISSING_DEPENDENCY=$1 36104349Sphk 37104349Sphk if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 38104349Sphk cygwin_help $MISSING_DEPENDENCY 39178848Scokane elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 40104349Sphk msys_help $MISSING_DEPENDENCY 41104349Sphk else 42104349Sphk PKGHANDLER_COMMAND= 43104349Sphk 44104349Sphk case $PKGHANDLER in 45104349Sphk apt-get) 46104349Sphk apt_help $MISSING_DEPENDENCY ;; 47178848Scokane yum) 48104349Sphk yum_help $MISSING_DEPENDENCY ;; 49104349Sphk port) 50104349Sphk port_help $MISSING_DEPENDENCY ;; 51104349Sphk pkgutil) 52104349Sphk pkgutil_help $MISSING_DEPENDENCY ;; 53104349Sphk pkgadd) 54104349Sphk pkgadd_help $MISSING_DEPENDENCY ;; 55104349Sphk esac 56104349Sphk 57104349Sphk if test "x$PKGHANDLER_COMMAND" != x; then 58104349Sphk HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 59104349Sphk fi 60104349Sphk fi 61104349Sphk]) 62104349Sphk 63104349Sphkcygwin_help() { 64104349Sphk case $1 in 65104349Sphk unzip) 66104349Sphk PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )" 67104349Sphk HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 68104349Sphk ;; 69104349Sphk zip) 70104349Sphk PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )" 71104349Sphk HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 72104349Sphk ;; 73104349Sphk make) 74104349Sphk PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )" 75104349Sphk HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 76104349Sphk ;; 77104349Sphk freetype) 78104349Sphk if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 79104349Sphk HELP_MSG="To install freetype, run: 80104349Sphkwget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe 81104349Sphkchmod +x /tmp/freetype-setup.exe 82104349Sphk/tmp/freetype-setup.exe 83104349SphkFollow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\". 84104349SphkAfter installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll." 85104349Sphk else 86104349Sphk HELP_MSG="You need to build a 64-bit version of freetype. 87104349SphkThis is not readily available. 88104349SphkYou can find source code and build instructions on 89104349Sphkhttp://www.freetype.org/ 90104349SphkIf you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically." 91104349Sphk fi 92104349Sphk ;; 93104349Sphk esac 94104349Sphk} 95104349Sphk 96104349Sphkmsys_help() { 97104349Sphk PKGHANDLER_COMMAND="" 98104349Sphk} 99104349Sphk 100104349Sphkapt_help() { 101104349Sphk case $1 in 102104349Sphk devkit) 103104349Sphk PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;; 104104349Sphk openjdk) 105104349Sphk PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;; 106104349Sphk alsa) 107104349Sphk PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;; 108104349Sphk cups) 109104349Sphk PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;; 110104349Sphk freetype) 111104349Sphk PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;; 112104349Sphk pulse) 113104349Sphk PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;; 114178848Scokane x11) 115178848Scokane PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;; 116 ccache) 117 PKGHANDLER_COMMAND="sudo apt-get install ccache" ;; 118 esac 119} 120 121yum_help() { 122 case $1 in 123 devkit) 124 PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;; 125 openjdk) 126 PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;; 127 alsa) 128 PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;; 129 cups) 130 PKGHANDLER_COMMAND="sudo yum install cups-devel" ;; 131 freetype) 132 PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;; 133 pulse) 134 PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;; 135 x11) 136 PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;; 137 ccache) 138 PKGHANDLER_COMMAND="sudo yum install ccache" ;; 139 esac 140} 141 142port_help() { 143 PKGHANDLER_COMMAND="" 144} 145 146pkgutil_help() { 147 PKGHANDLER_COMMAND="" 148} 149 150pkgadd_help() { 151 PKGHANDLER_COMMAND="" 152} 153 154AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS], 155[ 156 # Finally output some useful information to the user 157 158 printf "\n" 159 printf "====================================================\n" 160 if test "x$no_create" != "xyes"; then 161 if test "x$IS_RECONFIGURE" != "xyes"; then 162 printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT" 163 else 164 printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT" 165 fi 166 else 167 if test "x$IS_RECONFIGURE" != "xyes"; then 168 printf "A configuration has been successfully checked but not created\n" 169 else 170 printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT" 171 fi 172 fi 173 if test "x$CONFIGURE_COMMAND_LINE" != x; then 174 printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n" 175 else 176 printf "using default settings.\n" 177 fi 178 179 printf "\n" 180 printf "Configuration summary:\n" 181 printf "* Debug level: $DEBUG_LEVEL\n" 182 printf "* JDK variant: $JDK_VARIANT\n" 183 printf "* JVM variants: $with_jvm_variants\n" 184 printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n" 185 186 printf "\n" 187 printf "Tools summary:\n" 188 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 189 printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n" 190 fi 191 printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n" 192 printf "* C Compiler: $CC_VENDOR version $CC_VERSION (at $CC)\n" 193 printf "* C++ Compiler: $CXX_VENDOR version $CXX_VERSION (at $CXX)\n" 194 195 printf "\n" 196 printf "Build performance summary:\n" 197 printf "* Cores to use: $JOBS\n" 198 printf "* Memory limit: $MEMORY_SIZE MB\n" 199 if test "x$CCACHE_STATUS" != "x"; then 200 printf "* ccache status: $CCACHE_STATUS\n" 201 fi 202 printf "\n" 203 204 if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then 205 printf "NOTE: You have requested to build more than one version of the JVM, which\n" 206 printf "will result in longer build times.\n" 207 printf "\n" 208 fi 209 210 if test "x$FOUND_ALT_VARIABLES" != "x"; then 211 printf "WARNING: You have old-style ALT_ environment variables set.\n" 212 printf "These are not respected, and will be ignored. It is recommended\n" 213 printf "that you clean your environment. The following variables are set:\n" 214 printf "$FOUND_ALT_VARIABLES\n" 215 printf "\n" 216 fi 217 218 if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then 219 printf "WARNING: Your build output directory is not on a local disk.\n" 220 printf "This will severely degrade build performance!\n" 221 printf "It is recommended that you create an output directory on a local disk,\n" 222 printf "and run the configure script again from that directory.\n" 223 printf "\n" 224 fi 225 226 if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then 227 printf "WARNING: The result of this configuration has overridden an older\n" 228 printf "configuration. You *should* run 'make clean' to make sure you get a\n" 229 printf "proper build. Failure to do so might result in strange build problems.\n" 230 printf "\n" 231 fi 232 233 if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then 234 printf "WARNING: The result of this configuration was not saved.\n" 235 printf "You should run without '--no-create | -n' to create the configuration.\n" 236 printf "\n" 237 fi 238]) 239