common/autoconf/help.m4

changeset 972
f3697e0783e2
parent 971
584dc2e95e04
parent 868
6f19b2440412
child 1133
50aaf272884f
child 2203
28b247535e18
     1.1 --- a/common/autoconf/help.m4	Thu Sep 12 12:29:17 2013 -0700
     1.2 +++ b/common/autoconf/help.m4	Tue Nov 05 17:33:48 2013 -0800
     1.3 @@ -25,186 +25,219 @@
     1.4  
     1.5  AC_DEFUN_ONCE([HELP_SETUP_DEPENDENCY_HELP],
     1.6  [
     1.7 -    AC_CHECK_PROGS(PKGHANDLER, apt-get yum port pkgutil pkgadd)
     1.8 +  AC_CHECK_PROGS(PKGHANDLER, apt-get yum port pkgutil pkgadd)
     1.9  ])
    1.10  
    1.11  AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
    1.12  [
    1.13 -    # Print a helpful message on how to acquire the necessary build dependency.
    1.14 -    # $1 is the help tag: freetyp2, cups, pulse, alsa etc
    1.15 -    MISSING_DEPENDENCY=$1
    1.16 +  # Print a helpful message on how to acquire the necessary build dependency.
    1.17 +  # $1 is the help tag: freetype, cups, pulse, alsa etc
    1.18 +  MISSING_DEPENDENCY=$1
    1.19 +
    1.20 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    1.21 +    cygwin_help $MISSING_DEPENDENCY
    1.22 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    1.23 +    msys_help $MISSING_DEPENDENCY
    1.24 +  else
    1.25      PKGHANDLER_COMMAND=
    1.26  
    1.27      case $PKGHANDLER in
    1.28 -	apt-get)
    1.29 -                apt_help     $MISSING_DEPENDENCY ;;
    1.30 -	yum)
    1.31 -                yum_help     $MISSING_DEPENDENCY ;;
    1.32 -	port)
    1.33 -                port_help    $MISSING_DEPENDENCY ;;
    1.34 -	pkgutil)
    1.35 -                pkgutil_help $MISSING_DEPENDENCY ;;
    1.36 -	pkgadd)
    1.37 -                pkgadd_help  $MISSING_DEPENDENCY ;;
    1.38 +      apt-get)
    1.39 +        apt_help     $MISSING_DEPENDENCY ;;
    1.40 +      yum)
    1.41 +        yum_help     $MISSING_DEPENDENCY ;;
    1.42 +      port)
    1.43 +        port_help    $MISSING_DEPENDENCY ;;
    1.44 +      pkgutil)
    1.45 +        pkgutil_help $MISSING_DEPENDENCY ;;
    1.46 +      pkgadd)
    1.47 +        pkgadd_help  $MISSING_DEPENDENCY ;;
    1.48      esac
    1.49  
    1.50      if test "x$PKGHANDLER_COMMAND" != x; then
    1.51 -        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
    1.52 +      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
    1.53      fi
    1.54 +  fi
    1.55  ])
    1.56  
    1.57  cygwin_help() {
    1.58 -    case $1 in
    1.59 +  case $1 in
    1.60      unzip)
    1.61 -        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
    1.62 +      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
    1.63 +      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
    1.64 +      ;;
    1.65      zip)
    1.66 -        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
    1.67 +      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
    1.68 +      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
    1.69 +      ;;
    1.70      make)
    1.71 -        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
    1.72 -    esac
    1.73 +      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
    1.74 +      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
    1.75 +      ;;
    1.76 +    freetype)
    1.77 +      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
    1.78 +        HELP_MSG="To install freetype, run:
    1.79 +wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
    1.80 +chmod +x /tmp/freetype-setup.exe
    1.81 +/tmp/freetype-setup.exe
    1.82 +Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
    1.83 +After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
    1.84 +      else
    1.85 +        HELP_MSG="You need to build a 64-bit version of freetype.
    1.86 +This is not readily available.
    1.87 +You can find source code and build instructions on
    1.88 +http://www.freetype.org/
    1.89 +If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
    1.90 +      fi
    1.91 +      ;;
    1.92 +  esac
    1.93 +}
    1.94 +
    1.95 +msys_help() {
    1.96 +  PKGHANDLER_COMMAND=""
    1.97  }
    1.98  
    1.99  apt_help() {
   1.100 -    case $1 in
   1.101 +  case $1 in
   1.102      devkit)
   1.103 -        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
   1.104 +      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
   1.105      openjdk)
   1.106 -        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
   1.107 +      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
   1.108      alsa)
   1.109 -        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
   1.110 +      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
   1.111      cups)
   1.112 -        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
   1.113 -    freetype2)
   1.114 -        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
   1.115 +      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
   1.116 +    freetype)
   1.117 +      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
   1.118      pulse)
   1.119 -        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
   1.120 +      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
   1.121      x11)
   1.122 -        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
   1.123 +      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
   1.124      ccache)
   1.125 -        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
   1.126 -    esac
   1.127 +      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
   1.128 +  esac
   1.129  }
   1.130  
   1.131  yum_help() {
   1.132 -    case $1 in
   1.133 +  case $1 in
   1.134      devkit)
   1.135 -        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
   1.136 +      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
   1.137      openjdk)
   1.138 -        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
   1.139 +      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
   1.140      alsa)
   1.141 -        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
   1.142 +      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
   1.143      cups)
   1.144 -        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
   1.145 -    freetype2)
   1.146 -        PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
   1.147 +      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
   1.148 +    freetype)
   1.149 +      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
   1.150      pulse)
   1.151 -        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
   1.152 +      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
   1.153      x11)
   1.154 -        PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
   1.155 +      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
   1.156      ccache)
   1.157 -        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
   1.158 -    esac
   1.159 +      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
   1.160 +  esac
   1.161  }
   1.162  
   1.163  port_help() {
   1.164 -    PKGHANDLER_COMMAND=""
   1.165 +  PKGHANDLER_COMMAND=""
   1.166  }
   1.167  
   1.168  pkgutil_help() {
   1.169 -    PKGHANDLER_COMMAND=""
   1.170 +  PKGHANDLER_COMMAND=""
   1.171  }
   1.172  
   1.173  pkgadd_help() {
   1.174 -    PKGHANDLER_COMMAND=""
   1.175 +  PKGHANDLER_COMMAND=""
   1.176  }
   1.177  
   1.178  AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
   1.179  [
   1.180 -# Finally output some useful information to the user
   1.181 +  # Finally output some useful information to the user
   1.182  
   1.183 -if test "x$CCACHE_FOUND" != x; then
   1.184 -	if  test "x$HAS_GOOD_CCACHE" = x; then
   1.185 -		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
   1.186 -		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
   1.187 -	else
   1.188 -		CCACHE_STATUS="installed and in use"
   1.189 -	fi
   1.190 -else
   1.191 -	if test "x$GCC" = xyes; then
   1.192 -		CCACHE_STATUS="not installed (consider installing)"
   1.193 -		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
   1.194 -	else
   1.195 -		CCACHE_STATUS="not available for your system"
   1.196 -	fi
   1.197 -fi
   1.198 +  if test "x$CCACHE_FOUND" != x; then
   1.199 +    if  test "x$HAS_GOOD_CCACHE" = x; then
   1.200 +      CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
   1.201 +      CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
   1.202 +    else
   1.203 +      CCACHE_STATUS="installed and in use"
   1.204 +    fi
   1.205 +  else
   1.206 +    if test "x$GCC" = xyes; then
   1.207 +      CCACHE_STATUS="not installed (consider installing)"
   1.208 +      CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
   1.209 +    else
   1.210 +      CCACHE_STATUS="not available for your system"
   1.211 +    fi
   1.212 +  fi
   1.213  
   1.214 -printf "\n"
   1.215 -printf "====================================================\n"
   1.216 -printf "A new configuration has been successfully created in\n"
   1.217 -printf "$OUTPUT_ROOT\n"
   1.218 -if test "x$CONFIGURE_COMMAND_LINE" != x; then
   1.219 -	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
   1.220 -else
   1.221 -	printf "using default settings.\n"
   1.222 -fi
   1.223 +  printf "\n"
   1.224 +  printf "====================================================\n"
   1.225 +  printf "A new configuration has been successfully created in\n"
   1.226 +  printf "$OUTPUT_ROOT\n"
   1.227 +  if test "x$CONFIGURE_COMMAND_LINE" != x; then
   1.228 +    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
   1.229 +  else
   1.230 +    printf "using default settings.\n"
   1.231 +  fi
   1.232  
   1.233 -printf "\n"
   1.234 -printf "Configuration summary:\n"
   1.235 -printf "* Debug level:    $DEBUG_LEVEL\n"
   1.236 -printf "* JDK variant:    $JDK_VARIANT\n"
   1.237 -printf "* JVM variants:   $with_jvm_variants\n"
   1.238 -printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
   1.239 +  printf "\n"
   1.240 +  printf "Configuration summary:\n"
   1.241 +  printf "* Debug level:    $DEBUG_LEVEL\n"
   1.242 +  printf "* JDK variant:    $JDK_VARIANT\n"
   1.243 +  printf "* JVM variants:   $with_jvm_variants\n"
   1.244 +  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
   1.245  
   1.246 -printf "\n"
   1.247 -printf "Tools summary:\n"
   1.248 -if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
   1.249 -  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
   1.250 -fi
   1.251 -printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
   1.252 -printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
   1.253 -printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
   1.254 +  printf "\n"
   1.255 +  printf "Tools summary:\n"
   1.256 +  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
   1.257 +    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
   1.258 +  fi
   1.259 +  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
   1.260 +  printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
   1.261 +  printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
   1.262  
   1.263 -printf "\n"
   1.264 -printf "Build performance summary:\n"
   1.265 -printf "* Cores to use:   $JOBS\n"
   1.266 -printf "* Memory limit:   $MEMORY_SIZE MB\n"
   1.267 -printf "* ccache status:  $CCACHE_STATUS\n"
   1.268 -printf "\n"
   1.269 +  printf "\n"
   1.270 +  printf "Build performance summary:\n"
   1.271 +  printf "* Cores to use:   $JOBS\n"
   1.272 +  printf "* Memory limit:   $MEMORY_SIZE MB\n"
   1.273 +  printf "* ccache status:  $CCACHE_STATUS\n"
   1.274 +  printf "\n"
   1.275  
   1.276 -if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
   1.277 -	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
   1.278 -	printf "$CCACHE_HELP_MSG\n"
   1.279 -	HELP_MSG_MISSING_DEPENDENCY([ccache])
   1.280 -	printf "$HELP_MSG\n"
   1.281 -	printf "\n"
   1.282 -fi
   1.283 +  if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
   1.284 +    printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
   1.285 +    printf "$CCACHE_HELP_MSG\n"
   1.286 +    HELP_MSG_MISSING_DEPENDENCY([ccache])
   1.287 +    printf "$HELP_MSG\n"
   1.288 +    printf "\n"
   1.289 +  fi
   1.290  
   1.291 -if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
   1.292 -	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
   1.293 -	printf "will result in longer build times.\n"
   1.294 -	printf "\n"
   1.295 -fi
   1.296 +  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
   1.297 +    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
   1.298 +    printf "will result in longer build times.\n"
   1.299 +    printf "\n"
   1.300 +  fi
   1.301  
   1.302 -if test "x$FOUND_ALT_VARIABLES" != "x"; then
   1.303 -	printf "WARNING: You have old-style ALT_ environment variables set.\n"
   1.304 -	printf "These are not respected, and will be ignored. It is recommended\n"
   1.305 -	printf "that you clean your environment. The following variables are set:\n"
   1.306 -	printf "$FOUND_ALT_VARIABLES\n"
   1.307 -	printf "\n"
   1.308 -fi
   1.309 +  if test "x$FOUND_ALT_VARIABLES" != "x"; then
   1.310 +    printf "WARNING: You have old-style ALT_ environment variables set.\n"
   1.311 +    printf "These are not respected, and will be ignored. It is recommended\n"
   1.312 +    printf "that you clean your environment. The following variables are set:\n"
   1.313 +    printf "$FOUND_ALT_VARIABLES\n"
   1.314 +    printf "\n"
   1.315 +  fi
   1.316  
   1.317 -if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
   1.318 -	printf "WARNING: Your build output directory is not on a local disk.\n"
   1.319 -	printf "This will severely degrade build performance!\n"
   1.320 -	printf "It is recommended that you create an output directory on a local disk,\n"
   1.321 -	printf "and run the configure script again from that directory.\n"
   1.322 -	printf "\n"
   1.323 -fi
   1.324 +  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
   1.325 +    printf "WARNING: Your build output directory is not on a local disk.\n"
   1.326 +    printf "This will severely degrade build performance!\n"
   1.327 +    printf "It is recommended that you create an output directory on a local disk,\n"
   1.328 +    printf "and run the configure script again from that directory.\n"
   1.329 +    printf "\n"
   1.330 +  fi
   1.331  
   1.332 -if test "x$IS_RECONFIGURE" = "xyes"; then
   1.333 -	printf "WARNING: The result of this configuration has overridden an older\n"
   1.334 -	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
   1.335 -	printf "proper build. Failure to do so might result in strange build problems.\n"
   1.336 -	printf "\n"
   1.337 -fi
   1.338 +  if test "x$IS_RECONFIGURE" = "xyes"; then
   1.339 +    printf "WARNING: The result of this configuration has overridden an older\n"
   1.340 +    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
   1.341 +    printf "proper build. Failure to do so might result in strange build problems.\n"
   1.342 +    printf "\n"
   1.343 +  fi
   1.344  ])

mercurial