aoqi@0: # aoqi@0: # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. aoqi@0: # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. aoqi@0: # aoqi@0: # This code is free software; you can redistribute it and/or modify it aoqi@0: # under the terms of the GNU General Public License version 2 only, as aoqi@0: # published by the Free Software Foundation. Oracle designates this aoqi@0: # particular file as subject to the "Classpath" exception as provided aoqi@0: # by Oracle in the LICENSE file that accompanied this code. aoqi@0: # aoqi@0: # This code is distributed in the hope that it will be useful, but WITHOUT aoqi@0: # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or aoqi@0: # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License aoqi@0: # version 2 for more details (a copy is included in the LICENSE file that aoqi@0: # accompanied this code). aoqi@0: # aoqi@0: # You should have received a copy of the GNU General Public License version aoqi@0: # 2 along with this work; if not, write to the Free Software Foundation, aoqi@0: # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. aoqi@0: # aoqi@0: # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA aoqi@0: # or visit www.oracle.com if you need additional information or have any aoqi@0: # questions. aoqi@0: # aoqi@0: aoqi@0: AC_DEFUN_ONCE([HELP_SETUP_DEPENDENCY_HELP], aoqi@0: [ aoqi@0: AC_CHECK_PROGS(PKGHANDLER, apt-get yum port pkgutil pkgadd) aoqi@0: ]) aoqi@0: aoqi@0: AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY], aoqi@0: [ aoqi@0: # Print a helpful message on how to acquire the necessary build dependency. aoqi@0: # $1 is the help tag: freetype, cups, pulse, alsa etc aoqi@0: MISSING_DEPENDENCY=$1 aoqi@0: aoqi@0: if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then aoqi@0: cygwin_help $MISSING_DEPENDENCY aoqi@0: elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then aoqi@0: msys_help $MISSING_DEPENDENCY aoqi@0: else aoqi@0: PKGHANDLER_COMMAND= aoqi@0: aoqi@0: case $PKGHANDLER in aoqi@0: apt-get) aoqi@0: apt_help $MISSING_DEPENDENCY ;; aoqi@0: yum) aoqi@0: yum_help $MISSING_DEPENDENCY ;; aoqi@0: port) aoqi@0: port_help $MISSING_DEPENDENCY ;; aoqi@0: pkgutil) aoqi@0: pkgutil_help $MISSING_DEPENDENCY ;; aoqi@0: pkgadd) aoqi@0: pkgadd_help $MISSING_DEPENDENCY ;; aoqi@0: esac aoqi@0: aoqi@0: if test "x$PKGHANDLER_COMMAND" != x; then aoqi@0: HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." aoqi@0: fi aoqi@0: fi aoqi@0: ]) aoqi@0: aoqi@0: cygwin_help() { aoqi@0: case $1 in aoqi@0: unzip) aoqi@0: PKGHANDLER_COMMAND="( cd && cmd /c setup -q -P unzip )" aoqi@0: HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." aoqi@0: ;; aoqi@0: zip) aoqi@0: PKGHANDLER_COMMAND="( cd && cmd /c setup -q -P zip )" aoqi@0: HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." aoqi@0: ;; aoqi@0: make) aoqi@0: PKGHANDLER_COMMAND="( cd && cmd /c setup -q -P make )" aoqi@0: HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." aoqi@0: ;; aoqi@0: freetype) aoqi@0: if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then aoqi@0: HELP_MSG="To install freetype, run: aoqi@0: wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe aoqi@0: chmod +x /tmp/freetype-setup.exe aoqi@0: /tmp/freetype-setup.exe aoqi@0: Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\". aoqi@0: After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll." aoqi@0: else aoqi@0: HELP_MSG="You need to build a 64-bit version of freetype. aoqi@0: This is not readily available. aoqi@0: You can find source code and build instructions on aoqi@0: http://www.freetype.org/ aoqi@0: If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically." aoqi@0: fi aoqi@0: ;; aoqi@0: esac aoqi@0: } aoqi@0: aoqi@0: msys_help() { aoqi@0: PKGHANDLER_COMMAND="" aoqi@0: } aoqi@0: aoqi@0: apt_help() { aoqi@0: case $1 in aoqi@0: devkit) aoqi@0: PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;; aoqi@0: openjdk) aoqi@0: PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;; aoqi@0: alsa) aoqi@0: PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;; aoqi@0: cups) aoqi@0: PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;; aoqi@0: freetype) aoqi@0: PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;; aoqi@0: pulse) aoqi@0: PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;; aoqi@0: x11) aoqi@0: PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;; aoqi@0: ccache) aoqi@0: PKGHANDLER_COMMAND="sudo apt-get install ccache" ;; aoqi@0: esac aoqi@0: } aoqi@0: aoqi@0: yum_help() { aoqi@0: case $1 in aoqi@0: devkit) aoqi@0: PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;; aoqi@0: openjdk) aoqi@0: PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;; aoqi@0: alsa) aoqi@0: PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;; aoqi@0: cups) aoqi@0: PKGHANDLER_COMMAND="sudo yum install cups-devel" ;; aoqi@0: freetype) aoqi@0: PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;; aoqi@0: pulse) aoqi@0: PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;; aoqi@0: x11) aoqi@0: PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;; aoqi@0: ccache) aoqi@0: PKGHANDLER_COMMAND="sudo yum install ccache" ;; aoqi@0: esac aoqi@0: } aoqi@0: aoqi@0: port_help() { aoqi@0: PKGHANDLER_COMMAND="" aoqi@0: } aoqi@0: aoqi@0: pkgutil_help() { aoqi@0: PKGHANDLER_COMMAND="" aoqi@0: } aoqi@0: aoqi@0: pkgadd_help() { aoqi@0: PKGHANDLER_COMMAND="" aoqi@0: } aoqi@0: aoqi@0: AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS], aoqi@0: [ aoqi@0: # Finally output some useful information to the user aoqi@0: aoqi@0: if test "x$CCACHE_FOUND" != x; then aoqi@0: if test "x$HAS_GOOD_CCACHE" = x; then aoqi@0: CCACHE_STATUS="installed, but disabled (version older than 3.1.4)" aoqi@0: CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading." aoqi@0: else aoqi@0: CCACHE_STATUS="installed and in use" aoqi@0: fi aoqi@0: else aoqi@0: if test "x$GCC" = xyes; then aoqi@0: CCACHE_STATUS="not installed (consider installing)" aoqi@0: CCACHE_HELP_MSG="You do not have ccache installed. Try installing it." aoqi@0: else aoqi@0: CCACHE_STATUS="not available for your system" aoqi@0: fi aoqi@0: fi aoqi@0: aoqi@0: printf "\n" aoqi@0: printf "====================================================\n" aoqi@0: printf "A new configuration has been successfully created in\n" aoqi@0: printf "$OUTPUT_ROOT\n" aoqi@0: if test "x$CONFIGURE_COMMAND_LINE" != x; then aoqi@0: printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n" aoqi@0: else aoqi@0: printf "using default settings.\n" aoqi@0: fi aoqi@0: aoqi@0: printf "\n" aoqi@0: printf "Configuration summary:\n" aoqi@0: printf "* Debug level: $DEBUG_LEVEL\n" aoqi@0: printf "* JDK variant: $JDK_VARIANT\n" aoqi@0: printf "* JVM variants: $with_jvm_variants\n" aoqi@0: printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n" aoqi@0: aoqi@0: printf "\n" aoqi@0: printf "Tools summary:\n" aoqi@0: if test "x$OPENJDK_BUILD_OS" = "xwindows"; then aoqi@0: printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n" aoqi@0: fi aoqi@0: printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n" aoqi@0: printf "* C Compiler: $CC_VENDOR version $CC_VERSION (at $CC)\n" aoqi@0: printf "* C++ Compiler: $CXX_VENDOR version $CXX_VERSION (at $CXX)\n" aoqi@0: aoqi@0: printf "\n" aoqi@0: printf "Build performance summary:\n" aoqi@0: printf "* Cores to use: $JOBS\n" aoqi@0: printf "* Memory limit: $MEMORY_SIZE MB\n" aoqi@0: printf "* ccache status: $CCACHE_STATUS\n" aoqi@0: printf "\n" aoqi@0: aoqi@0: if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then aoqi@0: printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n" aoqi@0: printf "$CCACHE_HELP_MSG\n" aoqi@0: HELP_MSG_MISSING_DEPENDENCY([ccache]) aoqi@0: printf "$HELP_MSG\n" aoqi@0: printf "\n" aoqi@0: fi aoqi@0: aoqi@0: if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then aoqi@0: printf "NOTE: You have requested to build more than one version of the JVM, which\n" aoqi@0: printf "will result in longer build times.\n" aoqi@0: printf "\n" aoqi@0: fi aoqi@0: aoqi@0: if test "x$FOUND_ALT_VARIABLES" != "x"; then aoqi@0: printf "WARNING: You have old-style ALT_ environment variables set.\n" aoqi@0: printf "These are not respected, and will be ignored. It is recommended\n" aoqi@0: printf "that you clean your environment. The following variables are set:\n" aoqi@0: printf "$FOUND_ALT_VARIABLES\n" aoqi@0: printf "\n" aoqi@0: fi aoqi@0: aoqi@0: if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then aoqi@0: printf "WARNING: Your build output directory is not on a local disk.\n" aoqi@0: printf "This will severely degrade build performance!\n" aoqi@0: printf "It is recommended that you create an output directory on a local disk,\n" aoqi@0: printf "and run the configure script again from that directory.\n" aoqi@0: printf "\n" aoqi@0: fi aoqi@0: aoqi@0: if test "x$IS_RECONFIGURE" = "xyes"; then aoqi@0: printf "WARNING: The result of this configuration has overridden an older\n" aoqi@0: printf "configuration. You *should* run 'make clean' to make sure you get a\n" aoqi@0: printf "proper build. Failure to do so might result in strange build problems.\n" aoqi@0: printf "\n" aoqi@0: fi aoqi@0: ])