Sun, 17 Feb 2013 16:44:28 -0500
Merge
ohair@425 | 1 | # |
ohair@425 | 2 | # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. |
ohair@425 | 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
ohair@425 | 4 | # |
ohair@425 | 5 | # This code is free software; you can redistribute it and/or modify it |
ohair@425 | 6 | # under the terms of the GNU General Public License version 2 only, as |
ohair@425 | 7 | # published by the Free Software Foundation. Oracle designates this |
ohair@425 | 8 | # particular file as subject to the "Classpath" exception as provided |
ohair@425 | 9 | # by Oracle in the LICENSE file that accompanied this code. |
ohair@425 | 10 | # |
ohair@425 | 11 | # This code is distributed in the hope that it will be useful, but WITHOUT |
ohair@425 | 12 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
ohair@425 | 13 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
ohair@425 | 14 | # version 2 for more details (a copy is included in the LICENSE file that |
ohair@425 | 15 | # accompanied this code). |
ohair@425 | 16 | # |
ohair@425 | 17 | # You should have received a copy of the GNU General Public License version |
ohair@425 | 18 | # 2 along with this work; if not, write to the Free Software Foundation, |
ohair@425 | 19 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
ohair@425 | 20 | # |
ohair@425 | 21 | # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ohair@425 | 22 | # or visit www.oracle.com if you need additional information or have any |
ohair@425 | 23 | # questions. |
ohair@425 | 24 | # |
ohair@425 | 25 | |
erikj@458 | 26 | AC_DEFUN_ONCE([HELP_SETUP_DEPENDENCY_HELP], |
erikj@458 | 27 | [ |
erikj@445 | 28 | AC_CHECK_PROGS(PKGHANDLER, apt-get yum port pkgutil pkgadd) |
erikj@458 | 29 | ]) |
erikj@458 | 30 | |
erikj@458 | 31 | AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY], |
erikj@458 | 32 | [ |
ohair@425 | 33 | # Print a helpful message on how to acquire the necessary build dependency. |
ohair@425 | 34 | # $1 is the help tag: freetyp2, cups, pulse, alsa etc |
ohair@425 | 35 | MISSING_DEPENDENCY=$1 |
ohair@425 | 36 | PKGHANDLER_COMMAND= |
ohair@425 | 37 | |
ohair@425 | 38 | case $PKGHANDLER in |
ohair@425 | 39 | apt-get) |
ohair@425 | 40 | apt_help $MISSING_DEPENDENCY ;; |
erikj@445 | 41 | yum) |
ohair@425 | 42 | yum_help $MISSING_DEPENDENCY ;; |
ohair@425 | 43 | port) |
ohair@425 | 44 | port_help $MISSING_DEPENDENCY ;; |
ohair@425 | 45 | pkgutil) |
ohair@425 | 46 | pkgutil_help $MISSING_DEPENDENCY ;; |
ohair@425 | 47 | pkgadd) |
ohair@425 | 48 | pkgadd_help $MISSING_DEPENDENCY ;; |
ohair@425 | 49 | * ) |
ohair@425 | 50 | break ;; |
ohair@425 | 51 | esac |
ohair@425 | 52 | |
ohair@425 | 53 | if test "x$PKGHANDLER_COMMAND" != x; then |
erikj@445 | 54 | HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." |
ohair@425 | 55 | fi |
erikj@458 | 56 | ]) |
ohair@425 | 57 | |
ohair@494 | 58 | cygwin_help() { |
ohair@494 | 59 | case $1 in |
ohair@494 | 60 | unzip) |
ohair@494 | 61 | PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;; |
ohair@494 | 62 | zip) |
ohair@494 | 63 | PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;; |
ohair@494 | 64 | make) |
ohair@494 | 65 | PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;; |
ohair@494 | 66 | * ) |
ohair@494 | 67 | break ;; |
ohair@494 | 68 | esac |
ohair@494 | 69 | } |
ohair@494 | 70 | |
erikj@458 | 71 | apt_help() { |
ohair@425 | 72 | case $1 in |
ohair@425 | 73 | devkit) |
ohair@425 | 74 | PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;; |
ohair@425 | 75 | openjdk) |
ohair@425 | 76 | PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;; |
ohair@425 | 77 | alsa) |
ohair@425 | 78 | PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;; |
ohair@425 | 79 | cups) |
ohair@425 | 80 | PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;; |
ohair@425 | 81 | freetype2) |
ohair@425 | 82 | PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;; |
ohair@425 | 83 | pulse) |
ohair@425 | 84 | PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;; |
ohair@425 | 85 | x11) |
ohair@425 | 86 | PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;; |
ohair@425 | 87 | ccache) |
ohair@425 | 88 | PKGHANDLER_COMMAND="sudo apt-get install ccache" ;; |
ohair@425 | 89 | * ) |
ohair@425 | 90 | break ;; |
ohair@425 | 91 | esac |
ohair@425 | 92 | } |
ohair@425 | 93 | |
erikj@458 | 94 | yum_help() { |
ohair@425 | 95 | case $1 in |
ohair@425 | 96 | devkit) |
ohair@425 | 97 | PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;; |
ohair@425 | 98 | openjdk) |
ohair@425 | 99 | PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;; |
ohair@425 | 100 | alsa) |
ohair@425 | 101 | PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;; |
ohair@425 | 102 | cups) |
ohair@425 | 103 | PKGHANDLER_COMMAND="sudo yum install cups-devel" ;; |
ohair@425 | 104 | freetype2) |
ohair@425 | 105 | PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;; |
ohair@425 | 106 | pulse) |
ohair@425 | 107 | PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;; |
ohair@425 | 108 | x11) |
ohair@425 | 109 | PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;; |
ohair@425 | 110 | ccache) |
ohair@425 | 111 | PKGHANDLER_COMMAND="sudo yum install ccache" ;; |
ohair@425 | 112 | * ) |
ohair@425 | 113 | break ;; |
ohair@425 | 114 | esac |
ohair@425 | 115 | } |
ohair@425 | 116 | |
erikj@458 | 117 | port_help() { |
ohair@425 | 118 | PKGHANDLER_COMMAND="" |
ohair@425 | 119 | } |
ohair@425 | 120 | |
erikj@458 | 121 | pkgutil_help() { |
ohair@425 | 122 | PKGHANDLER_COMMAND="" |
ohair@425 | 123 | } |
ohair@425 | 124 | |
erikj@458 | 125 | pkgadd_help() { |
ohair@425 | 126 | PKGHANDLER_COMMAND="" |
ohair@425 | 127 | } |
erikj@458 | 128 | |
erikj@458 | 129 | AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS], |
erikj@458 | 130 | [ |
erikj@458 | 131 | # Finally output some useful information to the user |
erikj@458 | 132 | |
erikj@458 | 133 | if test "x$CCACHE_FOUND" != x; then |
erikj@458 | 134 | if test "x$HAS_GOOD_CCACHE" = x; then |
erikj@458 | 135 | CCACHE_STATUS="installed, but disabled (version older than 3.1.4)" |
erikj@458 | 136 | CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading." |
erikj@458 | 137 | else |
erikj@458 | 138 | CCACHE_STATUS="installed and in use" |
erikj@458 | 139 | fi |
erikj@458 | 140 | else |
erikj@458 | 141 | if test "x$GCC" = xyes; then |
erikj@458 | 142 | CCACHE_STATUS="not installed (consider installing)" |
erikj@458 | 143 | CCACHE_HELP_MSG="You do not have ccache installed. Try installing it." |
erikj@458 | 144 | else |
erikj@458 | 145 | CCACHE_STATUS="not available for your system" |
erikj@458 | 146 | fi |
erikj@458 | 147 | fi |
erikj@458 | 148 | |
erikj@458 | 149 | printf "\n" |
erikj@458 | 150 | printf "====================================================\n" |
erikj@458 | 151 | printf "A new configuration has been successfully created in\n" |
erikj@458 | 152 | printf "$OUTPUT_ROOT\n" |
erikj@458 | 153 | if test "x$CONFIGURE_COMMAND_LINE" != x; then |
erikj@458 | 154 | printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n" |
erikj@458 | 155 | else |
erikj@458 | 156 | printf "using default settings.\n" |
erikj@458 | 157 | fi |
erikj@458 | 158 | |
erikj@458 | 159 | printf "\n" |
erikj@458 | 160 | printf "Configuration summary:\n" |
erikj@458 | 161 | printf "* Debug level: $DEBUG_LEVEL\n" |
erikj@458 | 162 | printf "* JDK variant: $JDK_VARIANT\n" |
erikj@458 | 163 | printf "* JVM variants: $with_jvm_variants\n" |
erikj@458 | 164 | printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n" |
ohair@494 | 165 | |
ohair@494 | 166 | printf "\n" |
ohair@494 | 167 | printf "Tools summary:\n" |
ohair@494 | 168 | if test "x$OPENJDK_BUILD_OS" = "xwindows"; then |
ohair@494 | 169 | printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n" |
ohair@494 | 170 | fi |
ohair@494 | 171 | printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n" |
ohair@494 | 172 | printf "* C Compiler: $CC_VENDOR version $CC_VERSION (at $CC)\n" |
ohair@494 | 173 | printf "* C++ Compiler: $CXX_VENDOR version $CXX_VERSION (at $CXX)\n" |
erikj@458 | 174 | |
erikj@458 | 175 | printf "\n" |
erikj@458 | 176 | printf "Build performance summary:\n" |
erikj@458 | 177 | printf "* Cores to use: $NUM_CORES\n" |
erikj@458 | 178 | printf "* Memory limit: $MEMORY_SIZE MB\n" |
erikj@458 | 179 | printf "* ccache status: $CCACHE_STATUS\n" |
erikj@458 | 180 | printf "\n" |
erikj@458 | 181 | |
erikj@458 | 182 | if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then |
erikj@458 | 183 | printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n" |
erikj@458 | 184 | printf "$CCACHE_HELP_MSG\n" |
erikj@458 | 185 | HELP_MSG_MISSING_DEPENDENCY([ccache]) |
erikj@458 | 186 | printf "$HELP_MSG\n" |
erikj@458 | 187 | printf "\n" |
erikj@458 | 188 | fi |
erikj@458 | 189 | |
erikj@458 | 190 | if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then |
erikj@458 | 191 | printf "NOTE: You have requested to build more than one version of the JVM, which\n" |
erikj@458 | 192 | printf "will result in longer build times.\n" |
erikj@458 | 193 | printf "\n" |
erikj@458 | 194 | fi |
erikj@458 | 195 | |
erikj@458 | 196 | if test "x$FOUND_ALT_VARIABLES" != "x"; then |
erikj@458 | 197 | printf "WARNING: You have old-style ALT_ environment variables set.\n" |
erikj@458 | 198 | printf "These are not respected, and will be ignored. It is recommended\n" |
erikj@458 | 199 | printf "that you clean your environment. The following variables are set:\n" |
erikj@458 | 200 | printf "$FOUND_ALT_VARIABLES\n" |
erikj@458 | 201 | printf "\n" |
erikj@458 | 202 | fi |
erikj@458 | 203 | |
erikj@458 | 204 | if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then |
erikj@458 | 205 | printf "WARNING: Your build output directory is not on a local disk.\n" |
erikj@458 | 206 | printf "This will severely degrade build performance!\n" |
erikj@458 | 207 | printf "It is recommended that you create an output directory on a local disk,\n" |
erikj@458 | 208 | printf "and run the configure script again from that directory.\n" |
erikj@458 | 209 | printf "\n" |
erikj@458 | 210 | fi |
erikj@458 | 211 | |
erikj@458 | 212 | if test "x$IS_RECONFIGURE" = "xyes"; then |
erikj@458 | 213 | printf "WARNING: The result of this configuration has overridden an older\n" |
erikj@458 | 214 | printf "configuration. You *should* run 'make clean' to make sure you get a\n" |
erikj@458 | 215 | printf "proper build. Failure to do so might result in strange build problems.\n" |
erikj@458 | 216 | printf "\n" |
erikj@458 | 217 | fi |
erikj@458 | 218 | ]) |