changeset 14252:dbbca46c21ff

Merge
author duke
date Wed, 05 Jul 2017 18:27:48 +0200
parents 590a9a630b02 8589cc3525dc
children d500de5ac150
files common/bin/compareimage.sh common/bin/diffexec.sh common/bin/diffjarzip.sh common/bin/difflib.sh common/bin/difftext.sh common/bin/exception_list_linux common/bin/extractvcvars.sh common/bin/unicode2x.sed common/makefiles/compress.post common/makefiles/compress.pre common/makefiles/uncompress.sed common/src/uncygdrive.c hotspot/test/runtime/7158800/BadUtf8.java hotspot/test/runtime/7158800/InternTest.java hotspot/test/runtime/7158800/Test7158800.sh hotspot/test/runtime/7158800/badstrings.txt jdk/makefiles/docs/CORE_PKGS.gmk jdk/makefiles/docs/Makefile jdk/makefiles/docs/NON_CORE_PKGS.gmk jdk/makefiles/docs/Notes.html jdk/makefiles/mapfiles/launchers/mapfile-amd64 jdk/makefiles/mapfiles/launchers/mapfile-i586 jdk/makefiles/mapfiles/libawt_headless/reorder-i586 jdk/makefiles/mapfiles/libjava/reorder-i586 jdk/makefiles/mapfiles/libjpeg/reorder-i586 jdk/makefiles/mapfiles/libnio/mapfile-bsd jdk/makefiles/mapfiles/libnio/reorder-i586 jdk/makefiles/mapfiles/libverify/reorder-i586 jdk/makefiles/mapfiles/libzip/reorder-i586 jdk/makefiles/sun/xawt/ToBin.java jdk/src/share/classes/sun/net/www/protocol/gopher/GopherClient.java jdk/src/share/classes/sun/net/www/protocol/gopher/Handler.java jdk/src/share/classes/sun/security/tools/CertAndKeyGen.java jdk/src/share/classes/sun/security/tools/JarSigner.java jdk/src/share/classes/sun/security/tools/JarSignerResources.java jdk/src/share/classes/sun/security/tools/JarSignerResources_ja.java jdk/src/share/classes/sun/security/tools/JarSignerResources_zh_CN.java jdk/src/share/classes/sun/security/tools/KeyTool.java jdk/src/share/classes/sun/security/tools/TimestampedSigner.java jdk/src/windows/classes/java/io/Win32FileSystem.java jdk/src/windows/native/java/io/Win32FileSystem_md.c jdk/test/com/sun/jndi/ldap/LdapsReadTimeoutTest.java jdk/test/com/sun/jndi/ldap/ReadTimeoutTest.java
diffstat 580 files changed, 96288 insertions(+), 62524 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags-top-repo	Wed Oct 31 18:30:51 2012 -0700
+++ b/.hgtags-top-repo	Wed Jul 05 18:27:48 2017 +0200
@@ -183,3 +183,4 @@
 dae9821589ccd2611bdf7084269b98e819091770 jdk8-b59
 e07f499b9dccb529ecf74172cf6ac11a195ec57a jdk8-b60
 20ff117b509075c3aec4ee3a57990ecd5db5df9c jdk8-b61
+8a3fe0ae06a8cc21347da5a18384b0aa6c2349f5 jdk8-b62
--- a/NewMakefile.gmk	Wed Oct 31 18:30:51 2012 -0700
+++ b/NewMakefile.gmk	Wed Jul 05 18:27:48 2017 +0200
@@ -31,8 +31,9 @@
 CP=cp
 ECHO=echo
 MKDIR=mkdir
+PRINTF=printf
 PWD=pwd
-SH=sh
+TAR=tar
 ifeq ($(PLATFORM),windows)
   ZIP=zip
 else
@@ -63,9 +64,47 @@
 	  $(ECHO) "ERROR: No configurations to build"; exit 1; \
 	fi
 	@for bdir in $(dir $(ALL_MAKEFILES)) ; do \
-	  $(ECHO) "$(CD) $${bdir} && $(MAKE) $(EXTRA_MAKE_ARGS) $@" ; \
-	  $(CD) $${bdir} && $(MAKE) $(EXTRA_MAKE_ARGS) $@ ; \
+	  $(ECHO) "$(CD) $${bdir} && $(MAKE) $@" ; \
+	  $(CD) $${bdir} && $(MAKE) $@ ; \
+	done
+
+# TBD: Deploy input
+$(BUILD_DIR_ROOT)/.deploy_input:
+	@if [ "$(ALL_MAKEFILES)" = "" ] ; then \
+	  $(ECHO) "ERROR: No configurations to build"; exit 1; \
+	fi
+	@for bdir in $(dir $(ALL_MAKEFILES)) ; do \
+	  if [ deploy/make/Makefile ] ; then \
+	    echo "Attempting deploy build." ; \
+	    ( \
+	      $(RM) -r $${bdir}/deploy_input ; \
+	      $(MKDIR) -p $${bdir}/deploy_input ; \
+	      ( $(CD) $${bdir}/images && $(TAR) -cf - j2sdk-image j2re-image ) \
+	        | ( $(CD) $${bdir}/deploy_input && $(TAR) -xf - ) ; \
+	    ) ; \
+	  fi; \
 	done
+	touch $@
+
+# TBD: Deploy images
+deploy: $(BUILD_DIR_ROOT)/.deploy_input
+	@if [ "$(ALL_MAKEFILES)" = "" ] ; then \
+	  $(ECHO) "ERROR: No configurations to build"; exit 1; \
+	fi
+	@for bdir in $(dir $(ALL_MAKEFILES)) ; do \
+	  if [ deploy/make/Makefile ] ; then \
+	    echo "Attempting deploy build." ; \
+	    ( \
+	      $(CD) deploy/make && \
+	      $(MAKE) \
+	        ABS_OUTPUTDIR=$${bdir}/deploy_input \
+	        OUTPUTDIR=$${bdir}/deploy_input \
+	    ) ; \
+	  fi; \
+	done
+
+# TBD: Install bundles
+install:
 
 # Bundle creation
 bundles:
@@ -91,8 +130,8 @@
 checks:
 	@$(ECHO) "No checks yet"
 
-# Keep track of phony targets
-PHONY_LIST += all images clean clobber checks
+# Keep track of user targets
+USER_TARGETS += all deploy install images clean clobber checks
 
 ###########################################################################
 # To help in adoption of the new configure&&make build process, a bridge
@@ -102,32 +141,18 @@
 bridgeBuild: bridge2configure images
 
 # Bridge from old Makefile ALT settings to configure options
-bridge2configure: .bridge2configureOpts
-	$(CD) common/makefiles && sh ../autoconf/configure $(strip $(shell $(CAT) $<))
+bridge2configure: $(BUILD_DIR_ROOT)/.bridge2configureOpts
+	bash ./configure $(strip $(shell $(CAT) $<))
 
 # Create a file with configure options created from old Makefile mechanisms.
-.bridge2configureOpts: .bridge2configureOptsLatest
+$(BUILD_DIR_ROOT)/.bridge2configureOpts: $(BUILD_DIR_ROOT)/.bridge2configureOptsLatest
 	$(RM) $@
 	$(CP) $< $@
 
-# In case make was invoked from a specific path
-_MAKE_COMMAND_PATH:=$(firstword $(MAKE))
-ifneq ($(dir $(_MAKE_COMMAND_PATH)),./)
-  # This could be removed someday if JPRT was fixed and we could assume that
-  #    the path to make was always in PATH.
-  MAKE_BINDIR:=$(call UnixPath,$(dir $(_MAKE_COMMAND_PATH)))
-  NEWPATH:=$(MAKE_BINDIR):${PATH}
-  PATH:=$(NEWPATH)
-  export PATH
-  MAKE_COMMAND=$(MAKE_BINDIR)/$(notdir $(_MAKE_COMMAND_PATH))
-else
-  MAKE_COMMAND=$(_MAKE_COMMAND_PATH)
-endif
-
 # Use this file to only change when obvious things have changed
-.bridge2configureOptsLatest: FRC
+$(BUILD_DIR_ROOT)/.bridge2configureOptsLatest: FRC
 	$(RM) $@.tmp
-	@$(ECHO) " MAKE=$(MAKE_COMMAND) " >> $@.tmp
+	$(MKDIR) -p $(BUILD_DIR_ROOT)
 	@$(ECHO) " --with-debug-level=$(if $(DEBUG_LEVEL),$(DEBUG_LEVEL),release) " >> $@.tmp
 ifdef ARCH_DATA_MODEL
 	@$(ECHO) " --with-target-bits=$(ARCH_DATA_MODEL) " >> $@.tmp
@@ -156,20 +181,30 @@
 # Clobber all the built files
 clobber:: bridge2clobber
 bridge2clobber::
-	$(RM) .bridge2*
+	$(RM) $(BUILD_DIR_ROOT)/.bridge2*
+	$(RM) $(BUILD_DIR_ROOT)/.deploy_input
 
 # Keep track of phony targets
 PHONY_LIST += bridge2configure bridgeBuild bridge2clobber
 
 ###########################################################################
+# Sanity checks (history target)
+#
+
+sanity: checks
+
+# Keep track of user targets
+USER_TARGETS += sanity
+
+###########################################################################
 # Javadocs
 #
 
 javadocs:
 	cd common/makefiles && $(MAKE) -f MakefileJavadoc.gmk
 
-# Keep track of phony targets
-PHONY_LIST += javadocs
+# Keep track of user targets
+USER_TARGETS += javadocs
 
 ###########################################################################
 # JPRT targets
@@ -190,7 +225,6 @@
 jprt_build_debug: BUILD_DIRNAME=*-debug
 jprt_build_debug: jprt_build_generic
 
-jprt_build_generic: EXTRA_MAKE_ARGS=LOG=nofile,info
 jprt_build_generic: $(JPRT_ARCHIVE_BUNDLE)
 
 $(JPRT_ARCHIVE_BUNDLE): bridgeBuild bundles
@@ -203,9 +237,59 @@
               jprt_build_generic
 
 ###########################################################################
+# Help target
+
+HELP_FORMAT=%12s%s\n
+
+help:
+	@$(PRINTF) "# JDK Makefile\n"
+	@$(PRINTF) "#\n"
+	@$(PRINTF) "# Usage: make [Target]\n"
+	@$(PRINTF) "#\n"
+	@$(PRINTF) "#   $(HELP_FORMAT)" "Target   " "Description"
+	@$(PRINTF) "#   $(HELP_FORMAT)" "------   " "-----------"
+	@for i in $(USER_TARGETS) ; do \
+	  $(MAKE) help_$${i} ; \
+	done
+	@$(PRINTF) "#\n"
+
+help_all:
+	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
+	"Build the entire jdk but not the images"
+help_images:
+	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
+	"Create the jdk images for the builds"
+help_deploy:
+	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
+	"Create the jdk deploy images from the jdk images"
+help_install:
+	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
+	"Create the jdk install bundles from the deploy images"
+help_clean:
+	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
+	"Clean and prepare for a fresh build from scratch"
+help_clobber:
+	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
+	"Clean and also purge any hidden derived data"
+help_checks:
+	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
+	"Perform various checks to make sure we can build"
+help_sanity:
+	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
+	"Same as 'make checks'"
+help_javadocs:
+	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
+	"Build the javadocs"
+help_help:
+	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
+	"Print out the help messages"
+
+# Keep track of user targets
+USER_TARGETS += help
+
+###########################################################################
 # Phony targets
-.PHONY: $(PHONY_LIST)
+.PHONY: $(PHONY_LIST) $(USER_TARGETS)
 
 # Force target
 FRC:
-
--- a/common/autoconf/Makefile.in	Wed Oct 31 18:30:51 2012 -0700
+++ b/common/autoconf/Makefile.in	Wed Jul 05 18:27:48 2017 +0200
@@ -21,6 +21,7 @@
 # questions.
 #
 
-# Generated Makefile @DATE_WHEN_CONFIGURED@
+# This Makefile was generated by configure @DATE_WHEN_CONFIGURED@
+# GENERATED FILE, DO NOT EDIT
 SPEC:=@OUTPUT_ROOT@/spec.gmk
 include @SRC_ROOT@/common/makefiles/Makefile
--- a/common/autoconf/autogen.sh	Wed Oct 31 18:30:51 2012 -0700
+++ b/common/autoconf/autogen.sh	Wed Jul 05 18:27:48 2017 +0200
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,14 +29,11 @@
   # date +%s is not available on Solaris, use this workaround
   # from http://solarisjedi.blogspot.co.uk/2006/06/solaris-date-command-and-epoch-time.html
   TIMESTAMP=`/usr/bin/truss /usr/bin/date 2>&1 |  nawk -F= '/^time\(\)/ {gsub(/ /,"",$2);print $2}'`
-  # On Solaris /bin/sh doesn't support test -e but /usr/bin/test does.
-  TEST=`which test`
 else
   TIMESTAMP=`date +%s`
-  TEST="test"
 fi
 
-if $TEST "$CUSTOM_CONFIG_DIR" = ""; then
+if test "x$CUSTOM_CONFIG_DIR" = "x"; then
   custom_script_dir="$script_dir/../../jdk/make/closed/autoconf"
 else
   custom_script_dir=$CUSTOM_CONFIG_DIR
@@ -44,16 +41,22 @@
 
 custom_hook=$custom_script_dir/custom-hook.m4
 
+if test "x`which autoconf 2> /dev/null`" = x; then
+  echo You need autoconf installed to be able to regenerate the configure script
+  echo Error: Cannot find autoconf 1>&2
+  exit 1
+fi
+
 echo Generating generated-configure.sh
 cat $script_dir/configure.ac  | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | autoconf -W all -I$script_dir - > $script_dir/generated-configure.sh
 rm -rf autom4te.cache
 
-if $TEST -e $custom_hook; then
+if test -e $custom_hook; then
   echo Generating custom generated-configure.sh
   # We have custom sources available; also generate configure script
   # with custom hooks compiled in.
   cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \
-    sed -e "s|AC_DEFUN_ONCE(\[CUSTOM_HOOK\])|m4_include([$custom_hook])|" | autoconf -W all -I$script_dir - > $custom_script_dir/generated-configure.sh
+    sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|" | autoconf -W all -I$script_dir - > $custom_script_dir/generated-configure.sh
   rm -rf autom4te.cache
 else
   echo No custom hook found:  $custom_hook
--- a/common/autoconf/basics.m4	Wed Oct 31 18:30:51 2012 -0700
+++ b/common/autoconf/basics.m4	Wed Jul 05 18:27:48 2017 +0200
@@ -34,84 +34,102 @@
     fi
 ])
 
-AC_DEFUN([SET_FULL_PATH],
+# This will make sure the given variable points to a full and proper
+# path. This means:
+# 1) There will be no spaces in the path. On posix platforms,
+#    spaces in the path will result in an error. On Windows,
+#    the path will be rewritten using short-style to be space-free.
+# 2) The path will be absolute, and it will be in unix-style (on
+#     cygwin).
+# $1: The name of the variable to fix
+AC_DEFUN([BASIC_FIXUP_PATH],
 [
-    # Translate "gcc -E" into "`which gcc` -E" ie
-    # extract the full path to the binary and at the
-    # same time maintain any arguments passed to it.
-    # The command MUST exist in the path, or else!
-    tmp="[$]$1"
-    car="${tmp%% *}"
-    tmp="[$]$1 EOL"
-    cdr="${tmp#* }"
-    # On windows we want paths without spaces.
-    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-        SET_FULL_PATH_SPACESAFE(car)
-    else
-        # "which" is not portable, but is used here
-        # because we know that the command exists!
-        car=`which $car`
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    BASIC_FIXUP_PATH_CYGWIN($1)
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    BASIC_FIXUP_PATH_MSYS($1)
+  else
+    # We're on a posix platform. Hooray! :)
+    path="[$]$1"
+    
+    if test ! -f "$path" && test ! -d "$path"; then
+      AC_MSG_ERROR([The path of $1, which resolves as "$path", is not found.])
     fi
-    if test "x$cdr" != xEOL; then
-        $1="$car ${cdr% *}"
-    else
-        $1="$car"
+
+    has_space=`$ECHO "$path" | $GREP " "`
+    if test "x$has_space" != x; then
+      AC_MSG_NOTICE([The path of $1, which resolves as "$path", is invalid.])
+      AC_MSG_ERROR([Spaces are not allowed in this path.])
     fi
+  fi
 ])
 
-AC_DEFUN([SPACESAFE],
+# This will make sure the given variable points to a executable
+# with a full and proper path. This means:
+# 1) There will be no spaces in the path. On posix platforms,
+#    spaces in the path will result in an error. On Windows,
+#    the path will be rewritten using short-style to be space-free.
+# 2) The path will be absolute, and it will be in unix-style (on
+#     cygwin).
+# Any arguments given to the executable is preserved.
+# If the input variable does not have a directory specification, then
+# it need to be in the PATH.
+# $1: The name of the variable to fix
+AC_DEFUN([BASIC_FIXUP_EXECUTABLE],
 [
-    # Fail with message $2 if var $1 contains a path with no spaces in it.
-    # Unless on Windows, where we can rewrite the path.
-    HAS_SPACE=`echo "[$]$1" | grep " "`
-    if test "x$HAS_SPACE" != x; then
-        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-            # First convert it to DOS-style, short mode (no spaces)
-            $1=`$CYGPATH -s -m -a "[$]$1"`
-            # Now it's case insensitive; let's make it lowercase to improve readability
-            $1=`$ECHO "[$]$1" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
-            # Now convert it back to Unix-stile (cygpath)
-            $1=`$CYGPATH -u "[$]$1"`
-        else
-            AC_MSG_ERROR([You cannot have spaces in $2! "[$]$1"])
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    BASIC_FIXUP_EXECUTABLE_CYGWIN($1)
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    BASIC_FIXUP_EXECUTABLE_MSYS($1)
+  else
+    # We're on a posix platform. Hooray! :)
+    # First separate the path from the arguments. This will split at the first
+    # space.
+    complete="[$]$1"
+    path="${complete%% *}"
+    tmp="$complete EOL"
+    arguments="${tmp#* }"
+
+    new_path=`$WHICH $path 2> /dev/null`
+    if test "x$new_path" = x; then
+      is_absolute_path=`$ECHO "$path" | $GREP ^/`
+      if test "x$is_absolute_path" != x; then
+        AC_MSG_NOTICE([Resolving $1 (as $path) with 'which' failed, using $path directly.])
+        new_path="$path"
+      else
+        AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
+        has_space=`$ECHO "$complete" | $GREP " "`
+        if test "x$has_space" != x; then
+          AC_MSG_NOTICE([This might be caused by spaces in the path, which is not allowed.])
         fi
+        AC_MSG_ERROR([Cannot locate the the path of $1])
+      fi
     fi
+  fi
+
+  # Now join together the path and the arguments once again
+  if test "x$arguments" != xEOL; then
+      new_complete="$new_path ${arguments% *}"
+  else
+      new_complete="$new_path"
+  fi
+
+  if test "x$complete" != "x$new_complete"; then
+    $1="$new_complete"
+    AC_MSG_NOTICE([Rewriting $1 to "$new_complete"])
+  fi
 ])
 
-AC_DEFUN([SET_FULL_PATH_SPACESAFE],
-[
-    # Translate long cygdrive or C:\sdfsf path
-    # into a short mixed mode path that has no
-    # spaces in it.
-    tmp="[$]$1"
-    
-    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-        tmp=`$CYGPATH -u "[$]$1"`
-        tmp=`which "$tmp"`
-        # If file exists with .exe appended, that's the real filename
-        # and cygpath needs that to convert to short style path.
-        if test -f "${tmp}.exe"; then
-           tmp="${tmp}.exe"
-        elif test -f "${tmp}.cmd"; then
-           tmp="${tmp}.cmd"
-        fi
-        # Convert to C:/ mixed style path without spaces.
-         tmp=`$CYGPATH -s -m "$tmp"`
-    fi
-    $1="$tmp"
-])
-
-AC_DEFUN([REMOVE_SYMBOLIC_LINKS],
+AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS],
 [
     if test "x$OPENJDK_BUILD_OS" != xwindows; then
         # Follow a chain of symbolic links. Use readlink
         # where it exists, else fall back to horribly
         # complicated shell code.
-        AC_PATH_PROG(READLINK, readlink)
         if test "x$READLINK_TESTED" != yes; then
             # On MacOSX there is a readlink tool with a different
             # purpose than the GNU readlink tool. Check the found readlink.
-            ISGNU=`$READLINK --help 2>&1 | grep GNU`
+            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
             if test "x$ISGNU" = x; then
                  # A readlink that we do not know how to use.
                  # Are there other non-GNU readlinks out there?
@@ -125,23 +143,25 @@
         else
             STARTDIR=$PWD
             COUNTER=0
-            DIR=`dirname [$]$1`
-            FIL=`basename [$]$1`
+            sym_link_dir=`$DIRNAME [$]$1`
+            sym_link_file=`$BASENAME [$]$1`
             while test $COUNTER -lt 20; do
-                ISLINK=`ls -l $DIR/$FIL | grep '\->' | sed -e 's/.*-> \(.*\)/\1/'`
+                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
                 if test "x$ISLINK" == x; then
                     # This is not a symbolic link! We are done!
                     break
                 fi
                 # The link might be relative! We have to use cd to travel safely.
-                cd $DIR
-                cd `dirname $ISLINK`
-                DIR=`pwd`
-                FIL=`basename $ISLINK`
+                cd $sym_link_dir
+                # ... and we must get the to the absolute path, not one using symbolic links.             
+                cd `pwd -P`
+                cd `$DIRNAME $ISLINK`
+                sym_link_dir=`$THEPWDCMD`
+                sym_link_file=`$BASENAME $ISLINK`
                 let COUNTER=COUNTER+1
             done
             cd $STARTDIR
-            $1=$DIR/$FIL
+            $1=$sym_link_dir/$sym_link_file
         fi
     fi
 ])
@@ -152,6 +172,107 @@
 AC_SUBST(CONFIGURE_COMMAND_LINE)
 DATE_WHEN_CONFIGURED=`LANG=C date`
 AC_SUBST(DATE_WHEN_CONFIGURED)
+AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.])
+AC_MSG_NOTICE([configure script generated at timestamp $DATE_WHEN_GENERATED.])
+])
+
+# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
+# $1: variable to check
+# $2: executable name to print in warning (optional)
+AC_DEFUN([BASIC_CHECK_NONEMPTY],
+[
+    if test "x[$]$1" = x; then
+        if test "x$2" = x; then
+          PROG_NAME=translit($1,A-Z,a-z)
+        else
+          PROG_NAME=$2
+        fi
+        AC_MSG_NOTICE([Could not find $PROG_NAME!])
+        AC_MSG_ERROR([Cannot continue])
+    fi
+])
+
+# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
+# Arguments as AC_PATH_PROG:
+# $1: variable to set
+# $2: executable name to look for
+AC_DEFUN([BASIC_REQUIRE_PROG],
+[
+    AC_PATH_PROGS($1, $2)
+    BASIC_CHECK_NONEMPTY($1, $2)
+])
+
+# Setup the most fundamental tools that relies on not much else to set up,
+# but is used by much of the early bootstrap code.
+AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
+[
+
+# Start with tools that do not need have cross compilation support
+# and can be expected to be found in the default PATH. These tools are
+# used by configure. Nor are these tools expected to be found in the
+# devkit from the builddeps server either, since they are
+# needed to download the devkit.
+
+# First are all the simple required tools.
+BASIC_REQUIRE_PROG(BASENAME, basename)
+BASIC_REQUIRE_PROG(BASH, bash)
+BASIC_REQUIRE_PROG(CAT, cat)
+BASIC_REQUIRE_PROG(CHMOD, chmod)
+BASIC_REQUIRE_PROG(CMP, cmp)
+BASIC_REQUIRE_PROG(CP, cp)
+BASIC_REQUIRE_PROG(CUT, cut)
+BASIC_REQUIRE_PROG(DATE, date)
+BASIC_REQUIRE_PROG(DIFF, [gdiff diff])
+BASIC_REQUIRE_PROG(DIRNAME, dirname)
+BASIC_REQUIRE_PROG(ECHO, echo)
+BASIC_REQUIRE_PROG(EXPR, expr)
+BASIC_REQUIRE_PROG(FILE, file)
+BASIC_REQUIRE_PROG(FIND, find)
+BASIC_REQUIRE_PROG(HEAD, head)
+BASIC_REQUIRE_PROG(LN, ln)
+BASIC_REQUIRE_PROG(LS, ls)
+BASIC_REQUIRE_PROG(MKDIR, mkdir)
+BASIC_REQUIRE_PROG(MKTEMP, mktemp)
+BASIC_REQUIRE_PROG(MV, mv)
+BASIC_REQUIRE_PROG(PRINTF, printf)
+BASIC_REQUIRE_PROG(THEPWDCMD, pwd)
+BASIC_REQUIRE_PROG(RM, rm)
+BASIC_REQUIRE_PROG(SH, sh)
+BASIC_REQUIRE_PROG(SORT, sort)
+BASIC_REQUIRE_PROG(TAIL, tail)
+BASIC_REQUIRE_PROG(TAR, tar)
+BASIC_REQUIRE_PROG(TEE, tee)
+BASIC_REQUIRE_PROG(TOUCH, touch)
+BASIC_REQUIRE_PROG(TR, tr)
+BASIC_REQUIRE_PROG(UNAME, uname)
+BASIC_REQUIRE_PROG(UNIQ, uniq)
+BASIC_REQUIRE_PROG(WC, wc)
+BASIC_REQUIRE_PROG(WHICH, which)
+BASIC_REQUIRE_PROG(XARGS, xargs)
+
+# Then required tools that require some special treatment.
+AC_PROG_AWK
+BASIC_CHECK_NONEMPTY(AWK)
+AC_PROG_GREP
+BASIC_CHECK_NONEMPTY(GREP)
+AC_PROG_EGREP
+BASIC_CHECK_NONEMPTY(EGREP)
+AC_PROG_FGREP
+BASIC_CHECK_NONEMPTY(FGREP)
+AC_PROG_SED
+BASIC_CHECK_NONEMPTY(SED)
+
+AC_PATH_PROGS(NAWK, [nawk gawk awk])
+BASIC_CHECK_NONEMPTY(NAWK)
+
+# Always force rm.
+RM="$RM -f"
+
+# These are not required on all platforms
+AC_PATH_PROG(CYGPATH, cygpath)
+AC_PATH_PROG(READLINK, readlink)
+AC_PATH_PROG(DF, df)
+AC_PATH_PROG(SETFILE, SetFile)
 ])
 
 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
@@ -159,46 +280,37 @@
 [
 # Locate the directory of this script.
 SCRIPT="[$]0"
-REMOVE_SYMBOLIC_LINKS(SCRIPT)
-AUTOCONF_DIR=`dirname [$]0`
+BASIC_REMOVE_SYMBOLIC_LINKS(SCRIPT)
+AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
 
 # Where is the source? It is located two levels above the configure script.
 CURDIR="$PWD"
 cd "$AUTOCONF_DIR/../.."
 SRC_ROOT="`pwd`"
-if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-    SRC_ROOT_LENGTH=`pwd|wc -m`
-    if test $SRC_ROOT_LENGTH -gt 100; then
-        AC_MSG_ERROR([Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported])
-    fi
+
+if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+  PATH_SEP=";"
+  BASIC_CHECK_PATHS_WINDOWS
+else
+  PATH_SEP=":"
 fi
+
 AC_SUBST(SRC_ROOT)
+AC_SUBST(PATH_SEP)
 cd "$CURDIR"
 
-SPACESAFE(SRC_ROOT,[the path to the source root])
-SPACESAFE(CURDIR,[the path to the current directory])
+BASIC_FIXUP_PATH(SRC_ROOT)
+BASIC_FIXUP_PATH(CURDIR)
 
 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
     # Add extra search paths on solaris for utilities like ar and as etc...
     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
 fi
 
-# For cygwin we need cygpath first, since it is used everywhere.
-AC_PATH_PROG(CYGPATH, cygpath)
-PATH_SEP=":"
-if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-    if test "x$CYGPATH" = x; then
-        AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path])
-    fi
-    PATH_SEP=";"
-fi
-AC_SUBST(PATH_SEP)
-
 # You can force the sys-root if the sys-root encoded into the cross compiler tools
 # is not correct.
 AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root],
-  [pass this sys-root to the compilers and linker (useful if the sys-root encoded in
-   the cross compiler tools is incorrect)])])
+  [pass this sys-root to the compilers and tools (for cross-compiling)])])
 
 if test "x$with_sys_root" != x; then
   SYS_ROOT=$with_sys_root
@@ -208,7 +320,7 @@
 AC_SUBST(SYS_ROOT)
 
 AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
-  [search this directory for (cross-compiling) compilers and tools])], [TOOLS_DIR=$with_tools_dir])
+  [search this directory for compilers and tools (for cross-compiling)])], [TOOLS_DIR=$with_tools_dir])
 
 AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
   [use this directory as base for tools-dir and sys-root (for cross-compiling)])],
@@ -229,7 +341,7 @@
 [
 
 AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name],
-	[use this as the name of the configuration, overriding the generated default])],
+	[use this as the name of the configuration @<:@generated from important configuration options@:>@])],
         [ CONF_NAME=${with_conf_name} ])
 
 # Test from where we are running configure, in or outside of src root.
@@ -240,7 +352,7 @@
         CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
     fi
     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
-    mkdir -p "$OUTPUT_ROOT"
+    $MKDIR -p "$OUTPUT_ROOT"
     if test ! -d "$OUTPUT_ROOT"; then
         AC_MSG_ERROR([Could not create build directory $OUTPUT_ROOT])
     fi
@@ -253,9 +365,30 @@
         CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
     fi
     OUTPUT_ROOT="$CURDIR"
-fi
+
+    # WARNING: This might be a bad thing to do. You need to be sure you want to
+    # have a configuration in this directory. Do some sanity checks!
 
-SPACESAFE(OUTPUT_ROOT,[the path to the output root])
+    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
+      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
+      # other files
+      files_present=`$LS $OUTPUT_ROOT`
+      if test "x$files_present" != x; then
+        AC_MSG_NOTICE([Current directory is $CURDIR.])
+        AC_MSG_NOTICE([Since this is not the source root, configure will output the configuration here])
+        AC_MSG_NOTICE([(as opposed to creating a configuration in <src_root>/build/<conf-name>).])
+        AC_MSG_NOTICE([However, this directory is not empty. This is not allowed, since it could])
+        AC_MSG_NOTICE([seriously mess up just about everything.])
+        AC_MSG_NOTICE([Try 'cd $SRC_ROOT' and restart configure])
+        AC_MSG_NOTICE([(or create a new empty directory and cd to it).])
+        AC_MSG_ERROR([Will not continue creating configuration in $CURDIR])
+      fi
+    fi
+fi
+AC_MSG_CHECKING([what configuration name to use])
+AC_MSG_RESULT([$CONF_NAME])
+
+BASIC_FIXUP_PATH(OUTPUT_ROOT)
 
 AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk)
 AC_SUBST(CONF_NAME, $CONF_NAME)
@@ -287,7 +420,7 @@
 # Setup default logging of stdout and stderr to build.log in the output root.
 BUILD_LOG='$(OUTPUT_ROOT)/build.log'
 BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
-BUILD_LOG_WRAPPER='$(SH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
+BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
 AC_SUBST(BUILD_LOG)
 AC_SUBST(BUILD_LOG_PREVIOUS)
 AC_SUBST(BUILD_LOG_WRAPPER)
@@ -305,7 +438,6 @@
   DESCRIPTION="$2"
   if test "x$MAKE_CANDIDATE" != x; then
     AC_MSG_NOTICE([Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION])
-    SET_FULL_PATH(MAKE_CANDIDATE)
     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
     if test "x$IS_GNU_MAKE" = x; then
@@ -314,8 +446,27 @@
       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[[12346789]]'`
       if test "x$IS_MODERN_MAKE" = x; then
         AC_MSG_NOTICE([Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring.])
-      else 
-        FOUND_MAKE=$MAKE_CANDIDATE
+      else
+        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+            MAKE_EXPECTED_ENV='cygwin'
+          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+            MAKE_EXPECTED_ENV='msys'
+          else
+            AC_MSG_ERROR([Unknown Windows environment])
+          fi
+          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
+          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
+        else
+          # Not relevant for non-Windows
+          IS_MAKE_CORRECT_ENV=true
+        fi
+        if test "x$IS_MAKE_CORRECT_ENV" = x; then
+          AC_MSG_NOTICE([Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring.])
+        else
+          FOUND_MAKE=$MAKE_CANDIDATE
+          BASIC_FIXUP_EXECUTABLE(FOUND_MAKE)
+        fi
       fi
     fi
   fi
@@ -330,7 +481,7 @@
     if test ! -f "$MAKE"; then
       AC_MSG_ERROR([The specified make (by MAKE=$MAKE) is not found.])
     fi
-    BASIC_CHECK_MAKE_VERSION("$MAKE", [user supplied MAKE=])
+    BASIC_CHECK_MAKE_VERSION("$MAKE", [user supplied MAKE=$MAKE])
     if test "x$FOUND_MAKE" = x; then
       AC_MSG_ERROR([The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer.])
     fi
@@ -375,7 +526,7 @@
     AC_MSG_CHECKING([if find supports -delete])
     FIND_DELETE="-delete"
 
-    DELETEDIR=`mktemp -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
+    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
 
     echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
 
@@ -389,102 +540,22 @@
         AC_MSG_RESULT([yes])    
     fi
     rmdir $DELETEDIR
-])
-
-# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
-# $1: variable to check
-# $2: executable name to print in warning (optional)
-AC_DEFUN([CHECK_NONEMPTY],
-[
-    if test "x[$]$1" = x; then
-        if test "x$2" = x; then
-          PROG_NAME=translit($1,A-Z,a-z)
-        else
-          PROG_NAME=$2
-        fi
-        AC_MSG_NOTICE([Could not find $PROG_NAME!])
-        AC_MSG_ERROR([Cannot continue])
-    fi
-])
-
-# Does AC_PATH_PROG followed by CHECK_NONEMPTY.
-# Arguments as AC_PATH_PROG:
-# $1: variable to set
-# $2: executable name to look for
-AC_DEFUN([BASIC_REQUIRE_PROG],
-[
-    AC_PATH_PROGS($1, $2)
-    CHECK_NONEMPTY($1, $2)
+    AC_SUBST(FIND_DELETE)
 ])
 
-AC_DEFUN_ONCE([BASIC_SETUP_TOOLS],
+AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
 [
-# Start with tools that do not need have cross compilation support
-# and can be expected to be found in the default PATH. These tools are
-# used by configure. Nor are these tools expected to be found in the
-# devkit from the builddeps server either, since they are
-# needed to download the devkit.
-
-# First are all the simple required tools.
-BASIC_REQUIRE_PROG(BASENAME, basename)
-BASIC_REQUIRE_PROG(CAT, cat)
-BASIC_REQUIRE_PROG(CHMOD, chmod)
-BASIC_REQUIRE_PROG(CMP, cmp)
-BASIC_REQUIRE_PROG(CP, cp)
-BASIC_REQUIRE_PROG(CPIO, cpio)
-BASIC_REQUIRE_PROG(CUT, cut)
-BASIC_REQUIRE_PROG(DATE, date)
-BASIC_REQUIRE_PROG(DF, df)
-BASIC_REQUIRE_PROG(DIFF, [gdiff diff])
-BASIC_REQUIRE_PROG(ECHO, echo)
-BASIC_REQUIRE_PROG(EXPR, expr)
-BASIC_REQUIRE_PROG(FILE, file)
-BASIC_REQUIRE_PROG(FIND, find)
-BASIC_REQUIRE_PROG(HEAD, head)
-BASIC_REQUIRE_PROG(LN, ln)
-BASIC_REQUIRE_PROG(LS, ls)
-BASIC_REQUIRE_PROG(MKDIR, mkdir)
-BASIC_REQUIRE_PROG(MV, mv)
-BASIC_REQUIRE_PROG(PRINTF, printf)
-BASIC_REQUIRE_PROG(SH, sh)
-BASIC_REQUIRE_PROG(SORT, sort)
-BASIC_REQUIRE_PROG(TAIL, tail)
-BASIC_REQUIRE_PROG(TAR, tar)
-BASIC_REQUIRE_PROG(TEE, tee)
-BASIC_REQUIRE_PROG(TOUCH, touch)
-BASIC_REQUIRE_PROG(TR, tr)
-BASIC_REQUIRE_PROG(UNIQ, uniq)
-BASIC_REQUIRE_PROG(UNZIP, unzip)
-BASIC_REQUIRE_PROG(WC, wc)
-BASIC_REQUIRE_PROG(XARGS, xargs)
-BASIC_REQUIRE_PROG(ZIP, zip)
-
-# Then required tools that require some special treatment.
-AC_PROG_AWK
-CHECK_NONEMPTY(AWK)
-AC_PROG_GREP
-CHECK_NONEMPTY(GREP)
-AC_PROG_EGREP
-CHECK_NONEMPTY(EGREP)
-AC_PROG_FGREP
-CHECK_NONEMPTY(FGREP)
-AC_PROG_SED
-CHECK_NONEMPTY(SED)
-
-AC_PATH_PROGS(NAWK, [nawk gawk awk])
-CHECK_NONEMPTY(NAWK)
-
 BASIC_CHECK_GNU_MAKE
 
-BASIC_REQUIRE_PROG(RM, rm)
-RM="$RM -f"
+BASIC_CHECK_FIND_DELETE
 
-BASIC_CHECK_FIND_DELETE
-AC_SUBST(FIND_DELETE)
+# These tools might not be installed by default, 
+# need hint on how to install them.
+BASIC_REQUIRE_PROG(UNZIP, unzip)
+BASIC_REQUIRE_PROG(ZIP, zip)
 
 # Non-required basic tools
 
-AC_PATH_PROG(THEPWDCMD, pwd)
 AC_PATH_PROG(LDD, ldd)
 if test "x$LDD" = "x"; then
     # List shared lib dependencies is used for
@@ -497,52 +568,17 @@
    OTOOL="true"
 fi
 AC_PATH_PROGS(READELF, [readelf greadelf])
-AC_PATH_PROGS(OBJDUMP, [objdump gobjdump])
 AC_PATH_PROG(HG, hg)
+AC_PATH_PROG(STAT, stat)
+AC_PATH_PROG(TIME, time)
+
+if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+  BASIC_REQUIRE_PROG(COMM, comm)
+fi
 ])
 
-AC_DEFUN_ONCE([BASIC_COMPILE_UNCYGDRIVE],
-[
-# When using cygwin, we need a wrapper binary that renames
-# /cygdrive/c/ arguments into c:/ arguments and peeks into
-# @files and rewrites these too! This wrapper binary is
-# called uncygdrive.exe.
-UNCYGDRIVE=
-if test "x$OPENJDK_BUILD_OS" = xwindows; then
-    AC_MSG_CHECKING([if uncygdrive can be created])
-    UNCYGDRIVE_SRC=`$CYGPATH -m $SRC_ROOT/common/src/uncygdrive.c`
-    rm -f $OUTPUT_ROOT/uncygdrive*
-    UNCYGDRIVE=`$CYGPATH -m $OUTPUT_ROOT/uncygdrive.exe`
-    cd $OUTPUT_ROOT
-    $CC $UNCYGDRIVE_SRC /Fe$UNCYGDRIVE > $OUTPUT_ROOT/uncygdrive1.log 2>&1
-    cd $CURDIR
-
-    if test ! -x $OUTPUT_ROOT/uncygdrive.exe; then 
-        AC_MSG_RESULT([no])
-        cat $OUTPUT_ROOT/uncygdrive1.log
-        AC_MSG_ERROR([Could not create $OUTPUT_ROOT/uncygdrive.exe])
-    fi
-    AC_MSG_RESULT([$UNCYGDRIVE])
-    AC_MSG_CHECKING([if uncygdrive.exe works])
-    cd $OUTPUT_ROOT
-    $UNCYGDRIVE $CC $SRC_ROOT/common/src/uncygdrive.c /Fe$OUTPUT_ROOT/uncygdrive2.exe > $OUTPUT_ROOT/uncygdrive2.log 2>&1 
-    cd $CURDIR
-    if test ! -x $OUTPUT_ROOT/uncygdrive2.exe; then 
-        AC_MSG_RESULT([no])
-        cat $OUTPUT_ROOT/uncygdrive2.log
-        AC_MSG_ERROR([Uncygdrive did not work!])
-    fi
-    AC_MSG_RESULT([yes])
-    rm -f $OUTPUT_ROOT/uncygdrive?.??? $OUTPUT_ROOT/uncygdrive.obj
-    # The path to uncygdrive to use should be Unix-style
-    UNCYGDRIVE="$OUTPUT_ROOT/uncygdrive.exe"
-fi
-
-AC_SUBST(UNCYGDRIVE)
-])
-
-
-# Check if build directory is on local disk.
+# Check if build directory is on local disk. If not possible to determine,
+# we prefer to claim it's local.
 # Argument 1: directory to test
 # Argument 2: what to do if it is on local disk
 # Argument 3: what to do otherwise (remote disk or failure)
@@ -550,11 +586,26 @@
 [
 	# df -l lists only local disks; if the given directory is not found then
 	# a non-zero exit code is given
-	if $DF -l $1 > /dev/null 2>&1; then
-          $2
-        else
-          $3
-        fi
+  if test "x$DF" = x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+      # msys does not have df; use Windows "net use" instead.
+      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
+      if test "x$IS_NETWORK_DISK" = x; then
+        $2
+      else
+        $3
+      fi
+    else
+      # No df here, say it's local
+      $2
+    fi
+  else
+    if $DF -l $1 > /dev/null 2>&1; then
+      $2
+    else
+      $3
+    fi
+  fi
 ])
 
 AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/basics_windows.m4	Wed Jul 05 18:27:48 2017 +0200
@@ -0,0 +1,406 @@
+#
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+AC_DEFUN([BASIC_WINDOWS_REWRITE_AS_UNIX_PATH],
+[
+  windows_path="[$]$1"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    $1="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    $1="$unix_path"
+  fi
+])
+
+AC_DEFUN([BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH],
+[
+  unix_path="[$]$1"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    windows_path=`$CYGPATH -m "$unix_path"`
+    $1="$windows_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    windows_path=`cmd //c echo $unix_path`
+    $1="$windows_path"
+  fi
+])
+
+# Helper function which possibly converts a path using DOS-style short mode.
+# If so, the updated path is stored in $new_path.
+# $1: The path to check
+AC_DEFUN([BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN],
+[
+  input_path="$1"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use @<:@ and @:>@ instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP @<:@^-._/a-zA-Z0-9@:>@`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-stile (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $1 | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+])
+
+# Helper function which possibly converts a path using DOS-style short mode.
+# If so, the updated path is stored in $new_path.
+# $1: The path to check
+AC_DEFUN([BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS],
+[
+  input_path="$1"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use @<:@ and @:>@ instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP @<:@^-_/:a-zA-Z0-9@:>@`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+])
+
+# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
+# and could probably be heavily simplified. However, all changes in this
+# area tend to need lot of testing in different scenarios, and in lack of
+# proper unit testing, cleaning this up has not been deemed worth the effort
+# at the moment.
+
+AC_DEFUN([BASIC_FIXUP_PATH_CYGWIN],
+[
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="[$]$1"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    AC_MSG_NOTICE([The path of $1, which resolves as "$path", is invalid.])
+    AC_MSG_ERROR([Cannot locate the the path of $1])
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+  BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN([$new_path])
+
+  if test "x$path" != "x$new_path"; then
+    $1="$new_path"
+    AC_MSG_NOTICE([Rewriting $1 to "$new_path"])
+  fi
+])
+
+AC_DEFUN([BASIC_FIXUP_PATH_MSYS],
+[
+  path="[$]$1"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+  
+  BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path])
+  BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
+  if test "x$path" != "x$new_path"; then
+    $1="$new_path"
+    AC_MSG_NOTICE([Rewriting $1 to "$new_path"])
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes@<:@@@:>@}" "${new_path:0:10}")
+])
+
+AC_DEFUN([BASIC_FIXUP_EXECUTABLE_CYGWIN],
+[
+  # First separate the path from the arguments. This will split at the first
+  # space.
+  complete="[$]$1"
+  path="${complete%% *}"
+  tmp="$complete EOL"
+  arguments="${tmp#* }"
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  new_path=`$CYGPATH -u "$path"`
+
+  # Now try to locate executable using which
+  new_path=`$WHICH "$new_path" 2> /dev/null`
+  if test "x$new_path" = x; then
+    # Oops. Which didn't find the executable.
+    # The splitting of arguments from the executable at a space might have been incorrect,
+    # since paths with space are more likely in Windows. Give it another try with the whole
+    # argument.
+    path="$complete"
+    arguments="EOL"
+    new_path=`$CYGPATH -u "$path"`
+    new_path=`$WHICH "$new_path" 2> /dev/null`
+    if test "x$new_path" = x; then
+      # It's still not found. Now this is an unrecoverable error.
+      AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        AC_MSG_NOTICE([You might be mixing spaces in the path and extra arguments, which is not allowed.])
+      fi
+      AC_MSG_ERROR([Cannot locate the the path of $1])
+    fi
+  fi
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    # Short path failed, file does not exist as specified.
+    # Try adding .exe or .cmd
+    if test -f "${new_path}.exe"; then
+       input_to_shortpath="${new_path}.exe"
+    elif test -f "${new_path}.cmd"; then
+       input_to_shortpath="${new_path}.cmd"
+    else
+      AC_MSG_NOTICE([The path of $1, which resolves as "$new_path", is invalid.])
+      AC_MSG_NOTICE([Neither "$new_path" nor "$new_path.exe/cmd" can be found])
+      AC_MSG_ERROR([Cannot locate the the path of $1])
+    fi
+  else
+    input_to_shortpath="$new_path"
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+  new_path="$input_to_shortpath"
+  BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN([$input_to_shortpath])
+  # remove trailing .exe if any
+  new_path="${new_path/%.exe/}"
+])
+
+AC_DEFUN([BASIC_FIXUP_EXECUTABLE_MSYS],
+[
+  # First separate the path from the arguments. This will split at the first
+  # space.
+  complete="[$]$1"
+  path="${complete%% *}"
+  tmp="$complete EOL"
+  arguments="${tmp#* }"
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  new_path="$path"
+  BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
+
+  # Now try to locate executable using which
+  new_path=`$WHICH "$new_path" 2> /dev/null`
+  
+  if test "x$new_path" = x; then
+    # Oops. Which didn't find the executable.
+    # The splitting of arguments from the executable at a space might have been incorrect,
+    # since paths with space are more likely in Windows. Give it another try with the whole
+    # argument.
+    path="$complete"
+    arguments="EOL"
+    new_path="$path"
+    BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
+    
+    new_path=`$WHICH "$new_path" 2> /dev/null`
+    
+    if test "x$new_path" = x; then
+      # It's still not found. Now this is an unrecoverable error.
+      AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        AC_MSG_NOTICE([You might be mixing spaces in the path and extra arguments, which is not allowed.])
+      fi
+      AC_MSG_ERROR([Cannot locate the the path of $1])
+    fi
+  fi
+
+  # Now new_path has a complete unix path to the binary
+  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+    # Keep paths in /bin as-is, but remove trailing .exe if any
+    new_path="${new_path/%.exe/}"
+    # Do not save /bin paths to all_fixpath_prefixes!
+  else
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $new_path`
+    BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path])
+    # Output is in $new_path
+    BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
+    # remove trailing .exe if any
+    new_path="${new_path/%.exe/}"
+
+    # Save the first 10 bytes of this path to the storage, so fixpath can work.
+    all_fixpath_prefixes=("${all_fixpath_prefixes@<:@@@:>@}" "${new_path:0:10}")
+  fi
+])
+
+# Setup basic configuration paths, and platform-specific stuff related to PATHs.
+AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
+[
+  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
+  if test $SRC_ROOT_LENGTH -gt 100; then
+      AC_MSG_ERROR([Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported])
+  fi
+
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    AC_MSG_CHECKING([cygwin release])
+    CYGWIN_VERSION=`$UNAME -r`
+    AC_MSG_RESULT([$CYGWIN_VERSION])
+    WINDOWS_ENV_VENDOR='cygwin'
+    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
+    
+    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
+    if test "x$CYGWIN_VERSION_OK" = x; then
+      AC_MSG_NOTICE([Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade.])
+      AC_MSG_ERROR([Cannot continue])
+    fi
+    if test "x$CYGPATH" = x; then
+        AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path])
+    fi
+    AC_MSG_CHECKING([cygwin root directory as unix-style path])
+    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
+    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
+    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
+    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
+    AC_MSG_RESULT([$CYGWIN_ROOT_PATH])
+    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
+    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
+    if test "x$test_cygdrive_prefix" = x; then
+        AC_MSG_ERROR([Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c.])
+    fi
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    AC_MSG_CHECKING([msys release])
+    MSYS_VERSION=`$UNAME -r`
+    AC_MSG_RESULT([$MSYS_VERSION])
+    
+    WINDOWS_ENV_VENDOR='msys'
+    WINDOWS_ENV_VERSION="$MSYS_VERSION"
+
+    AC_MSG_CHECKING([msys root directory as unix-style path])
+    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
+    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
+    BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(MSYS_ROOT_PATH)
+    AC_MSG_RESULT([$MSYS_ROOT_PATH])
+    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
+  else
+    AC_MSG_ERROR([Unknown Windows environment. Neither cygwin nor msys was detected.])
+  fi
+
+  # Test if windows or unix (cygwin/msys) find is first in path.
+  AC_MSG_CHECKING([what kind of 'find' is first on the PATH])
+  FIND_BINARY_OUTPUT=`find --version 2>&1`
+  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
+    AC_MSG_RESULT([unix style])
+  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
+    AC_MSG_RESULT([Windows])
+    AC_MSG_NOTICE([Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools.])
+    AC_MSG_NOTICE([This will not work. Please correct and make sure /usr/bin (or similar) is first in path.])
+    AC_MSG_ERROR([Cannot continue])
+  else
+    AC_MSG_RESULT([unknown])
+    AC_MSG_WARN([It seems that your find utility is non-standard.])
+  fi
+])
+
+AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH],
+[
+# When using cygwin or msys, we need a wrapper binary that renames
+# /cygdrive/c/ arguments into c:/ arguments and peeks into
+# @files and rewrites these too! This wrapper binary is
+# called fixpath.
+FIXPATH=
+if test "x$OPENJDK_BUILD_OS" = xwindows; then
+    AC_MSG_CHECKING([if fixpath can be created])
+    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
+    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
+    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
+      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
+      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
+      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
+      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
+    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
+      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
+      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
+
+      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
+      # @ was chosen as separator to minimize risk of other tools messing around with it
+      all_unique_prefixes=`echo "${all_fixpath_prefixes@<:@@@:>@}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
+      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
+      
+      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
+    fi
+    rm -f $OUTPUT_ROOT/fixpath*
+    cd $OUTPUT_ROOT
+    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
+    cd $CURDIR
+
+    if test ! -x $OUTPUT_ROOT/fixpath.exe; then 
+        AC_MSG_RESULT([no])
+        cat $OUTPUT_ROOT/fixpath1.log
+        AC_MSG_ERROR([Could not create $OUTPUT_ROOT/fixpath.exe])
+    fi
+    AC_MSG_RESULT([yes])
+    AC_MSG_CHECKING([if fixpath.exe works])
+    cd $OUTPUT_ROOT
+    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1 
+    cd $CURDIR
+    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then 
+        AC_MSG_RESULT([no])
+        cat $OUTPUT_ROOT/fixpath2.log
+        AC_MSG_ERROR([fixpath did not work!])
+    fi
+    AC_MSG_RESULT([yes])
+    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
+fi
+
+AC_SUBST(FIXPATH)
+])
--- a/common/autoconf/boot-jdk.m4	Wed Oct 31 18:30:51 2012 -0700
+++ b/common/autoconf/boot-jdk.m4	Wed Jul 05 18:27:48 2017 +0200
@@ -62,9 +62,12 @@
             else
               # We're done! :-)
               BOOT_JDK_FOUND=yes
-              SPACESAFE(BOOT_JDK,[the path to the Boot JDK])
+              BASIC_FIXUP_PATH(BOOT_JDK)
               AC_MSG_CHECKING([for Boot JDK])
-              AC_MSG_RESULT([$BOOT_JDK ($BOOT_JDK_VERSION)])
+              AC_MSG_RESULT([$BOOT_JDK])
+              AC_MSG_CHECKING([Boot JDK version])
+              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
+              AC_MSG_RESULT([$BOOT_JDK_VERSION])
             fi # end check jdk version
           fi # end check rt.jar
         fi # end check javac
@@ -93,12 +96,8 @@
 AC_DEFUN([BOOTJDK_CHECK_JAVA_HOME],
 [
     if test "x$JAVA_HOME" != x; then
-        if test "x$OPENJDK_TARGET_OS" = xwindows; then
-          # On Windows, JAVA_HOME is likely in DOS-style
-          JAVA_HOME_PROCESSED="`$CYGPATH -u "$JAVA_HOME"`"
-        else
-          JAVA_HOME_PROCESSED="$JAVA_HOME"
-        fi
+        JAVA_HOME_PROCESSED="$JAVA_HOME"
+        BASIC_FIXUP_PATH(JAVA_HOME_PROCESSED)
         if test ! -d "$JAVA_HOME_PROCESSED"; then
             AC_MSG_NOTICE([Your JAVA_HOME points to a non-existing directory!])
         else
@@ -125,8 +124,7 @@
         # Lets find the JDK/JRE directory by following symbolic links.
         # Linux/GNU systems often have links from /usr/bin/java to 
         # /etc/alternatives/java to the real JDK binary.
-        SET_FULL_PATH_SPACESAFE(BINARY)
-        REMOVE_SYMBOLIC_LINKS(BINARY)
+        BASIC_REMOVE_SYMBOLIC_LINKS(BINARY)
         BOOT_JDK=`dirname "$BINARY"`
         BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
         if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
@@ -155,13 +153,17 @@
 [
   BOOT_JDK_PREFIX="$1"
   BOOT_JDK_SUFFIX="$2"
-  BEST_JDK_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $GREP jdk | $SORT -r | $HEAD -n 1 `
-  if test "x$BEST_JDK_FOUND" != x; then
-    BOOT_JDK="${BOOT_JDK_PREFIX}/${BEST_JDK_FOUND}${BOOT_JDK_SUFFIX}"
-    if test -d "$BOOT_JDK"; then
-      BOOT_JDK_FOUND=maybe
-      AC_MSG_NOTICE([Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)])
-    fi
+  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
+  if test "x$ALL_JDKS_FOUND" != x; then
+    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
+      BOOTJDK_DO_CHECK([
+        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
+        if test -d "$BOOT_JDK"; then
+          BOOT_JDK_FOUND=maybe
+          AC_MSG_NOTICE([Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)])
+        fi
+      ])
+    done
   fi
 ])
 
@@ -171,7 +173,9 @@
 AC_DEFUN([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY],
 [
   if test "x[$]$1" != x; then
-    BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([`$CYGPATH -u "[$]$1"`/Java])
+    VIRTUAL_DIR="[$]$1/Java"
+    BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VIRTUAL_DIR)
+    BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY($VIRTUAL_DIR)
   fi
 ])
 
@@ -187,6 +191,8 @@
   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
     BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([/Library/Java/JavaVirtualMachines],[/Contents/Home])])
     BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([/System/Library/Java/JavaVirtualMachines],[/Contents/Home])])
+  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
+    BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([/usr/lib/jvm])])
   fi
 ])
 
--- a/common/autoconf/build-aux/config.guess	Wed Oct 31 18:30:51 2012 -0700
+++ b/common/autoconf/build-aux/config.guess	Wed Jul 05 18:27:48 2017 +0200
@@ -48,6 +48,9 @@
 
 # Test and fix cygwin on x86_64
 echo $OUT | grep 86-pc-cygwin > /dev/null 2> /dev/null
+if test $? != 0; then
+  echo $OUT | grep 86-pc-mingw > /dev/null 2> /dev/null
+fi
 if test $? = 0; then
   case `echo $PROCESSOR_IDENTIFIER | cut -f1 -d' '` in
     intel64|Intel64|INTEL64|em64t|EM64T|amd64|AMD64|8664|x86_64)
--- a/common/autoconf/build-performance.m4	Wed Oct 31 18:30:51 2012 -0700
+++ b/common/autoconf/build-performance.m4	Wed Jul 05 18:27:48 2017 +0200
@@ -41,6 +41,10 @@
         # Looks like a MacOSX system
         NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print [$]5}'`
         FOUND_CORES=yes
+    elif test -n "$NUMBER_OF_PROCESSORS"; then
+        # On windows, look in the env
+        NUM_CORES=$NUMBER_OF_PROCESSORS
+        FOUND_CORES=yes
     fi
 
     # For c/c++ code we run twice as many concurrent build
@@ -50,7 +54,8 @@
     if test "x$FOUND_CORES" = xyes; then
         AC_MSG_RESULT([$NUM_CORES])
     else
-        AC_MSG_RESULT([could not detect number of cores, defaulting to 1!])
+        AC_MSG_RESULT([could not detect number of cores, defaulting to 1])
+        AC_MSG_WARN([This will disable all parallelism from build!])
     fi 
 
 ])
@@ -76,16 +81,18 @@
         MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print [$]2}'`
         MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
         FOUND_MEM=yes
-    elif test "x$build_os" = xwindows; then
+    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
         # Windows, but without cygwin
-        MEMORY_SIZE=`systeminfo | grep 'Total Physical Memory:' | awk '{ print [$]4 }' | sed 's/,//'`
+        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
+        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
         FOUND_MEM=yes    
     fi
 
     if test "x$FOUND_MEM" = xyes; then
         AC_MSG_RESULT([$MEMORY_SIZE MB])
     else
-        AC_MSG_RESULT([could not detect memory size defaulting to 1024 MB!])
+        AC_MSG_RESULT([could not detect memory size, defaulting to 1024 MB])
+        AC_MSG_WARN([This might seriously impact build performance!])
     fi 
 ])
 
@@ -123,7 +130,7 @@
 [
     AC_ARG_ENABLE([ccache],
 	      [AS_HELP_STRING([--disable-ccache],
-	      		      [use ccache to speed up recompilations @<:@enabled@:>@])],
+	      		      [disable using ccache to speed up recompilations @<:@enabled@:>@])],
               [ENABLE_CCACHE=${enable_ccache}], [ENABLE_CCACHE=yes])
     if test "x$ENABLE_CCACHE" = xyes; then
         AC_PATH_PROG(CCACHE, ccache)
@@ -196,7 +203,7 @@
 # Can the C/C++ compiler use precompiled headers?
 #
 AC_ARG_ENABLE([precompiled-headers], [AS_HELP_STRING([--disable-precompiled-headers],
-	[use precompiled headers when compiling C++ @<:@enabled@:>@])],
+	[disable using precompiled headers when compiling C++ @<:@enabled@:>@])],
     [ENABLE_PRECOMPH=${enable_precompiled-headers}], [ENABLE_PRECOMPH=yes])
 
 USE_PRECOMPILED_HEADER=1
@@ -228,8 +235,7 @@
 AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC],
 [
 AC_ARG_WITH(sjavac-server-java, [AS_HELP_STRING([--with-sjavac-server-java],
-	[use this java binary for running the sjavac background server and other long running java tasks in the build process,
-     e.g. ---with-sjavac-server-java="/opt/jrockit/bin/java -server"])])
+	[use this java binary for running the sjavac background server @<:@Boot JDK java@:>@])])
 
 if test "x$with_sjavac_server_java" != x; then
     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
--- a/common/autoconf/builddeps.m4	Wed Oct 31 18:30:51 2012 -0700
+++ b/common/autoconf/builddeps.m4	Wed Jul 05 18:27:48 2017 +0200
@@ -235,26 +235,13 @@
     [use this configuration file for the builddeps])])
 
 AC_ARG_WITH(builddeps-server, [AS_HELP_STRING([--with-builddeps-server],
-    [download and use build dependencies from this server url, e.g. --with-builddeps-server=ftp://example.com/dir])])
+    [download and use build dependencies from this server url])])
 
 AC_ARG_WITH(builddeps-dir, [AS_HELP_STRING([--with-builddeps-dir],
-    [store downloaded build dependencies here @<:@d/localhome/builddeps@:>@])],
+    [store downloaded build dependencies here @<:@/localhome/builddeps@:>@])],
     [],
     [with_builddeps_dir=/localhome/builddeps])
 
 AC_ARG_WITH(builddeps-group, [AS_HELP_STRING([--with-builddeps-group],
     [chgrp the downloaded build dependencies to this group])])
-
-AC_ARG_ENABLE([list-builddeps], [AS_HELP_STRING([--enable-list-builddeps],
-	[list all build dependencies known to the configure script])],
-	[LIST_BUILDDEPS="${enableval}"], [LIST_BUILDDEPS='no'])
-
-if test "x$LIST_BUILDDEPS" = xyes; then
-    echo
-    echo List of build dependencies known to the configure script,
-    echo that can be used in builddeps.conf files:
-    cat $AUTOCONF_DIR/*.ac $AUTOCONF_DIR/*.m4 | grep BDEPS_CHECK_MODUL[E]\( | cut -f 2 -d ',' | tr -d ' ' | sort
-    echo
-    exit 1
-fi
 ])
--- a/common/autoconf/closed.version.numbers	Wed Oct 31 18:30:51 2012 -0700
+++ b/common/autoconf/closed.version.numbers	Wed Jul 05 18:27:48 2017 +0200
@@ -26,3 +26,7 @@
 PRODUCT_SUFFIX="SE Runtime Environment"
 JDK_RC_PLATFORM_NAME="Platform SE"
 COMPANY_NAME="Oracle Corporation"
+
+# Might need better names for these
+MACOSX_BUNDLE_NAME_BASE="Java SE"
+MACOSX_BUNDLE_ID_BASE="com.oracle.java"
--- a/common/autoconf/compare.sh.in	Wed Oct 31 18:30:51 2012 -0700
+++ b/common/autoconf/compare.sh.in	Wed Jul 05 18:27:48 2017 +0200
@@ -40,12 +40,12 @@
 CP="@CP@"
 CUT="@CUT@"
 DIFF="@DIFF@"
-DUMPBIN="@UNCYGDRIVE@ @DUMPBIN@"
+DUMPBIN="@FIXPATH@ @DUMPBIN@"
 EXPR="@EXPR@"
 FILE="@FILE@"
 FIND="@FIND@"
 GREP="@GREP@"
-JAVAP="@UNCYGDRIVE@ @BOOT_JDK@/bin/javap"
+JAVAP="@FIXPATH@ @BOOT_JDK@/bin/javap"
 LDD="@LDD@"
 MKDIR="@MKDIR@"
 NM="@NM@"
@@ -56,6 +56,7 @@
 RM="@RM@"
 SED="@SED@"
 SORT="@SORT@"
+STAT="@STAT@"
 STRIP="@POST_STRIP_CMD@"
 TEE="@TEE@"
 UNIQ="@UNIQ@"
@@ -63,1607 +64,15 @@
 
 SRC_ROOT="@SRC_ROOT@"
 
-if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
-    READELF_CMD="otool -v -V -h -X -t -d"
-elif [ -n "$READELF" ] && [ "$OPENJDK_TARGET_OS" != "windows" ]; then
-    READELF_CMD="$READELF -a"
-fi
-
-if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
-    LDD_CMD="$OTOOL -L"
-elif [ -n "$LDD" ]; then
-    LDD_CMD="$LDD"
-fi
-
-##########################################################################################
-# Diff exceptions
-
-if [ "$OPENJDK_TARGET_OS" = "linux" ] && [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; then
-STRIP_BEFORE_COMPARE="
-./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
-./demo/jvmti/gctest/lib/libgctest.so
-./demo/jvmti/heapTracker/lib/libheapTracker.so
-./demo/jvmti/heapViewer/lib/libheapViewer.so
-./demo/jvmti/hprof/lib/libhprof.so
-./demo/jvmti/minst/lib/libminst.so
-./demo/jvmti/mtrace/lib/libmtrace.so
-./demo/jvmti/versionCheck/lib/libversionCheck.so
-./demo/jvmti/waiters/lib/libwaiters.so
-"
-
-KNOWN_BIN_DIFF="
-"
-
-ACCEPTED_BIN_DIFF="
-./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
-./demo/jvmti/gctest/lib/libgctest.so
-./demo/jvmti/heapTracker/lib/libheapTracker.so
-./demo/jvmti/heapViewer/lib/libheapViewer.so
-./demo/jvmti/hprof/lib/libhprof.so
-./demo/jvmti/minst/lib/libminst.so
-./demo/jvmti/mtrace/lib/libmtrace.so
-./demo/jvmti/versionCheck/lib/libversionCheck.so
-./demo/jvmti/waiters/lib/libwaiters.so
-./jre/lib/amd64/libattach.so
-./jre/lib/amd64/libdt_socket.so
-./jre/lib/amd64/libhprof.so
-./jre/lib/amd64/libinstrument.so
-./jre/lib/amd64/libjava_crw_demo.so
-./jre/lib/amd64/libjsdt.so
-./jre/lib/amd64/libjsig.so
-./jre/lib/amd64/libmanagement.so
-./jre/lib/amd64/libnpt.so
-./jre/lib/amd64/libsaproc.so
-./jre/lib/amd64/libverify.so
-./jre/lib/amd64/server/libjsig.so
-./jre/lib/amd64/server/libjvm.so
-./bin/appletviewer
-./bin/extcheck
-./bin/idlj
-./bin/jar
-./bin/jarsigner
-./bin/java
-./bin/javac
-./bin/javadoc
-./bin/javah
-./bin/javap
-./bin/jcmd
-./bin/jconsole
-./bin/jdb
-./bin/jhat
-./bin/jinfo
-./bin/jmap
-./bin/jps
-./bin/jrunscript
-./bin/jsadebugd
-./bin/jstack
-./bin/jstat
-./bin/jstatd
-./bin/keytool
-./bin/native2ascii
-./bin/orbd
-./bin/pack200
-./bin/policytool
-./bin/rmic
-./bin/rmid
-./bin/rmiregistry
-./bin/schemagen
-./bin/serialver
-./bin/servertool
-./bin/tnameserv
-./bin/wsgen
-./bin/wsimport
-./bin/xjc
-./jre/bin/java
-./jre/bin/keytool
-./jre/bin/orbd
-./jre/bin/pack200
-./jre/bin/policytool
-./jre/bin/rmid
-./jre/bin/rmiregistry
-./jre/bin/servertool
-./jre/bin/tnameserv
-"
-
-KNOWN_SIZE_DIFF="
-"
-
-KNOWN_SYM_DIFF="
-"
-
-KNOWN_ELF_DIFF="
-./demo/jvmti/heapTracker/lib/libheapTracker.so
-./demo/jvmti/hprof/lib/libhprof.so
-./demo/jvmti/waiters/lib/libwaiters.so
-"
-fi
-
-if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "x86" ]; then
-
-STRIP_BEFORE_COMPARE="
-./demo/jni/Poller/lib/libPoller.so
-./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
-./demo/jvmti/gctest/lib/libgctest.so
-./demo/jvmti/heapTracker/lib/libheapTracker.so
-./demo/jvmti/heapViewer/lib/libheapViewer.so
-./demo/jvmti/hprof/lib/libhprof.so
-./demo/jvmti/minst/lib/libminst.so
-./demo/jvmti/mtrace/lib/libmtrace.so
-./demo/jvmti/versionCheck/lib/libversionCheck.so
-./demo/jvmti/waiters/lib/libwaiters.so
-./jre/lib/i386/jexec
-"
-
-SORT_SYMBOLS="
-./jre/lib/i386/client/libjvm.so
-./jre/lib/i386/server/libjvm.so
-"
-
-SKIP_BIN_DIFF="true"
-
-ACCEPTED_SMALL_SIZE_DIFF="
-./demo/jni/Poller/lib/libPoller.so
-./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
-./demo/jvmti/gctest/lib/libgctest.so
-./demo/jvmti/heapTracker/lib/libheapTracker.so
-./demo/jvmti/heapViewer/lib/libheapViewer.so
-./demo/jvmti/hprof/lib/libhprof.so
-./demo/jvmti/minst/lib/libminst.so
-./demo/jvmti/mtrace/lib/libmtrace.so
-./demo/jvmti/versionCheck/lib/libversionCheck.so
-./demo/jvmti/waiters/lib/libwaiters.so
-./jre/lib/i386/client/libjvm.so
-./jre/lib/i386/jli/libjli.so
-./jre/lib/i386/libJdbcOdbc.so
-./jre/lib/i386/libattach.so
-./jre/lib/i386/libawt.so
-./jre/lib/i386/libawt_headless.so
-./jre/lib/i386/libawt_xawt.so
-./jre/lib/i386/libdcpr.so
-./jre/lib/i386/libdt_socket.so
-./jre/lib/i386/libfontmanager.so
-./jre/lib/i386/libhprof.so
-./jre/lib/i386/libinstrument.so
-./jre/lib/i386/libj2gss.so
-./jre/lib/i386/libj2pcsc.so
-./jre/lib/i386/libj2pkcs11.so
-./jre/lib/i386/libj2ucrypto.so
-./jre/lib/i386/libjaas_unix.so
-./jre/lib/i386/libjava.so
-./jre/lib/i386/libjava_crw_demo.so
-./jre/lib/i386/libjawt.so
-./jre/lib/i386/libjdwp.so
-./jre/lib/i386/libjfr.so
-./jre/lib/i386/libjpeg.so
-./jre/lib/i386/libjsdt.so
-./jre/lib/i386/libjsound.so
-./jre/lib/i386/libkcms.so
-./jre/lib/i386/libmanagement.so
-./jre/lib/i386/libmlib_image.so
-./jre/lib/i386/libnet.so
-./jre/lib/i386/libnio.so
-./jre/lib/i386/libnpt.so
-./jre/lib/i386/libsctp.so
-./jre/lib/i386/libsplashscreen.so
-./jre/lib/i386/libsunec.so
-./jre/lib/i386/libsunwjdga.so
-./jre/lib/i386/libt2k.so
-./jre/lib/i386/libunpack.so
-./jre/lib/i386/libverify.so
-./jre/lib/i386/libzip.so
-./jre/lib/i386/server/libjvm.so
-./bin/appletviewer
-./bin/extcheck
-./bin/idlj
-./bin/jar
-./bin/jarsigner
-./bin/java
-./bin/javac
-./bin/javadoc
-./bin/javah
-./bin/javap
-./bin/jcmd
-./bin/jconsole
-./bin/jdb
-./bin/jhat
-./bin/jinfo
-./bin/jmap
-./bin/jps
-./bin/jrunscript
-./bin/jsadebugd
-./bin/jstack
-./bin/jstat
-./bin/jstatd
-./bin/keytool
-./bin/native2ascii
-./bin/orbd
-./bin/pack200
-./bin/policytool
-./bin/rmic
-./bin/rmid
-./bin/rmiregistry
-./bin/schemagen
-./bin/serialver
-./bin/servertool
-./bin/tnameserv
-./bin/unpack200
-./bin/wsgen
-./bin/wsimport
-./bin/xjc
-./jre/bin/java
-./jre/bin/keytool
-./jre/bin/orbd
-./jre/bin/pack200
-./jre/bin/policytool
-./jre/bin/rmid
-./jre/bin/rmiregistry
-./jre/bin/servertool
-./jre/bin/tnameserv
-./jre/bin/unpack200
-./jre/lib/i386/jexec
-"
-
-SKIP_ELF_DIFF="true"
-
-# libjvm.so differs in the random 15 char prefix on some symbols.
-ACCEPTED_DIS_DIFF="
-./jre/lib/i386/client/libjvm.so
-./jre/lib/i386/server/libjvm.so
-"
-
-fi
-
-if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; then
-
-STRIP_BEFORE_COMPARE="
-./demo/jni/Poller/lib/amd64/libPoller.so
-./demo/jvmti/compiledMethodLoad/lib/amd64/libcompiledMethodLoad.so
-./demo/jvmti/gctest/lib/amd64/libgctest.so
-./demo/jvmti/heapTracker/lib/amd64/libheapTracker.so
-./demo/jvmti/heapViewer/lib/amd64/libheapViewer.so
-./demo/jvmti/hprof/lib/amd64/libhprof.so
-./demo/jvmti/minst/lib/amd64/libminst.so
-./demo/jvmti/mtrace/lib/amd64/libmtrace.so
-./demo/jvmti/versionCheck/lib/amd64/libversionCheck.so
-./demo/jvmti/waiters/lib/amd64/libwaiters.so
-"
-
-SORT_SYMBOLS="
-./jre/lib/amd64/server/libjvm.so
-"
-
-SKIP_BIN_DIFF="true"
-
-ACCEPTED_SMALL_SIZE_DIFF="
-./demo/jni/Poller/lib/amd64/libPoller.so
-./demo/jvmti/compiledMethodLoad/lib/amd64/libcompiledMethodLoad.so
-./demo/jvmti/gctest/lib/amd64/libgctest.so
-./demo/jvmti/heapTracker/lib/amd64/libheapTracker.so
-./demo/jvmti/heapViewer/lib/amd64/libheapViewer.so
-./demo/jvmti/hprof/lib/amd64/libhprof.so
-./demo/jvmti/minst/lib/amd64/libminst.so
-./demo/jvmti/mtrace/lib/amd64/libmtrace.so
-./demo/jvmti/versionCheck/lib/amd64/libversionCheck.so
-./demo/jvmti/waiters/lib/amd64/libwaiters.so
-./jre/lib/amd64/jli/libjli.so
-./jre/lib/amd64/libJdbcOdbc.so
-./jre/lib/amd64/libattach.so
-./jre/lib/amd64/libawt.so
-./jre/lib/amd64/libawt_headless.so
-./jre/lib/amd64/libawt_xawt.so
-./jre/lib/amd64/libdcpr.so
-./jre/lib/amd64/libdt_socket.so
-./jre/lib/amd64/libfontmanager.so
-./jre/lib/amd64/libhprof.so
-./jre/lib/amd64/libinstrument.so
-./jre/lib/amd64/libj2gss.so
-./jre/lib/amd64/libj2pcsc.so
-./jre/lib/amd64/libj2pkcs11.so
-./jre/lib/amd64/libj2ucrypto.so
-./jre/lib/amd64/libjaas_unix.so
-./jre/lib/amd64/libjava.so
-./jre/lib/amd64/libjava_crw_demo.so
-./jre/lib/amd64/libjawt.so
-./jre/lib/amd64/libjdwp.so
-./jre/lib/amd64/libjfr.so
-./jre/lib/amd64/libjpeg.so
-./jre/lib/amd64/libjsdt.so
-./jre/lib/amd64/libjsound.so
-./jre/lib/amd64/libkcms.so
-./jre/lib/amd64/libmanagement.so
-./jre/lib/amd64/libmlib_image.so
-./jre/lib/amd64/libnet.so
-./jre/lib/amd64/libnio.so
-./jre/lib/amd64/libnpt.so
-./jre/lib/amd64/libsctp.so
-./jre/lib/amd64/libsplashscreen.so
-./jre/lib/amd64/libsunec.so
-./jre/lib/amd64/libsunwjdga.so
-./jre/lib/amd64/libt2k.so
-./jre/lib/amd64/libunpack.so
-./jre/lib/amd64/libverify.so
-./jre/lib/amd64/libzip.so
-./jre/lib/amd64/server/64/libjvm_db.so
-./jre/lib/amd64/server/64/libjvm_dtrace.so
-./bin/amd64/appletviewer
-./bin/amd64/extcheck
-./bin/amd64/idlj
-./bin/amd64/jar
-./bin/amd64/jarsigner
-./bin/amd64/java
-./bin/amd64/javac
-./bin/amd64/javadoc
-./bin/amd64/javah
-./bin/amd64/javap
-./bin/amd64/jcmd
-./bin/amd64/jconsole
-./bin/amd64/jdb
-./bin/amd64/jhat
-./bin/amd64/jinfo
-./bin/amd64/jmap
-./bin/amd64/jps
-./bin/amd64/jrunscript
-./bin/amd64/jsadebugd
-./bin/amd64/jstack
-./bin/amd64/jstat
-./bin/amd64/jstatd
-./bin/amd64/keytool
-./bin/amd64/native2ascii
-./bin/amd64/orbd
-./bin/amd64/pack200
-./bin/amd64/policytool
-./bin/amd64/rmic
-./bin/amd64/rmid
-./bin/amd64/rmiregistry
-./bin/amd64/schemagen
-./bin/amd64/serialver
-./bin/amd64/servertool
-./bin/amd64/tnameserv
-./bin/amd64/unpack200
-./bin/amd64/wsgen
-./bin/amd64/wsimport
-./bin/amd64/xjc
-./jre/bin/amd64/java
-./jre/bin/amd64/keytool
-./jre/bin/amd64/orbd
-./jre/bin/amd64/pack200
-./jre/bin/amd64/policytool
-./jre/bin/amd64/rmid
-./jre/bin/amd64/rmiregistry
-./jre/bin/amd64/servertool
-./jre/bin/amd64/tnameserv
-./jre/bin/amd64/unpack200
-./jre/lib/amd64/jexec
-"
-
-SKIP_ELF_DIFF="true"
-
-# Can't find an explaination for the diff in libmlib_image.so.
-KNOWN_DIS_DIFF="
-./jre/lib/amd64/libmlib_image.so
-"
-# libjvm.so differs in the random 15 char prefix on some symbols.
-ACCEPTED_DIS_DIFF="
-./jre/lib/amd64/server/libjvm.so
-"
-
-fi
-
-if [ "$OPENJDK_TARGET_OS" = "windows" ] && [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; then
-
-ACCEPTED_BIN_DIFF="
-./bin/jli.dll
-./demo/jvmti/compiledMethodLoad/lib/compiledMethodLoad.dll
-./demo/jvmti/gctest/lib/gctest.dll
-./demo/jvmti/heapTracker/lib/heapTracker.dll
-./demo/jvmti/heapViewer/lib/heapViewer.dll
-./demo/jvmti/hprof/lib/hprof.dll
-./demo/jvmti/minst/lib/minst.dll
-./demo/jvmti/mtrace/lib/mtrace.dll
-./demo/jvmti/versionCheck/lib/versionCheck.dll
-./demo/jvmti/waiters/lib/waiters.dll
-./jre/bin/attach.dll
-./jre/bin/awt.dll
-./jre/bin/dcpr.dll
-./jre/bin/dt_shmem.dll
-./jre/bin/dt_socket.dll
-./jre/bin/fontmanager.dll
-./jre/bin/hprof.dll
-./jre/bin/instrument.dll
-./jre/bin/j2pcsc.dll
-./jre/bin/j2pkcs11.dll
-./jre/bin/jaas_nt.dll
-./jre/bin/java.dll
-./jre/bin/java_crw_demo.dll
-./jre/bin/jawt.dll
-./jre/bin/JdbcOdbc.dll
-./jre/bin/jdwp.dll
-./jre/bin/jfr.dll
-./jre/bin/jli.dll
-./jre/bin/jpeg.dll
-./jre/bin/jsdt.dll
-./jre/bin/jsound.dll
-./jre/bin/jsoundds.dll
-./jre/bin/kcms.dll
-./jre/bin/management.dll
-./jre/bin/mlib_image.dll
-./jre/bin/net.dll
-./jre/bin/nio.dll
-./jre/bin/npt.dll
-./jre/bin/sawindbg.dll
-./jre/bin/server/jvm.dll
-./jre/bin/splashscreen.dll
-./jre/bin/sunec.dll
-./jre/bin/sunmscapi.dll
-./jre/bin/t2k.dll
-./jre/bin/unpack.dll
-./jre/bin/verify.dll
-./jre/bin/w2k_lsa_auth.dll
-./jre/bin/zip.dll
-./bin/appletviewer.exe
-./bin/extcheck.exe
-./bin/idlj.exe
-./bin/jar.exe
-./bin/jarsigner.exe
-./bin/java.exe
-./bin/javac.exe
-./bin/javadoc.exe
-./bin/javah.exe
-./bin/javap.exe
-./bin/java-rmi.exe
-./bin/javaw.exe
-./bin/jcmd.exe
-./bin/jconsole.exe
-./bin/jdb.exe
-./bin/jhat.exe
-./bin/jinfo.exe
-./bin/jmap.exe
-./bin/jps.exe
-./bin/jrunscript.exe
-./bin/jsadebugd.exe
-./bin/jstack.exe
-./bin/jstat.exe
-./bin/jstatd.exe
-./bin/keytool.exe
-./bin/kinit.exe
-./bin/klist.exe
-./bin/ktab.exe
-./bin/native2ascii.exe
-./bin/orbd.exe
-./bin/pack200.exe
-./bin/policytool.exe
-./bin/rmic.exe
-./bin/rmid.exe
-./bin/rmiregistry.exe
-./bin/schemagen.exe
-./bin/serialver.exe
-./bin/servertool.exe
-./bin/tnameserv.exe
-./bin/unpack200.exe
-./bin/wsgen.exe
-./bin/wsimport.exe
-./bin/xjc.exe
-./jre/bin/java.exe
-./jre/bin/java-rmi.exe
-./jre/bin/javaw.exe
-./jre/bin/keytool.exe
-./jre/bin/kinit.exe
-./jre/bin/klist.exe
-./jre/bin/ktab.exe
-./jre/bin/orbd.exe
-./jre/bin/pack200.exe
-./jre/bin/policytool.exe
-./jre/bin/rmid.exe
-./jre/bin/rmiregistry.exe
-./jre/bin/servertool.exe
-./jre/bin/tnameserv.exe
-./jre/bin/unpack200.exe
-"
-
-KNOWN_SIZE_DIFF="
-./demo/jvmti/heapTracker/lib/heapTracker.dll
-./demo/jvmti/minst/lib/minst.dll
-./jre/bin/awt.dll
-./jre/bin/java_crw_demo.dll
-./bin/java.exe
-./bin/javaw.exe
-./bin/unpack200.exe
-./jre/bin/java.exe
-./jre/bin/javaw.exe
-./jre/bin/unpack200.exe
-"
-
-KNOWN_SYM_DIFF="
-./jre/bin/awt.dll
-./jre/bin/java_crw_demo.dll
-"
-fi
-
-
-
-if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
-ACCEPTED_JARZIP_CONTENTS="
-/META-INF/INDEX.LIST
-"
-
-KNOWN_BIN_DIFF="
-./jre/lib/libJObjC.dylib
-./jre/lib/libsaproc.dylib
-./jre/lib/server/libjvm.dylib
-"
-
-ACCEPTED_BIN_DIFF="
-./bin/appletviewer
-./bin/extcheck
-./bin/idlj
-./bin/jar
-./bin/jarsigner
-./bin/java
-./bin/javac
-./bin/javadoc
-./bin/javah
-./bin/javap
-./bin/jcmd
-./bin/jconsole
-./bin/jdb
-./bin/jhat
-./bin/jinfo
-./bin/jmap
-./bin/jps
-./bin/jrunscript
-./bin/jsadebugd
-./bin/jstack
-./bin/jstat
-./bin/jstatd
-./bin/keytool
-./bin/native2ascii
-./bin/orbd
-./bin/pack200
-./bin/policytool
-./bin/rmic
-./bin/rmid
-./bin/rmiregistry
-./bin/schemagen
-./bin/serialver
-./bin/servertool
-./bin/tnameserv
-./bin/wsgen
-./bin/wsimport
-./bin/xjc
-./jre/bin/java
-./jre/bin/keytool
-./jre/bin/orbd
-./jre/bin/pack200
-./jre/bin/policytool
-./jre/bin/rmid
-./jre/bin/rmiregistry
-./jre/bin/servertool
-./jre/bin/tnameserv
-"
-
-KNOWN_SIZE_DIFF="
-./jre/lib/libJObjC.dylib
-./jre/lib/server/libjvm.dylib
-"
-
-KNOWN_SYM_DIFF="
-./jre/lib/libJObjC.dylib
-./jre/lib/server/libjvm.dylib
-"
-
-KNOWN_ELF_DIFF="
-./jre/lib/libJObjC.dylib
-./jre/lib/server/libjvm.dylib
-"
-
-SKIP_DIS_DIFF="true"
-
+if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
+    PATH="@VS_PATH@"
 fi
 
-##########################################################################################
-# Compare text files and ignore specific differences:
-#
-#  * Timestamps in Java sources generated by idl2java
-#  * Sorting order and cleanup style in .properties files
-
-diff_text() {
-    OTHER_FILE=$1
-    THIS_FILE=$2
-
-    SUFFIX="${THIS_FILE##*.}"
-
-    TMP=1
-
-    if [[ "$THIS_FILE" = *"META-INF/MANIFEST.MF" ]]; then
-        TMP=$(LANG=C $DIFF $OTHER_FILE $THIS_FILE | \
-            $GREP '^[<>]' | \
-            $SED -e '/[<>] Ant-Version: Apache Ant .*/d' \
-	         -e '/[<>] Created-By: .* (Oracle Corporation).*/d')
-    fi
-    if test "x$SUFFIX" = "xjava"; then
-        TMP=$(LANG=C $DIFF $OTHER_FILE $THIS_FILE | \
-            $GREP '^[<>]' | \
-            $SED -e '/[<>] \* from.*\.idl/d' \
-                 -e '/[<>] \*.*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d' \
-                 -e '/[<>] \*.*[0-9]\{4\} [0-9][0-9]*:[0-9]\{2\}:[0-9]\{2\}.*/d' \
-                 -e '/\/\/ Generated from input file.*/d' \
-                 -e '/\/\/ This file was generated AUTOMATICALLY from a template file.*/d' \
-                 -e '/\/\/ java GenerateCharacter.*/d')
-    fi
-    # Ignore date strings in class files.
-    # On Macosx the system sources for generated java classes produce different output on 
-    # consequtive invokations seemingly randomly.
-    # For example a method parameter randomly named "thePoint" or "aPoint". Ignore this.
-    if test "x$SUFFIX" = "xclass"; then
-        $JAVAP -c -constants -l -p ${OTHER_FILE} >  ${OTHER_FILE}.javap
-        $JAVAP -c -constants -l -p ${THIS_FILE} > ${THIS_FILE}.javap
-        TMP=$($DIFF ${OTHER_FILE}.javap ${THIS_FILE}.javap | \
-            $GREP '^[<>]' | \
-            $SED -e '/[<>].*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d' \
-	         -e '/[<>].*Point   Lcom\/apple\/jobjc\/foundation\/NSPoint;/d' \
-	         -e '/[<>].*public com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*itemsPtr();/d' \
-	         -e '/[<>].*public void setItemsPtr(com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*);/d')
-    fi
-    if test "x$SUFFIX" = "xproperties"; then
-        $CAT $OTHER_FILE | $SED -e 's/\([^\\]\):/\1\\:/g' -e  's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \
-            | $SED -f "$SRC_ROOT/common/bin/unicode2x.sed" \
-  	    | $SED -e '/^#/d' -e '/^$/d' \
-            -e :a -e '/\\$/N; s/\\\n//; ta' \
-  	    -e 's/^[ \t]*//;s/[ \t]*$//' \
-	    -e 's/\\=/=/' | LANG=C $SORT > $OTHER_FILE.cleaned
-        TMP=$(LANG=C $DIFF $OTHER_FILE.cleaned $THIS_FILE)
-    fi
-    if test -n "$TMP"; then
-        echo Files $OTHER_FILE and $THIS_FILE differ
-        return 1
-    fi
-
-    return 0
-}
-
-##########################################################################################
-# Compare directory structure
-
-compare_dirs() {
-    THIS_DIR=$1
-    OTHER_DIR=$2
-    WORK_DIR=$3
-
-    mkdir -p $WORK_DIR
-
-    (cd $OTHER_DIR && $FIND . -type d | $SORT > $WORK_DIR/other_dirs)
-    (cd $THIS_DIR && $FIND . -type d | $SORT > $WORK_DIR/this_dirs)
-    
-    echo -n Directory structure...
-    if $DIFF $WORK_DIR/other_dirs $WORK_DIR/this_dirs > /dev/null; then
-        echo Identical!
-    else
-        echo Differences found.
-        REGRESSIONS=true
-    # Differences in directories found.
-        ONLY_OTHER=$($DIFF $WORK_DIR/other_dirs $WORK_DIR/this_dirs | $GREP '<')
-        if [ "$ONLY_OTHER" ]; then
-            echo Only in $OTHER
-            echo $ONLY_OTHER | $SED 's|< ./|\t|g' | $SED 's/ /\n/g'
-        fi
-    # Differences in directories found.
-        ONLY_THIS=$($DIFF $WORK_DIR/other_dirs $WORK_DIR/this_dirs | $GREP '>')
-        if [ "$ONLY_THIS" ]; then
-            echo Only in $THIS
-            echo $ONLY_THIS | $SED 's|> ./|\t|g' | $SED 's/ /\n/g'
-        fi
-    fi
-}
-
-
-##########################################################################################
-# Compare file structure
-
-compare_files() {
-    THIS_DIR=$1
-    OTHER_DIR=$2
-    WORK_DIR=$3
-
-    mkdir -p $WORK_DIR
-
-    (cd $OTHER_DIR && $FIND . -type f | $SORT > $WORK_DIR/other_files)
-    (cd $THIS_DIR && $FIND . -type f | $SORT > $WORK_DIR/this_files)
-    
-    echo -n File names...
-    if diff $WORK_DIR/other_files $WORK_DIR/this_files > /dev/null; then
-        echo Identical!
-    else
-        echo Differences found.
-        REGRESSIONS=true
-    # Differences in directories found.
-        ONLY_OTHER=$(diff $WORK_DIR/other_files $WORK_DIR/this_files | $GREP '<')
-        if [ "$ONLY_OTHER" ]; then
-            echo Only in $OTHER
-            echo "$ONLY_OTHER" | sed 's|< ./|    |g'
-        fi
-    # Differences in directories found.
-        ONLY_THIS=$(diff $WORK_DIR/other_files $WORK_DIR/this_files | $GREP '>')
-        if [ "$ONLY_THIS" ]; then
-            echo Only in $THIS
-            echo "$ONLY_THIS" | sed 's|> ./|    |g'
-        fi
-    fi
-}
-
-
-##########################################################################################
-# Compare permissions
-
-compare_permissions() {
-    THIS_DIR=$1
-    OTHER_DIR=$2
-    WORK_DIR=$3
-
-    mkdir -p $WORK_DIR
-
-    echo -n Permissions...
-    found=""
-    for f in `cd $OTHER_DIR && $FIND . -type f`
-    do
-        if [ ! -f ${OTHER_DIR}/$f ]; then continue; fi
-        if [ ! -f ${THIS_DIR}/$f ]; then continue; fi
-        OP=`ls -l ${OTHER_DIR}/$f | awk '{printf("%.10s\n", $1);}'`
-        TP=`ls -l ${THIS_DIR}/$f | awk '{printf("%.10s\n", $1);}'`
-        if [ "$OP" != "$TP" ]
-        then
-	    if [ -z "$found" ]; then echo ; found="yes"; fi
-	    $PRINTF "\told: ${OP} new: ${TP}\t$f\n"
-        fi
-    done
-    if [ -z "$found" ]; then 
-        echo "Identical!"
-    else
-        REGRESSIONS=true
-    fi
-}
-
-##########################################################################################
-# Compare file command output
-
-compare_file_types() {
-    THIS_DIR=$1
-    OTHER_DIR=$2
-    WORK_DIR=$3
-
-    $MKDIR -p $WORK_DIR
-
-    echo -n File types...
-    found=""
-    for f in `cd $OTHER_DIR && $FIND . -type f`
-    do
-        if [ ! -f ${OTHER_DIR}/$f ]; then continue; fi
-        if [ ! -f ${THIS_DIR}/$f ]; then continue; fi
-        OF=`cd ${OTHER_DIR} && $FILE $f`
-        TF=`cd ${THIS_DIR} && $FILE $f`
-        if [ "$f" = "./src.zip" ] || [ "$f" = "./jre/lib/JObjC.jar" ] || [ "$f" = "./lib/JObjC.jar" ]
-        then
-	    if [ "`echo $OF | $GREP -ic zip`" -gt 0 -a "`echo $TF | $GREP -ic zip`" -gt 0 ]
-	    then
-	        # the way we produces zip-files make it so that directories are stored in old file
-	        # but not in new (only files with full-path)
-	        # this makes file-5.09 report them as different
-	        continue;
-	    fi
-        fi
-        
-        if [ "$OF" != "$TF" ]
-        then
-	    if [ -z "$found" ]; then echo ; found="yes"; fi
-	    $PRINTF "\tother: ${OF}\n\tthis : ${TF}\n"
-        fi
-    done
-    if [ -z "$found" ]; then 
-        echo "Identical!"
-    else
-        REGRESSIONS=true
-    fi
-}
-
-##########################################################################################
-# Compare the rest of the files
-
-compare_general_files() {
-    THIS_DIR=$1
-    OTHER_DIR=$2
-    WORK_DIR=$3
-    
-    GENERAL_FILES=$(cd $THIS_DIR && $FIND . -type f ! -name "*.so" ! -name "*.jar" ! -name "*.zip" \
-        ! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" \
-        ! -name "ct.sym" ! -name "*.diz" ! -name "*.dll" \
-        ! -name "*.pdb" ! -name "*.exp" ! -name "*.ilk" \
-        ! -name "*.lib" \
-        | $GREP -v "./bin/"  | $SORT | $FILTER)
-
-    echo General files...
-    for f in $GENERAL_FILES
-    do
-        if [ -e $OTHER_DIR/$f ]; then
-            DIFF_OUT=$($DIFF $OTHER_DIR/$f $THIS_DIR/$f 2>&1)
-            if [ -n "$DIFF_OUT" ]; then
-                echo $f
-                REGRESSIONS=true
-                if [ "$SHOW_DIFFS" = "true" ]; then
-                    echo "$DIFF_OUT"
-                fi
-            fi
-        fi
-    done
-
-
-}
-
-##########################################################################################
-# Compare zip file
-
-compare_zip_file() {
-    THIS_DIR=$1
-    OTHER_DIR=$2
-    WORK_DIR=$3
-    ZIP_FILE=$4
-
-    THIS_ZIP=$THIS_DIR/$ZIP_FILE
-    OTHER_ZIP=$OTHER_DIR/$ZIP_FILE
-
-    THIS_SUFFIX="${THIS_ZIP##*.}"
-    OTHER_SUFFIX="${OTHER_ZIP##*.}"
-    if [ "$THIS_SUFFIX" != "$OTHER_SUFFIX" ]; then
-        echo The files do not have the same suffix type!
-        return 2
-    fi
-
-    UNARCHIVE="$UNZIP -q"
-
-    TYPE="$THIS_SUFFIX"
-
-    if $CMP $OTHER_ZIP $THIS_ZIP > /dev/null
-    then
-        return 0
-    fi
-    # Not quite identical, the might still contain the same data.
-    # Unpack the jar/zip files in temp dirs
-    
-    THIS_UNZIPDIR=$WORK_DIR/$ZIP_FILE.this
-    OTHER_UNZIPDIR=$WORK_DIR/$ZIP_FILE.other
-    $RM -rf $THIS_UNZIPDIR $OTHER_UNZIPDIR
-    $MKDIR -p $THIS_UNZIPDIR
-    $MKDIR -p $OTHER_UNZIPDIR
-    (cd $THIS_UNZIPDIR && $UNARCHIVE $THIS_ZIP)
-    (cd $OTHER_UNZIPDIR && $UNARCHIVE $OTHER_ZIP)
-
-    CONTENTS_DIFF_FILE=$WORK_DIR/$ZIP_FILE.diff
-    LANG=C $DIFF -rq $OTHER_UNZIPDIR $THIS_UNZIPDIR > $CONTENTS_DIFF_FILE
-
-    ONLY_OTHER=$($GREP "^Only in $OTHER_UNZIPDIR" $CONTENTS_DIFF_FILE)
-    ONLY_THIS=$($GREP "^Only in $THIS_UNZIPDIR" $CONTENTS_DIFF_FILE)
-
-    return_value=0
-
-    if [ -n "$ONLY_OTHER" ]; then
-        echo "        Only OTHER $ZIP_FILE contains:"
-        echo "$ONLY_OTHER" | sed "s|Only in $OTHER_UNZIPDIR|            |"g | sed 's|: |/|g'
-        return_value=1
-    fi
-
-    if [ -n "$ONLY_THIS" ]; then
-        echo "        Only THIS $ZIP_FILE contains:"
-        echo "$ONLY_THIS" | sed "s|Only in $THIS_UNZIPDIR|            |"g | sed 's|: |/|g'
-        return_value=1
-    fi
-
-    DIFFING_FILES=$($GREP differ $CONTENTS_DIFF_FILE | $CUT -f 2 -d ' ' | $SED "s|$OTHER_UNZIPDIR/||g")
-
-    $RM -f $WORK_DIR/$ZIP_FILE.diffs
-    for file in $DIFFING_FILES; do
-	if [[ "$ACCEPTED_JARZIP_CONTENTS" != *"$file"* ]]; then
-            diff_text $OTHER_UNZIPDIR/$file $THIS_UNZIPDIR/$file >> $WORK_DIR/$ZIP_FILE.diffs
-	fi
-    done
-
-    if [ -s "$WORK_DIR/$ZIP_FILE.diffs" ]; then
-        return_value=1
-        echo "        Differing files in $ZIP_FILE"
-        $CAT $WORK_DIR/$ZIP_FILE.diffs | $GREP differ | cut -f 2 -d ' ' | \
-            $SED "s|$OTHER_UNZIPDIR|            |g" > $WORK_DIR/$ZIP_FILE.difflist
-        $CAT $WORK_DIR/$ZIP_FILE.difflist
-
-        if [ -n "$SHOW_DIFFS" ]; then
-            for i in $(cat $WORK_DIR/$ZIP_FILE.difflist) ; do
-                if [ -f "${OTHER_UNZIPDIR}/$i.javap" ]; then
-                    LANG=C $DIFF ${OTHER_UNZIPDIR}/$i.javap ${THIS_UNZIPDIR}/$i.javap
-                elif [ -f "${OTHER_UNZIPDIR}/$i.cleaned" ]; then
-                    LANG=C $DIFF ${OTHER_UNZIPDIR}/$i.cleaned ${THIS_UNZIPDIR}/$i
-                else
-                    LANG=C $DIFF ${OTHER_UNZIPDIR}/$i ${THIS_UNZIPDIR}/$i
-                fi
-            done
-        fi
-    fi
-
-    return $return_value
-}
-
-
-##########################################################################################
-# Compare all zip files
-
-compare_all_zip_files() {
-    THIS_DIR=$1
-    OTHER_DIR=$2
-    WORK_DIR=$3
-
-    ZIPS=$(cd $THIS_DIR && $FIND . -type f -name "*.zip" | $SORT | $FILTER )
-
-    if [ -n "$ZIPS" ]; then
-        echo Zip files...
-
-        return_value=0
-        for f in $ZIPS; do
-            if [ -f "$OTHER_DIR/$f" ]; then
-                compare_zip_file $THIS_DIR $OTHER_DIR $WORK_DIR $f
-                if [ "$?" != "0" ]; then
-                    return_value=1
-                    REGRESSIONS=true
-                fi
-            fi
-        done
-    fi
-
-    return $return_value
-}
-
-##########################################################################################
-# Compare all jar files
-
-compare_all_jar_files() {
-    THIS_DIR=$1
-    OTHER_DIR=$2
-    WORK_DIR=$3
-
-    # TODO filter?
-    ZIPS=$(cd $THIS_DIR && $FIND . -type f -name "*.jar" | $SORT | $FILTER)
-
-    if [ -n "$ZIPS" ]; then
-        echo Jar files...
-
-        return_value=0
-        for f in $ZIPS; do
-            if [ -f "$OTHER_DIR/$f" ]; then
-                compare_zip_file $THIS_DIR $OTHER_DIR $WORK_DIR $f
-                if [ "$?" != "0" ]; then
-                    return_value=1
-                    REGRESSIONS=true
-                fi
-            fi
-        done
-    fi
-
-    return $return_value
-}
-
-##########################################################################################
-# Compare binary (executable/library) file
-
-compare_bin_file() {
-    THIS_DIR=$1
-    OTHER_DIR=$2
-    WORK_DIR=$3
-    BIN_FILE=$4
-
-    THIS_FILE=$THIS_DIR/$BIN_FILE
-    OTHER_FILE=$OTHER_DIR/$BIN_FILE
-    NAME=$(basename $BIN_FILE)
-    WORK_FILE_BASE=$WORK_DIR/$BIN_FILE
-    FILE_WORK_DIR=$(dirname $WORK_FILE_BASE)
-
-    $MKDIR -p $FILE_WORK_DIR
-
-    ORIG_THIS_FILE="$THIS_FILE"
-    ORIG_OTHER_FILE="$OTHER_FILE"
-
-    if [[ "$STRIP_BEFORE_COMPARE" = *"$BIN_FILE"* ]]; then
-        THIS_STRIPPED_FILE=$FILE_WORK_DIR/this/$NAME
-        OTHER_STRIPPED_FILE=$FILE_WORK_DIR/other/$NAME
-        $MKDIR -p $FILE_WORK_DIR/this $FILE_WORK_DIR/other
-        $CP $THIS_FILE $THIS_STRIPPED_FILE
-        $CP $OTHER_FILE $OTHER_STRIPPED_FILE
-        $STRIP $THIS_STRIPPED_FILE
-        $STRIP $OTHER_STRIPPED_FILE
-        THIS_FILE="$THIS_STRIPPED_FILE"
-        OTHER_FILE="$OTHER_STRIPPED_FILE"
-    fi
-
-    if [ -z "$SKIP_BIN_DIFF" ]; then
-        if cmp $OTHER_FILE $THIS_FILE > /dev/null; then
-        # The files were bytewise identical.
-            if [ -n "$VERBOSE" ]; then
-                echo "        :           :         :         :          : $BIN_FILE"
-            fi
-            return 0
-        fi
-        BIN_MSG=" diff "
-        if [[ "$ACCEPTED_BIN_DIFF" != *"$BIN_FILE"* ]]; then
-            DIFF_BIN=true
-            if [[ "$KNOWN_BIN_DIFF" != *"$BIN_FILE"* ]]; then
-                BIN_MSG="*$BIN_MSG*"
-                REGRESSIONS=true
-            else
-                BIN_MSG=" $BIN_MSG "
-            fi
-        else
-            BIN_MSG="($BIN_MSG)"
-            DIFF_BIN=
-        fi
-    fi
-
-    THIS_SIZE=$(ls -l "$THIS_FILE" | awk '{ print $5 }')
-    OTHER_SIZE=$(ls -l "$OTHER_FILE" | awk '{ print $5 }')
-    if [ $THIS_SIZE -ne $OTHER_SIZE ]; then
-        DIFF_SIZE_NUM=$($EXPR $THIS_SIZE - $OTHER_SIZE)
-        DIFF_SIZE_REL=$($EXPR $THIS_SIZE \* 100 / $OTHER_SIZE)
-        SIZE_MSG=$($PRINTF "%3d%% %4d" $DIFF_SIZE_REL $DIFF_SIZE_NUM)
-        if [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] && [ "$DIFF_SIZE_REL" -gt 98 ] && [ "$DIFF_SIZE_REL" -lt 102 ]; then
-            SIZE_MSG="($SIZE_MSG)"
-            DIFF_SIZE=
-        else
-            if [[ "$ACCEPTED_SIZE_DIFF" != *"$BIN_FILE"* ]]; then
-                DIFF_SIZE=true
-                if [[ "$KNOWN_SIZE_DIFF" != *"$BIN_FILE"* ]]; then
-                    SIZE_MSG="*$SIZE_MSG*"
-                    REGRESSIONS=true
-                else
-                    SIZE_MSG=" $SIZE_MSG "
-                fi
-            else
-                SIZE_MSG="($SIZE_MSG)"
-                DIFF_SIZE=
-            fi
-        fi
-    else
-        SIZE_MSG="           "
-        DIFF_SIZE=
-        if [[ "$KNOWN_SIZE_DIFF $ACCEPTED_SIZE_DIFF" = *"$BIN_FILE"* ]]; then
-            SIZE_MSG="     !     "
-        fi
-    fi
-
-    if [[ "$SORT_SYMBOLS" = *"$BIN_FILE"* ]]; then
-        SYM_SORT_CMD="sort"
-    else
-        SYM_SORT_CMD="cat"
-    fi
-
-    # Check symbols
-    if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
-	$DUMPBIN -exports $OTHER_FILE | $GREP " = " | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other
-	$DUMPBIN -exports $THIS_FILE  | $GREP " = " | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this
-    elif [ "$OPENJDK_TARGET_OS" = "solaris" ]; then
-        # Some symbols get seemingly random 15 character prefixes. Filter them out.
-        $NM -a $ORIG_OTHER_FILE | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SED 's/^\([a-zA-Z] \.\)[a-zA-Z0-9_\$]\{15,15\}\./\1./g' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other
-	$NM -a $ORIG_THIS_FILE  | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SED 's/^\([a-zA-Z] \.\)[a-zA-Z0-9_\$]\{15,15\}\./\1./g' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this
-    else
-	$NM -a $ORIG_OTHER_FILE | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other
-	$NM -a $ORIG_THIS_FILE  | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this
-    fi
-    
-    LANG=C $DIFF $WORK_FILE_BASE.symbols.other $WORK_FILE_BASE.symbols.this > $WORK_FILE_BASE.symbols.diff
-    if [ -s $WORK_FILE_BASE.symbols.diff ]; then
-        SYM_MSG=" diff  "
-        if [[ "$ACCEPTED_SYM_DIFF" != *"$BIN_FILE"* ]]; then
-            DIFF_SYM=true
-            if [[ "$KNOWN_SYM_DIFF" != *"$BIN_FILE"* ]]; then
-                SYM_MSG="*$SYM_MSG*"
-                REGRESSIONS=true
-            else
-                SYM_MSG=" $SYM_MSG "
-            fi
-        else
-            SYM_MSG="($SYM_MSG)"            
-            DIFF_SYM=
-        fi
-    else
-        SYM_MSG="         "
-        DIFF_SYM=
-        if [[ "$KNOWN_SYM_DIFF $ACCEPTED_SYM_DIFF" = *"$BIN_FILE"* ]]; then
-            SYM_MSG="    !    "
-        fi
-    fi
-
-    # Check dependencies
-    if [ -n "$LDD_CMD" ];then
-	(cd $FILE_WORK_DIR && $CP $OTHER_FILE . && $LDD_CMD $NAME | $AWK '{ print $1;}' | $SORT | $TEE $WORK_FILE_BASE.deps.other | $UNIQ > $WORK_FILE_BASE.deps.other.uniq)
-	(cd $FILE_WORK_DIR && $CP $THIS_FILE . && $LDD_CMD $NAME | $AWK '{ print $1;}' | $SORT | $TEE $WORK_FILE_BASE.deps.this | $UNIQ > $WORK_FILE_BASE.deps.this.uniq)
-	(cd $FILE_WORK_DIR && $RM -f $NAME)
-	
-	LANG=C $DIFF $WORK_FILE_BASE.deps.other $WORK_FILE_BASE.deps.this > $WORK_FILE_BASE.deps.diff
-	LANG=C $DIFF $WORK_FILE_BASE.deps.other.uniq $WORK_FILE_BASE.deps.this.uniq > $WORK_FILE_BASE.deps.diff.uniq
-	
-	if [ -s $WORK_FILE_BASE.deps.diff ]; then
-            if [ -s $WORK_FILE_BASE.deps.diff.uniq ]; then
-		DEP_MSG=" diff  "
-            else
-		DEP_MSG=" redun "
-            fi
-            if [[ "$ACCEPTED_DEP_DIFF" != *"$BIN_FILE"* ]]; then
-		DIFF_DEP=true
-		if [[ "$KNOWN_DEP_DIFF" != *"$BIN_FILE"* ]]; then
-                    DEP_MSG="*$DEP_MSG*"
-                    REGRESSIONS=true
-		else
-                    DEP_MSG=" $DEP_MSG "
-		fi
-            else
-		DEP_MSG="($DEP_MSG)"
-		DIFF_DEP=
-            fi
-	else
-	    DEP_MSG="         "
-	    DIFF_DEP=
-            if [[ "$KNOWN_DEP_DIFF $ACCEPTED_DEP_DIFF" = *"$BIN_FILE"* ]]; then
-                DEP_MSG="     !      "
-            fi
-	fi
-    fi
-    
-    # Compare readelf output
-    if [ -n "$READELF_CMD" ] && [ -z "$SKIP_ELF_DIFF" ]; then
-        $READELF_CMD $OTHER_FILE > $WORK_FILE_BASE.readelf.other 2>&1
-        $READELF_CMD $THIS_FILE > $WORK_FILE_BASE.readelf.this 2>&1
-        
-        LANG=C $DIFF $WORK_FILE_BASE.readelf.other $WORK_FILE_BASE.readelf.this > $WORK_FILE_BASE.readelf.diff
-        
-        if [ -s $WORK_FILE_BASE.readelf.diff ]; then
-            ELF_DIFF_SIZE=$(ls -n $WORK_FILE_BASE.readelf.diff | awk '{print $5}')
-            ELF_MSG=$($PRINTF "%8d" $ELF_DIFF_SIZE)
-            if [[ "$ACCEPTED_ELF_DIFF" != *"$BIN_FILE"* ]]; then
-                DIFF_ELF=true
-                if [[ "$KNOWN_ELF_DIFF" != *"$BIN_FILE"* ]]; then
-                    ELF_MSG="*$ELF_MSG*"
-                    REGRESSIONS=true
-                else
-                    ELF_MSG=" $ELF_MSG "
-                fi
-            else
-                ELF_MSG="($ELF_MSG)"
-                DIFF_ELF=
-            fi
-        else
-            ELF_MSG="          "
-            DIFF_ELF=
-            if [[ "$KNOWN_DEP_DIFF $ACCEPTED_DEP_DIFF" = *"$BIN_FILE"* ]]; then
-                ELF_MSG="    !    "
-            fi
-        fi
-    fi
-
-    # Compare disassemble output
-    if [ -f "$OBJDUMP" ] && [ -z "$SKIP_DIS_DIFF" ]; then
-        $OBJDUMP -d $OTHER_FILE | $GREP -v $NAME > $WORK_FILE_BASE.dis.other 2>&1
-        $OBJDUMP -d $THIS_FILE  | $GREP -v $NAME > $WORK_FILE_BASE.dis.this  2>&1
-        
-        LANG=C $DIFF $WORK_FILE_BASE.dis.other $WORK_FILE_BASE.dis.this > $WORK_FILE_BASE.dis.diff
-        
-        if [ -s $WORK_FILE_BASE.dis.diff ]; then
-            DIS_DIFF_SIZE=$(ls -n $WORK_FILE_BASE.dis.diff | awk '{print $5}')
-            DIS_MSG=$($PRINTF "%8d" $DIS_DIFF_SIZE)
-            if [[ "$ACCEPTED_DIS_DIFF" != *"$BIN_FILE"* ]]; then
-                DIFF_DIS=true
-                if [[ "$KNOWN_DIS_DIFF" != *"$BIN_FILE"* ]]; then
-                    DIS_MSG="*$DIS_MSG*"
-                    REGRESSIONS=true
-                else
-                    DIS_MSG=" $DIS_MSG "
-                fi
-            else
-                DIS_MSG="($DIS_MSG)"
-                DIFF_DIS=
-            fi
-        else
-            DIS_MSG="          "
-            DIFF_DIS=
-            if [[ "$KNOWN_DEP_DIFF $ACCEPTED_DEP_DIFF" = *"$BIN_FILE"* ]]; then
-                DIS_MSG="    !    "
-            fi
-        fi
-    fi
-
-
-    if [ -n "$DIFF_BIN$DIFF_SIZE$DIFF_SYM$DIFF_DEP$DIFF_ELF$DIFF_DIS" ] || [ -n "$VERBOSE" ]; then
-        if [ -n "$BIN_MSG" ]; then echo -n "$BIN_MSG:"; fi
-        if [ -n "$SIZE_MSG" ]; then echo -n "$SIZE_MSG:"; fi
-        if [ -n "$SYM_MSG" ]; then echo -n "$SYM_MSG:"; fi
-        if [ -n "$DEP_MSG" ]; then echo -n "$DEP_MSG:"; fi
-        if [ -n "$ELF_MSG" ]; then echo -n "$ELF_MSG:"; fi
-        if [ -n "$DIS_MSG" ]; then echo -n "$DIS_MSG:"; fi
-        echo " $BIN_FILE"
-        if [ "$SHOW_DIFFS" = "true" ]; then
-            if [ -s "$WORK_FILE_BASE.symbols.diff" ]; then
-                echo "Symbols diff:"
-                $CAT $WORK_FILE_BASE.symbols.diff
-            fi
-            if [ -s "$WORK_FILE_BASE.deps.diff" ]; then
-                echo "Deps diff:"
-                $CAT $WORK_FILE_BASE.deps.diff
-            fi
-            if [ -s "$WORK_FILE_BASE.readelf.diff" ]; then
-                echo "Readelf diff:"
-                $CAT $WORK_FILE_BASE.readelf.diff
-            fi
-            if [ -s "$WORK_FILE_BASE.dis.diff" ]; then
-                echo "Disassembly diff:"
-                $CAT $WORK_FILE_BASE.dis.diff
-            fi
-        fi
-        return 1
-    fi
-    return 0
-}
-
-##########################################################################################
-# Print binary diff header
-
-print_binary_diff_header() {
-    if [ -z "$SKIP_BIN_DIFF" ]; then echo -n " Binary :"; fi
-    if [ -z "$SKIP_SIZE_DIFF" ]; then echo -n "   Size    :"; fi
-    if [ -z "$SKIP_SYM_DIFF" ]; then echo -n " Symbols :"; fi
-    if [ -z "$SKIP_DEP_DIFF" ]; then echo -n "  Deps   :"; fi
-    if [ -z "$SKIP_ELF_DIFF" ]; then echo -n " Readelf  :"; fi
-    if [ -z "$SKIP_DIS_DIFF" ]; then echo -n " Disass   :"; fi
-    echo
-}
-
-##########################################################################################
-# Compare all libraries
-
-compare_all_libs() {
-    THIS_DIR=$1
-    OTHER_DIR=$2
-    WORK_DIR=$3
-
-    LIBS=$(cd $THIS_DIR && $FIND . -name 'lib*.so' -o -name '*.dylib' -o -name '*.dll' | $SORT | $FILTER)
-
-    if [ -n "$LIBS" ]; then
-        echo Libraries...
-        print_binary_diff_header
-        for l in $LIBS; do
-            if [ -f "$OTHER_DIR/$l" ]; then
-                compare_bin_file $THIS_DIR $OTHER_DIR $WORK_DIR $l
-                if [ "$?" != "0" ]; then
-                    return_value=1
-                fi
-            fi
-        done
-    fi
-
-    return $return_value
-}
-
-##########################################################################################
-# Compare all executables
-
-compare_all_execs() {
-    THIS_DIR=$1
-    OTHER_DIR=$2
-    WORK_DIR=$3
-
-    if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
-        EXECS=$(cd $THIS_DIR && $FIND . -type f -name '*.exe' | $SORT | $FILTER)
-    else
-        EXECS=$(cd $THIS_DIR && $FIND . -name db -prune -o -type f -perm -100 \! \( -name '*.so' -o -name '*.dylib' -o -name '*.dll' -o -name '*.cgi' \) | $SORT | $FILTER)
-    fi
-
-    if [ -n "$EXECS" ]; then
-        echo Executables...
-        print_binary_diff_header
-        for e in $EXECS; do
-            if [ -f "$OTHER_DIR/$e" ]; then
-                compare_bin_file $THIS_DIR $OTHER_DIR $WORK_DIR $e
-                if [ "$?" != "0" ]; then
-                    return_value=1
-                fi
-            fi
-        done
-    fi
-
-    return $return_value
-}
-
-##########################################################################################
-# Initiate configuration
-
-COMPARE_ROOT=/tmp/cimages.$USER
-$MKDIR -p $COMPARE_ROOT
-if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
-    if [ "$(uname -o)" = "Cygwin" ]; then
-	COMPARE_ROOT=$(cygpath -msa $COMPARE_ROOT)
-    fi
-fi
-
-THIS="$( cd "$( dirname "$0" )" && pwd )"
-echo "$THIS"
-THIS_SCRIPT="$0"
-
-if [ -z "$1" ] || [ "$1" = "-h" ] || [ "$1" = "-?" ] || [ "$1" = "/h" ] || [ "$1" = "/?" ] || [ "$1" = "-help" ] || [ "$1" = "--help" ]; then
-    echo "bash ./compare.sh [OPTIONS] [FILTER]"
-    echo ""
-    echo "-all                Compare all files in all known ways"
-    echo "-names              Compare the file names and directory structure"
-    echo "-perms              Compare the permission bits on all files and directories"
-    echo "-types              Compare the output of the file command on all files"
-    echo "-general            Compare the files not convered by the specialized comparisons"
-    echo "-zips               Compare the contents of all zip files"
-    echo "-jars               Compare the contents of all jar files"
-    echo "-libs               Compare all native libraries"
-    echo "-execs              Compare all executables"
-    echo "-v                  Verbose output, does not hide known differences"
-    echo "-vv                 More verbose output, shows diff output of all comparisons"
-    echo "-o [OTHER]          Compare with build in other directory. Will default to the old build directory"
-    echo ""
-    echo "[FILTER]            List filenames in the image to compare, works for jars, zips, libs and execs"
-    echo "Example:"
-    echo "bash ./common/bin/compareimages.sh CodePointIM.jar"
-    exit 10
-fi
-
-CMP_NAMES=false
-CMP_PERMS=false
-CMP_TYPES=false
-CMP_GENERAL=false
-CMP_ZIPS=false
-CMP_JARS=false
-CMP_LIBS=false
-CMP_EXECS=false
-
-while [ -n "$1" ]; do
-    case "$1" in
-        -v)
-            VERBOSE=true
-            ;;
-        -vv)
-            VERBOSE=true
-            SHOW_DIFFS=true
-            ;;
-        -o)
-            OTHER=$2
-            shift
-            ;;
-        -all)
-            CMP_NAMES=true
-            if [ "$OPENJDK_TARGET_OS" != "windows" ]; then
-                CMP_PERMS=true
-            fi
-            CMP_TYPES=true
-            CMP_GENERAL=true
-            CMP_ZIPS=true
-            CMP_JARS=true
-            CMP_LIBS=true
-            CMP_EXECS=true
-            ;;
-        -names)
-            CMP_NAMES=true
-            ;;
-        -perms)
-            CMP_PERMS=true
-            ;;
-        -types)
-            CMP_TYPES=true
-            ;;
-        -general)
-            CMP_GENERAL=true
-            ;;
-        -zips)
-            CMP_ZIPS=true
-            ;;
-        -jars)
-            CMP_JARS=true
-            ;;
-        -libs)
-            CMP_LIBS=true
-            ;;
-        -execs)
-            CMP_EXECS=true
-            ;;
-        *)
-            CMP_NAMES=false
-            CMP_PERMS=false
-            CMP_TYPES=false
-            CMP_ZIPS=true
-            CMP_JARS=true
-            CMP_LIBS=true
-            CMP_EXECS=true
-            
-            if [ -z "$FILTER" ]; then
-                FILTER="$GREP"
-            fi
-            FILTER="$FILTER -e $1"
-            ;;
-    esac
-    shift
-done
-
-if [ "$CMP_NAMES" = "false" ] && [ "$CMP_TYPES" = "false" ] && [ "$CMP_PERMS" = "false" ] && [ "$CMP_GENERAL" = "false" ] && [ "$CMP_ZIPS" = "false" ] && [ "$CMP_JARS" = "false" ] && [ "$CMP_LIBS" = "false" ] && [ "$CMP_EXECS" = "false" ]; then
-    CMP_NAMES=true
-    CMP_PERMS=true
-    CMP_TYPES=true
-    CMP_GENERAL=true
-    CMP_ZIPS=true
-    CMP_JARS=true
-    CMP_LIBS=true
-    CMP_EXECS=true
-fi
-
-if [ -z "$FILTER" ]; then
-    FILTER="$CAT"
-fi
-
-if [ -z "$OTHER" ]; then
-    OTHER="$THIS/../$LEGACY_BUILD_DIR"
-    if [ -d "$OTHER" ]; then
-        OTHER="$( cd "$OTHER" && pwd )"
-    else
-        echo "Default old build directory does not exist:"
-        echo "$OTHER"
-    fi
-    echo "Comparing to default old build:"
-    echo "$OTHER"
-    echo
-else
-    echo "Comparing to:"
-    echo "$OTHER"
-    echo
-fi
-
-if [ ! -d "$OTHER" ]; then
-    echo "Other build directory does not exist:"
-    echo "$OTHER"
-    exit 1;
-fi
-
-# Figure out the layout of the new build. Which kinds of images have been produced
-if [ -d "$THIS/images/j2sdk-image" ]; then
-    THIS_J2SDK="$THIS/images/j2sdk-image"
-    THIS_J2RE="$THIS/images/j2re-image"
-fi
-if [ -d "$THIS/images/j2sdk-overlay-image" ]; then
-    THIS_J2SDK_OVERLAY="$THIS/images/j2sdk-overlay-image"
-    THIS_J2RE_OVERLAY="$THIS/images/j2re-overlay-image"
-fi
-
-# Figure out the layout of the other build (old or new, normal or overlay image)
-if [ -d "$OTHER/j2sdk-image" ]; then
-    if [ -f "$OTHER/j2sdk-image/LICENSE" ]; then
-        OTHER_J2SDK="$OTHER/j2sdk-image"
-        OTHER_J2RE="$OTHER/j2re-image"
-    else
-        OTHER_J2SDK_OVERLAY="$OTHER/j2sdk-image"
-        OTHER_J2RE_OVERLAY="$OTHER/j2re-image"
-    fi
-
-fi
-
-if [ -z "$OTHER_J2SDK" ] && [ -n "$OTHER_J2SDK_OVERLAY" ] && [ -z "$THIS_J2SDK_OVERLAY" ]; then
-    echo "OTHER build only has an overlay image while this build does not. Nothing to compare!"
+# Now locate the main script and run it.
+REAL_COMPARE_SCRIPT="$SRC_ROOT/common/bin/compare.sh"
+if [ ! -e "$REAL_COMPARE_SCRIPT" ]; then
+    echo "Error: Cannot locate compare script, it should have been in $REAL_COMPARE_SCRIPT"
     exit 1
 fi
 
-
-##########################################################################################
-# Do the work
-
-if [ "$CMP_NAMES" = "true" ]; then
-    if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
-        echo -n "J2SDK "
-        compare_dirs $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
-        echo -n "J2RE  "
-        compare_dirs $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
-        
-        echo -n "J2SDK "
-        compare_files $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
-        echo -n "J2RE  "
-        compare_files $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
-    fi
-    if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
-        echo -n "J2SDK Overlay "
-        compare_dirs $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
-        echo -n "J2RE  Overlay "
-        compare_dirs $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay
-        
-        echo -n "J2SDK Overlay "
-        compare_files $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
-        echo -n "J2RE  Overlay "
-        compare_files $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay
-    fi
-fi
-
-if [ "$CMP_PERMS" = "true" ]; then
-    if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
-        echo -n "J2SDK "
-        compare_permissions $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
-        echo -n "J2RE  "
-        compare_permissions $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
-    fi
-    if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
-        echo -n "J2SDK Overlay "
-        compare_permissions $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
-        echo -n "J2RE  Overlay "
-        compare_permissions $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay
-    fi
-fi
-
-if [ "$CMP_TYPES" = "true" ]; then
-    if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
-        echo -n "J2SDK "
-        compare_file_types $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
-        echo -n "J2RE  "
-        compare_file_types $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
-    fi
-    if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
-        echo -n "J2SDK Overlay "
-        compare_file_types $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
-        echo -n "J2RE  Overlay "
-        compare_file_types $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay
-    fi
-fi
-
-if [ "$CMP_GENERAL" = "true" ]; then
-    if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
-        echo -n "J2SDK "
-        compare_general_files $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
-        echo -n "J2RE  "
-        compare_general_files $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
-    fi
-    if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
-        echo -n "J2SDK Overlay "
-        compare_general_files $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
-        echo -n "J2RE  Overlay "
-        compare_general_files $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay
-    fi
-fi
-
-if [ "$CMP_ZIPS" = "true" ]; then
-    if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
-        compare_all_zip_files $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
-    fi
-fi
-
-if [ "$CMP_JARS" = "true" ]; then
-    if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
-        compare_all_jar_files $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
-    fi
-fi
-
-if [ "$CMP_LIBS" = "true" ]; then
-    if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
-        compare_all_libs $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
-    fi
-    if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
-        echo -n "Overlay "
-        compare_all_libs $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
-    fi
-fi
-
-if [ "$CMP_EXECS" = "true" ]; then
-    if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
-        compare_all_execs $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
-    fi
-    if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
-        echo -n "Overlay "
-        compare_all_execs $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
-    fi
-fi
-
-echo
-
-if [ -n "$REGRESSIONS" ]; then
-    echo "REGRESSIONS FOUND!"
-    echo
-    exit 1
-else
-    echo "No regressions found"
-    echo
-    exit 0
-fi
+. "$REAL_COMPARE_SCRIPT" "$@"
--- a/common/autoconf/configure	Wed Oct 31 18:30:51 2012 -0700
+++ b/common/autoconf/configure	Wed Jul 05 18:27:48 2017 +0200
@@ -1,4 +1,32 @@
-#!/bin/sh
+#!/bin/bash
+#
+# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+if test "x$BASH_VERSION" = x; then
+  echo This script needs bash to run.
+  echo It is recommended to use the configure script in the source tree root instead.
+  exit 1
+fi
 
 CONFIGURE_COMMAND_LINE="$@"
 conf_script_dir=`dirname $0`
@@ -13,58 +41,81 @@
 ### Test that the generated configure is up-to-date
 ###
 
-# On Solaris /bin/sh doesn't support test -nt but /usr/bin/test does.
-TEST=`which test`
-
-print_error_not_up_to_date() {
-  echo "Error: The configure source files is newer than the generated files."
-  echo "Please run 'sh autogen.sh' to update the generated files."
-  echo "Note that this test might trigger incorrectly sometimes due to hg timestamps".
+run_autogen_or_fail() {
+  if test "x`which autoconf 2> /dev/null`" = x; then
+    echo "Cannot locate autoconf, unable to correct situation."
+    echo "Please install autoconf and run 'bash autogen.sh' to update the generated files."
+    echo "Error: Cannot continue" 1>&2
+    exit 1
+  else
+    echo "Running autogen.sh to correct the situation"
+    bash $conf_script_dir/autogen.sh
+  fi
 }
 
-# NOTE: This test can occasionally go wrong due to the way mercurial handles
-# timestamps. It it supposed to aid during development of build-infra, but should
-# go away before making this the default build system.
-for file in configure.ac *.m4 ; do
-  if $TEST $file -nt generated-configure.sh; then
-    print_error_not_up_to_date
-    exit 1
-  fi
-done
-
-if $TEST -e $conf_custom_script_dir/generated-configure.sh; then
-  # If custom source configure is available, make sure it is up-to-date as well.
-  for file in configure.ac *.m4 $conf_custom_script_dir/*.m4; do
-    if $TEST $file -nt $conf_custom_script_dir/generated-configure.sh; then
-      print_error_not_up_to_date
-      exit 1
+check_autoconf_timestamps() {
+  for file in $conf_script_dir/configure.ac $conf_script_dir/*.m4 ; do
+    if test $file -nt $conf_script_dir/generated-configure.sh; then
+      echo "Warning: The configure source files is newer than the generated files."
+      run_autogen_or_fail
     fi
   done
 
+  if test -e $conf_custom_script_dir/generated-configure.sh; then
+    # If custom source configure is available, make sure it is up-to-date as well.
+    for file in $conf_script_dir/configure.ac $conf_script_dir/*.m4 $conf_custom_script_dir/*.m4; do
+      if test $file -nt $conf_custom_script_dir/generated-configure.sh; then
+        echo "Warning: The configure source files is newer than the custom generated files."
+        run_autogen_or_fail
+      fi
+    done
+  fi
+}
+
+check_hg_updates() {
+  if test "x`which hg 2> /dev/null`" != x; then
+    conf_updated_autoconf_files=`cd $conf_script_dir && hg status -mard 2> /dev/null | grep autoconf`
+    if test "x$conf_updated_autoconf_files" != x; then
+      echo "Configure source code has been updated, checking time stamps"
+      check_autoconf_timestamps
+    fi
+
+    if test -e $conf_custom_script_dir; then
+      # If custom source configure is available, make sure it is up-to-date as well.
+      conf_custom_updated_autoconf_files=`cd $conf_custom_script_dir && hg status -mard 2> /dev/null | grep autoconf`
+      if test "x$conf_custom_updated_autoconf_files" != x; then
+        echo "Configure custom source code has been updated, checking time stamps"
+        check_autoconf_timestamps
+      fi
+    fi
+    
+  fi
+}
+
+# Check for local changes
+check_hg_updates
+
+if test -e $conf_custom_script_dir/generated-configure.sh; then
   # Test if open configure is newer than custom configure, if so, custom needs to
   # be regenerated. This test is required to ensure consistency with custom source.
-  conf_open_configure_timestamp=`grep DATE_WHEN_GENERATED: $conf_script_dir/generated-configure.sh  | cut -d" " -f 3`
-  conf_custom_configure_timestamp=`grep DATE_WHEN_GENERATED: $conf_custom_script_dir/generated-configure.sh  | cut -d" " -f 3`
-  if $TEST $conf_open_configure_timestamp -gt $conf_custom_configure_timestamp; then
-    echo "Error: The generated configure file contains changes not present in the custom generated file."
-    echo "Please run 'sh autogen.sh' to update the generated files."
-    exit 1
+  conf_open_configure_timestamp=`grep DATE_WHEN_GENERATED= $conf_script_dir/generated-configure.sh  | cut -d"=" -f 2`
+  conf_custom_configure_timestamp=`grep DATE_WHEN_GENERATED= $conf_custom_script_dir/generated-configure.sh  | cut -d"=" -f 2`
+  if test $conf_open_configure_timestamp -gt $conf_custom_configure_timestamp; then
+    echo "Warning: The generated configure file contains changes not present in the custom generated file."
+    run_autogen_or_fail
   fi
-  
 fi
 
 # Autoconf calls the configure script recursively sometimes. 
 # Don't start logging twice in that case
-if $TEST "x$conf_debug_configure" = xtrue; then
+if test "x$conf_debug_configure" = xtrue; then
   conf_debug_configure=recursive
 fi
 ###
 ### Process command-line arguments
 ###
-conf_processed_arguments=
+conf_processed_arguments=()
 conf_openjdk_target=
-conf_extra_cflags=
-conf_extra_cxxflags=
 
 for conf_option
 do
@@ -72,20 +123,14 @@
   --openjdk-target=*)
     conf_openjdk_target=`expr "X$conf_option" : '[^=]*=\(.*\)'`
     continue ;;
-  --with-extra-cflags=*)
-    conf_extra_cflags=`expr "X$conf_option" : '[^=]*=\(.*\)'`
-    continue ;;
-  --with-extra-cxxflags=*)
-    conf_extra_cxxflags=`expr "X$conf_option" : '[^=]*=\(.*\)'`
-    continue ;;
   --debug-configure)
-    if $TEST "x$conf_debug_configure" != xrecursive; then
+    if test "x$conf_debug_configure" != xrecursive; then
       conf_debug_configure=true
       export conf_debug_configure
     fi
     continue ;;
   *)
-    conf_processed_arguments="$conf_processed_arguments $conf_option" ;;
+    conf_processed_arguments=("${conf_processed_arguments[@]}" "$conf_option") ;;
   esac
 
   case $conf_option in
@@ -95,11 +140,13 @@
     conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
   -host | --host | --hos | --ho | -host=* | --host=* | --hos=* | --ho=*)
     conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
+  -help | --help | --hel | --he | -h)
+    conf_print_help=true ;;
   esac
 done
 
-if $TEST "x$conf_legacy_crosscompile" != "x"; then
-  if $TEST "x$conf_openjdk_target" != "x"; then
+if test "x$conf_legacy_crosscompile" != "x"; then
+  if test "x$conf_openjdk_target" != "x"; then
     echo "Error: Specifying --openjdk-target together with autoconf"
     echo "legacy cross-compilation flags is not supported."
     echo "You specified: --openjdk-target=$conf_openjdk_target and $conf_legacy_crosscompile."
@@ -112,20 +159,20 @@
   fi
 fi
 
-if $TEST "x$conf_openjdk_target" != "x"; then
+if test "x$conf_openjdk_target" != "x"; then
   conf_build_platform=`sh $conf_script_dir/build-aux/config.guess`
-  conf_processed_arguments="--build=$conf_build_platform --host=$conf_openjdk_target --target=$conf_openjdk_target $conf_processed_arguments"
+  conf_processed_arguments=("--build=$conf_build_platform" "--host=$conf_openjdk_target" "--target=$conf_openjdk_target" "${conf_processed_arguments[@]}")
 fi
 
 # Make configure exit with error on invalid options as default.
 # Can be overridden by --disable-option-checking, since we prepend our argument
 # and later options override earlier.
-conf_processed_arguments="--enable-option-checking=fatal $conf_processed_arguments"
+conf_processed_arguments=("--enable-option-checking=fatal" "${conf_processed_arguments[@]}")
 
 ###
 ### Call the configure script
 ###
-if $TEST -e $conf_custom_script_dir/generated-configure.sh; then
+if test -e $conf_custom_script_dir/generated-configure.sh; then
   # Custom source configure available; run that instead
   echo Running custom generated-configure.sh
   conf_script_to_run=$conf_custom_script_dir/generated-configure.sh
@@ -134,17 +181,17 @@
   conf_script_to_run=$conf_script_dir/generated-configure.sh
 fi  
 
-if $TEST "x$conf_debug_configure" != x; then
+if test "x$conf_debug_configure" != x; then
   # Turn on shell debug output if requested (initial or recursive)
   set -x
 fi
 
-if $TEST "x$conf_debug_configure" = xtrue; then
+if test "x$conf_debug_configure" = xtrue; then
   # Turn on logging, but don't turn on twice when called recursive
   conf_debug_logfile=./debug-configure.log
-  (exec 3>&1 ; (. $conf_script_to_run $conf_processed_arguments --with-extra-cflags="$conf_extra_cflags" --with-extra-cxxflags="$conf_extra_cxxflags" 2>&1 1>&3 ) | tee -a $conf_debug_logfile 1>&2 ; exec 3>&-) | tee -a $conf_debug_logfile
+  (exec 3>&1 ; (. $conf_script_to_run "${conf_processed_arguments[@]}" 2>&1 1>&3 ) | tee -a $conf_debug_logfile 1>&2 ; exec 3>&-) | tee -a $conf_debug_logfile
 else
-  . $conf_script_to_run $conf_processed_arguments --with-extra-cflags="$conf_extra_cflags" --with-extra-cxxflags="$conf_extra_cxxflags"
+  ( . $conf_script_to_run "${conf_processed_arguments[@]}" )
 fi
 
 conf_result_code=$?
@@ -152,8 +199,28 @@
 ### Post-processing
 ###
 
+if test $conf_result_code -eq 0; then
+  if test "x$conf_print_help" = xtrue; then
+    cat <<EOT
+
+Additional (non-autoconf) OpenJDK Options:
+  --openjdk-target=TARGET cross-compile with TARGET as target platform
+                          (i.e. the one you will run the resulting binary on).
+                          Equivalent to --host=TARGET --target=TARGET
+                          --build=<current platform>
+  --debug-configure       Run the configure script with additional debug
+                          logging enabled.
+
+Please be aware that, when cross-compiling, the OpenJDK configure script will
+generally use 'target' where autoconf traditionally uses 'host'.
+EOT
+  fi
+else
+  echo configure exiting with result code $conf_result_code
+fi
+
 # Move the log file to the output root, if this was successfully created
-if $TEST -d "$OUTPUT_ROOT"; then
+if test -d "$OUTPUT_ROOT"; then
   mv -f config.log "$OUTPUT_ROOT" 2> /dev/null
 fi
 
--- a/common/autoconf/configure.ac	Wed Oct 31 18:30:51 2012 -0700
+++ b/common/autoconf/configure.ac	Wed Jul 05 18:27:48 2017 +0200
@@ -31,16 +31,14 @@
 
 
 AC_PREREQ([2.61])
-AC_INIT(openjdk, jdk8, build-dev@openjdk.java.net)
-
-# Do not change or remove the following line, it is needed for consistency checks:
-# DATE_WHEN_GENERATED: @DATE_WHEN_GENERATED@
+AC_INIT(OpenJDK, jdk8, build-dev@openjdk.java.net,,http://openjdk.java.net)
 
 AC_CONFIG_AUX_DIR([build-aux])
 m4_include([build-aux/pkg.m4])
 
 # Include these first...
 m4_include([basics.m4])
+m4_include([basics_windows.m4])
 m4_include([builddeps.m4])
 # ... then the rest
 m4_include([boot-jdk.m4])
@@ -51,35 +49,57 @@
 m4_include([platform.m4])
 m4_include([source-dirs.m4])
 m4_include([toolchain.m4])
+m4_include([toolchain_windows.m4])
 
-# This line needs to be here, verbatim, after all includes.
-# It is replaced with custom functionality when building
+AC_DEFUN_ONCE([CUSTOM_EARLY_HOOK])
+AC_DEFUN_ONCE([CUSTOM_LATE_HOOK])
+
+# This line needs to be here, verbatim, after all includes and the dummy hook
+# definitions. It is replaced with custom functionality when building
 # custom sources.
-AC_DEFUN_ONCE([CUSTOM_HOOK])
+#CUSTOM_AUTOCONF_INCLUDE
+
+# Do not change or remove the following line, it is needed for consistency checks:
+DATE_WHEN_GENERATED=@DATE_WHEN_GENERATED@
 
 ###############################################################################
 #
-# Initialization
+# Initialization / Boot-strapping
+#
+# The bootstrapping process needs to solve the "chicken or the egg" problem,
+# thus it jumps back and forth, each time gaining something needed later on.
 #
 ###############################################################################
 
 # Basic initialization that must happen first of all
 BASIC_INIT
+BASIC_SETUP_FUNDAMENTAL_TOOLS
 
 # Now we can determine OpenJDK build and target platforms. This is required to
 # have early on.
 PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET
 
-# Continue setting up basic stuff.
+# Continue setting up basic stuff. Most remaining code require fundamental tools.
 BASIC_SETUP_PATHS
 BASIC_SETUP_LOGGING
 
+# These are needed to be able to create a configuration name (and thus the output directory)
+JDKOPT_SETUP_JDK_VARIANT
+JDKOPT_SETUP_JVM_VARIANTS
+JDKOPT_SETUP_DEBUG_LEVEL
+
+# With basic setup done, call the custom early hook.
+CUSTOM_EARLY_HOOK
+
+# To properly create a configuration name, we need to have the OpenJDK target
+# and options (variants and debug level) parsed.
+BASIC_SETUP_OUTPUT_DIR
+
 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
 HELP_SETUP_DEPENDENCY_HELP
 
-# Setup simple tools, that do not need have cross compilation support.
-# Without these, we can't properly run the rest of the configure script.
-BASIC_SETUP_TOOLS
+# Setup tools that requires more complex handling, or that is not needed by the configure script.
+BASIC_SETUP_COMPLEX_TOOLS
 
 # Check if pkg-config is available.
 PKG_PROG_PKG_CONFIG
@@ -100,16 +120,9 @@
 ###############################################################################
 
 # We need build & target for this.
-JDKOPT_SETUP_JDK_VARIANT
-JDKOPT_SETUP_JVM_VARIANTS
-JDKOPT_SETUP_DEBUG_LEVEL
 JDKOPT_SETUP_JDK_OPTIONS
 JDKOPT_SETUP_JDK_VERSION_NUMBERS
 
-# To properly create a configuration name, we need to have the OpenJDK target
-# and options (variants and debug level) parsed.
-BASIC_SETUP_OUTPUT_DIR
-
 ###############################################################################
 #
 # Setup BootJDK, used to bootstrap the build.
@@ -137,7 +150,6 @@
 ###############################################################################
 
 TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS
-TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
 # Locate the actual tools
 TOOLCHAIN_SETUP_PATHS
 
@@ -152,10 +164,6 @@
 TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION
 TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK
 
-# After we have toolchain, we can compile the uncygdrive helper
-BASIC_COMPILE_UNCYGDRIVE
-
-
 # Setup debug symbols (need objcopy from the toolchain for that)
 JDKOPT_SETUP_DEBUG_SYMBOLS
 
@@ -173,6 +181,9 @@
 LIB_SETUP_MISC_LIBS
 LIB_SETUP_STATIC_LINK_LIBSTDCPP
 
+# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
+BASIC_COMPILE_FIXPATH
+
 ###############################################################################
 #
 # We need to do some final tweaking, when everything else is done.
@@ -210,7 +221,7 @@
 BASIC_TEST_USABILITY_ISSUES
 
 # At the end, call the custom hook. (Dummy macro if no custom sources available)
-CUSTOM_HOOK
+CUSTOM_LATE_HOOK
 
 # We're messing a bit with internal autoconf variables to put the config.status
 # in the output directory instead of the current directory.
--- a/common/autoconf/generated-configure.sh	Wed Oct 31 18:30:51 2012 -0700
+++ b/common/autoconf/generated-configure.sh	Wed Jul 05 18:27:48 2017 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for openjdk jdk8.
+# Generated by GNU Autoconf 2.67 for OpenJDK jdk8.
 #
 # Report bugs to <build-dev@openjdk.java.net>.
 #
@@ -550,12 +550,12 @@
 MAKEFLAGS=
 
 # Identity of this package.
-PACKAGE_NAME='openjdk'
+PACKAGE_NAME='OpenJDK'
 PACKAGE_TARNAME='openjdk'
 PACKAGE_VERSION='jdk8'
-PACKAGE_STRING='openjdk jdk8'
+PACKAGE_STRING='OpenJDK jdk8'
 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
-PACKAGE_URL=''
+PACKAGE_URL='http://openjdk.java.net'
 
 # Factoring default headers for most tests.
 ac_includes_default="\
@@ -606,7 +606,9 @@
 NUM_CORES
 SALIB_NAME
 HOTSPOT_MAKE_ARGS
+FIXPATH
 LIBCXX
+STATIC_CXX_SETTING
 LIBDL
 LIBM
 LIBZIP_CAN_USE_MMAP
@@ -619,7 +621,6 @@
 USING_SYSTEM_FT_LIB
 FREETYPE2_LIBS
 FREETYPE2_CFLAGS
-CUPS_LIBS
 CUPS_CFLAGS
 OPENWIN_HOME
 X_EXTRA_LIBS
@@ -631,7 +632,6 @@
 CFLAGS_DEBUG_SYMBOLS
 ZIP_DEBUGINFO_FILES
 ENABLE_DEBUG_SYMBOLS
-UNCYGDRIVE
 LDFLAGS_CXX_JDK
 LDFLAGS_JDKEXE_SUFFIX
 LDFLAGS_JDKLIB_SUFFIX
@@ -672,6 +672,9 @@
 SHARED_LIBRARY
 OBJ_SUFFIX
 LIPO
+ac_ct_OBJDUMP
+OBJDUMP
+ac_ct_OBJCOPY
 OBJCOPY
 MCS
 STRIP
@@ -683,9 +686,13 @@
 RC_FLAGS
 DUMPBIN
 WINAR
+HOTSPOT_RC
+HOTSPOT_MT
 RC
 MT
 WINLD
+HOTSPOT_LD
+HOTSPOT_CXX
 ARFLAGS
 AR
 LDEXECXX
@@ -698,6 +705,9 @@
 ac_ct_CXX
 CXXFLAGS
 CXX
+ac_ct_PROPER_COMPILER_CXX
+PROPER_COMPILER_CXX
+POTENTIAL_CXX
 OBJEXT
 EXEEXT
 ac_ct_CC
@@ -705,12 +715,16 @@
 LDFLAGS
 CFLAGS
 CC
+ac_ct_PROPER_COMPILER_CC
+PROPER_COMPILER_CC
+POTENTIAL_CC
 BUILD_LD
 BUILD_CXX
 BUILD_CC
-MSVCR100DLL
-CHECK_FOR_VCINSTALLDIR
-SETUPDEVENV
+MSVCR_DLL
+VS_PATH
+VS_LIB
+VS_INCLUDE
 CYGWIN_LINK
 AR_OUT_OPTION
 LD_OUT_OPTION
@@ -733,15 +747,14 @@
 BOOT_RTJAR
 JAVA_CHECK
 JAVAC_CHECK
-OUTPUT_ROOT
-CONF_NAME
-SPEC
 COOKED_BUILD_NUMBER
 FULL_VERSION
 RELEASE
 JDK_VERSION
 RUNTIME_NAME
 COPYRIGHT_YEAR
+MACOSX_BUNDLE_ID_BASE
+MACOSX_BUNDLE_NAME_BASE
 COMPANY_NAME
 JDK_RC_PLATFORM_NAME
 PRODUCT_SUFFIX
@@ -753,16 +766,39 @@
 JDK_MICRO_VERSION
 JDK_MINOR_VERSION
 JDK_MAJOR_VERSION
-ENABLE_JFR
 COMPRESS_JARS
+UNLIMITED_CRYPTO
 CACERTS_FILE
 TEST_IN_BUILD
-DISABLE_NIMBUS
 BUILD_HEADLESS
 SUPPORT_HEADFUL
 SUPPORT_HEADLESS
-JIGSAW
 SET_OPENJDK
+BDEPS_FTP
+BDEPS_UNZIP
+OS_VERSION_MICRO
+OS_VERSION_MINOR
+OS_VERSION_MAJOR
+PKG_CONFIG
+COMM
+TIME
+STAT
+HG
+READELF
+OTOOL
+LDD
+ZIP
+UNZIP
+FIND_DELETE
+MAKE
+CHECK_TOOLSDIR_MAKE
+CHECK_TOOLSDIR_GMAKE
+CHECK_MAKE
+CHECK_GMAKE
+PKGHANDLER
+OUTPUT_ROOT
+CONF_NAME
+SPEC
 BUILD_VARIANT_RELEASE
 DEBUG_CLASSFILES
 FASTDEBUG
@@ -776,72 +812,12 @@
 JVM_VARIANT_SERVER
 JVM_VARIANTS
 JDK_VARIANT
-BDEPS_FTP
-BDEPS_UNZIP
-OS_VERSION_MICRO
-OS_VERSION_MINOR
-OS_VERSION_MAJOR
-PKG_CONFIG
-HG
-OBJDUMP
-READELF
-OTOOL
-LDD
-THEPWDCMD
-FIND_DELETE
-RM
-MAKE
-CHECK_TOOLSDIR_MAKE
-CHECK_TOOLSDIR_GMAKE
-CHECK_MAKE
-CHECK_GMAKE
-NAWK
-SED
-FGREP
-EGREP
-GREP
-AWK
-ZIP
-XARGS
-WC
-UNZIP
-UNIQ
-TR
-TOUCH
-TEE
-TAR
-TAIL
-SORT
-SH
-PRINTF
-MV
-MKDIR
-LS
-LN
-HEAD
-FIND
-FILE
-EXPR
-ECHO
-DIFF
-DF
-DATE
-CUT
-CPIO
-CP
-CMP
-CHMOD
-CAT
-BASENAME
-PKGHANDLER
 BUILD_LOG_WRAPPER
 BUILD_LOG_PREVIOUS
 BUILD_LOG
 SYS_ROOT
 PATH_SEP
-CYGPATH
 SRC_ROOT
-READLINK
 DEFINE_CROSS_COMPILE_ARCH
 LP64
 OPENJDK_TARGET_OS_API_DIR
@@ -854,18 +830,18 @@
 REQUIRED_OS_VERSION
 REQUIRED_OS_NAME
 COMPILE_TYPE
+OPENJDK_TARGET_CPU_ENDIAN
+OPENJDK_TARGET_CPU_BITS
+OPENJDK_TARGET_CPU_ARCH
+OPENJDK_TARGET_CPU
+OPENJDK_TARGET_OS_API
+OPENJDK_TARGET_OS
 OPENJDK_BUILD_CPU_ENDIAN
 OPENJDK_BUILD_CPU_BITS
 OPENJDK_BUILD_CPU_ARCH
 OPENJDK_BUILD_CPU
 OPENJDK_BUILD_OS_API
 OPENJDK_BUILD_OS
-OPENJDK_TARGET_CPU_ENDIAN
-OPENJDK_TARGET_CPU_BITS
-OPENJDK_TARGET_CPU_ARCH
-OPENJDK_TARGET_CPU
-OPENJDK_TARGET_OS_API
-OPENJDK_TARGET_OS
 OPENJDK_BUILD_AUTOCONF_NAME
 OPENJDK_TARGET_AUTOCONF_NAME
 target_os
@@ -880,6 +856,51 @@
 build_vendor
 build_cpu
 build
+SETFILE
+DF
+READLINK
+CYGPATH
+NAWK
+SED
+FGREP
+EGREP
+GREP
+AWK
+XARGS
+WHICH
+WC
+UNIQ
+UNAME
+TR
+TOUCH
+TEE
+TAR
+TAIL
+SORT
+SH
+RM
+THEPWDCMD
+PRINTF
+MV
+MKTEMP
+MKDIR
+LS
+LN
+HEAD
+FIND
+FILE
+EXPR
+ECHO
+DIRNAME
+DIFF
+DATE
+CUT
+CP
+CMP
+CHMOD
+CAT
+BASH
+BASENAME
 DATE_WHEN_CONFIGURED
 CONFIGURE_COMMAND_LINE
 CUSTOM_MAKE_DIR
@@ -929,23 +950,20 @@
 with_sys_root
 with_tools_dir
 with_devkit
-with_builddeps_conf
-with_builddeps_server
-with_builddeps_dir
-with_builddeps_group
-enable_list_builddeps
 with_jdk_variant
 with_jvm_variants
 enable_debug
 with_debug_level
+with_conf_name
+with_builddeps_conf
+with_builddeps_server
+with_builddeps_dir
+with_builddeps_group
 enable_openjdk_only
-enable_jigsaw
 enable_headful
-enable_nimbus
 enable_hotspot_test_in_build
 with_cacerts_file
-enable_jfr
-with_conf_name
+enable_unlimited_crypto
 with_boot_jdk
 with_boot_jdk_jvmargs
 with_add_source_root
@@ -957,7 +975,7 @@
 with_override_jaxws
 with_override_hotspot
 with_override_jdk
-with_msvcr100dll
+with_msvcr_dll
 with_extra_cflags
 with_extra_cxxflags
 with_extra_ldflags
@@ -967,7 +985,6 @@
 with_x
 with_cups
 with_cups_include
-with_cups_lib
 with_freetype
 with_alsa
 with_alsa_include
@@ -1546,7 +1563,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures openjdk jdk8 to adapt to many kinds of systems.
+\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1616,7 +1633,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of openjdk jdk8:";;
+     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
    esac
   cat <<\_ACEOF
 
@@ -1624,24 +1641,19 @@
   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-list-builddeps list all build dependencies known to the configure
-                          script
   --enable-debug          set the debug level to fastdebug (shorthand for
                           --with-debug-level=fastdebug) [disabled]
-  --enable-openjdk-only   build OpenJDK regardless of the presence of closed
-                          repositories [disabled]
-  --enable-jigsaw         build Jigsaw images (not yet available) [disabled]
-  --disable-headful       build headful support (graphical UI support)
-                          [enabled]
-  --disable-nimbus        disable Nimbus L&F [enabled]
+  --enable-openjdk-only   supress building closed source even if present
+                          [disabled]
+  --disable-headful       disable building headful support (graphical UI
+                          support) [enabled]
   --enable-hotspot-test-in-build
-                          enable running of Queens test after Hotspot build
-                          (not yet available) [disabled]
-  --enable-jfr            enable jfr (default is no)
-	ENABLE_JFR="${enableval}"
-  --disable-debug-symbols disable generation of debug symbols ([enabled])
+                          run the Queens test after Hotspot build [disabled]
+  --enable-unlimited-crypto
+                          Enable unlimited crypto policy [disabled]
+  --disable-debug-symbols disable generation of debug symbols [enabled]
   --disable-zip-debug-info
-                          don't zip debug-info files ([enabled@:@)
+                          disable zipping of debug-info files [enabled]
   --disable-macosx-runtime-support
                           disable the use of MacOSX Java runtime support
                           framework [enabled]
@@ -1651,38 +1663,38 @@
   --enable-sjavac         use sjavac to do fast incremental compiles
                           [disabled]
   --disable-precompiled-headers
-                          use precompiled headers when compiling C++ [enabled]
-  --disable-ccache        use ccache to speed up recompilations [enabled]
+                          disable using precompiled headers when compiling C++
+                          [enabled]
+  --disable-ccache        disable using ccache to speed up recompilations
+                          [enabled]
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-custom-make-dir  directory containing custom build/make files
+  --with-custom-make-dir  use this directory for custom build/make files
   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
                           support it), e.g. --with-target-bits=32 [guessed]
-  --with-sys-root         pass this sys-root to the compilers and linker
-                          (useful if the sys-root encoded in the cross
-                          compiler tools is incorrect)
-  --with-tools-dir        search this directory for (cross-compiling)
-                          compilers and tools
+  --with-sys-root         pass this sys-root to the compilers and tools (for
+                          cross-compiling)
+  --with-tools-dir        search this directory for compilers and tools (for
+                          cross-compiling)
   --with-devkit           use this directory as base for tools-dir and
                           sys-root (for cross-compiling)
-  --with-builddeps-conf   use this configuration file for the builddeps
-  --with-builddeps-server download and use build dependencies from this server
-                          url, e.g.
-                          --with-builddeps-server=ftp://example.com/dir
-  --with-builddeps-dir    store downloaded build dependencies here
-                          [d/localhome/builddeps]
-  --with-builddeps-group  chgrp the downloaded build dependencies to this
-                          group
   --with-jdk-variant      JDK variant to build (normal) [normal]
   --with-jvm-variants     JVM variants (separated by commas) to build (server,
                           client, kernel, zero, zeroshark) [server]
   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
                           [release]
+  --with-conf-name        use this as the name of the configuration [generated
+                          from important configuration options]
+  --with-builddeps-conf   use this configuration file for the builddeps
+  --with-builddeps-server download and use build dependencies from this server
+                          url
+  --with-builddeps-dir    store downloaded build dependencies here
+                          [/localhome/builddeps]
+  --with-builddeps-group  chgrp the downloaded build dependencies to this
+                          group
   --with-cacerts-file     specify alternative cacerts file
-  --with-conf-name        use this as the name of the configuration,
-                          overriding the generated default
   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
                           invocations of the Boot JDK, overriding the default
@@ -1707,16 +1719,15 @@
   --with-override-jaxws   use this jaxws dir for the build
   --with-override-hotspot use this hotspot dir for the build
   --with-override-jdk     use this jdk dir for the build
-  --with-msvcr100dll      copy this msvcr100.dll into the built JDK
+  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
+                          only) [probed]
   --with-extra-cflags     extra flags to be used when compiling jdk c-files
   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
   --with-extra-ldflags    extra flags to be used when linking jdk
   --with-x                use the X Window System
   --with-cups             specify prefix directory for the cups package
-                          (expecting the libraries under PATH/lib and the
-                          headers under PATH/include)
+                          (expecting the headers under PATH/include)
   --with-cups-include     specify directory for the cups include files
-  --with-cups-lib         specify directory for the cups library
   --with-freetype         specify prefix directory for the freetype2 package
                           (expecting the libraries under PATH/lib and the
                           headers under PATH/include)
@@ -1733,10 +1744,7 @@
                           --with-memory-size=1024 [probed]
   --with-sjavac-server-java
                           use this java binary for running the sjavac
-                          background server and other long running java tasks
-                          in the build process, e.g.
-                          ---with-sjavac-server-java="/opt/jrockit/bin/java
-                          -server"
+                          background server [Boot JDK java]
   --with-sjavac-server-cores
                           use at most this number of concurrent threads on the
                           sjavac server [probed]
@@ -1769,6 +1777,7 @@
 it to find libraries and programs with nonstandard names/locations.
 
 Report bugs to <build-dev@openjdk.java.net>.
+OpenJDK home page: <http://openjdk.java.net>.
 _ACEOF
 ac_status=$?
 fi
@@ -1831,7 +1840,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-openjdk configure jdk8
+OpenJDK configure jdk8
 generated by GNU Autoconf 2.67
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2488,101 +2497,41 @@
 
 } # ac_fn_cxx_check_func
 
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
 # -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if eval "test \"\${$3+set}\"" = set; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
 if eval "test \"\${$3+set}\"" = set; then :
   $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $4
 #include <$2>
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  ac_header_compiler=yes
-else
-  ac_header_compiler=no
+  eval "$3=yes"
+else
+  eval "$3=no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  ac_header_preproc=yes
-else
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
-  yes:no: )
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## ----------------------------------------- ##
-## Report this to build-dev@openjdk.java.net ##
-## ----------------------------------------- ##"
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  eval "$3=\$ac_header_compiler"
 fi
 eval ac_res=\$$3
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-fi
   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
 
-} # ac_fn_c_check_header_mongrel
+} # ac_fn_c_check_header_compile
 cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by openjdk $as_me jdk8, which was
+It was created by OpenJDK $as_me jdk8, which was
 generated by GNU Autoconf 2.67.  Invocation command line was
 
   $ $0 $@
@@ -2931,9 +2880,6 @@
 
 
 
-# Do not change or remove the following line, it is needed for consistency checks:
-# DATE_WHEN_GENERATED: 1347963060
-
 ac_aux_dir=
 for ac_dir in build-aux "$srcdir"/build-aux; do
   if test -f "$ac_dir/install-sh"; then
@@ -3053,14 +2999,46 @@
 
 
 
-
-
-
-
-
-
-
-
+# This will make sure the given variable points to a full and proper
+# path. This means:
+# 1) There will be no spaces in the path. On posix platforms,
+#    spaces in the path will result in an error. On Windows,
+#    the path will be rewritten using short-style to be space-free.
+# 2) The path will be absolute, and it will be in unix-style (on
+#     cygwin).
+# $1: The name of the variable to fix
+
+
+# This will make sure the given variable points to a executable
+# with a full and proper path. This means:
+# 1) There will be no spaces in the path. On posix platforms,
+#    spaces in the path will result in an error. On Windows,
+#    the path will be rewritten using short-style to be space-free.
+# 2) The path will be absolute, and it will be in unix-style (on
+#     cygwin).
+# Any arguments given to the executable is preserved.
+# If the input variable does not have a directory specification, then
+# it need to be in the PATH.
+# $1: The name of the variable to fix
+
+
+
+
+
+
+# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
+# $1: variable to check
+# $2: executable name to print in warning (optional)
+
+
+# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
+# Arguments as AC_PATH_PROG:
+# $1: variable to set
+# $2: executable name to look for
+
+
+# Setup the most fundamental tools that relies on not much else to set up,
+# but is used by much of the early bootstrap code.
 
 
 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
@@ -3083,23 +3061,10 @@
 
 
 
-# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
-# $1: variable to check
-# $2: executable name to print in warning (optional)
-
-
-# Does AC_PATH_PROG followed by CHECK_NONEMPTY.
-# Arguments as AC_PATH_PROG:
-# $1: variable to set
-# $2: executable name to look for
-
-
-
-
-
-
-
-# Check if build directory is on local disk.
+
+
+# Check if build directory is on local disk. If not possible to determine,
+# we prefer to claim it's local.
 # Argument 1: directory to test
 # Argument 2: what to do if it is on local disk
 # Argument 3: what to do otherwise (remote disk or failure)
@@ -3136,6 +3101,64 @@
 
 
 
+# Helper function which possibly converts a path using DOS-style short mode.
+# If so, the updated path is stored in $new_path.
+# $1: The path to check
+
+
+# Helper function which possibly converts a path using DOS-style short mode.
+# If so, the updated path is stored in $new_path.
+# $1: The path to check
+
+
+# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
+# and could probably be heavily simplified. However, all changes in this
+# area tend to need lot of testing in different scenarios, and in lack of
+# proper unit testing, cleaning this up has not been deemed worth the effort
+# at the moment.
+
+
+
+
+
+
+
+
+
+# Setup basic configuration paths, and platform-specific stuff related to PATHs.
+
+
+
+
+#
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+
+
+
+
 
 
 
@@ -3287,6 +3310,19 @@
 
 
 
+cygwin_help() {
+    case $1 in
+    unzip)
+        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
+    zip)
+        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
+    make)
+        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
+    * )
+       break ;;
+    esac
+}
+
 apt_help() {
     case $1 in
     devkit)
@@ -3561,28 +3597,82 @@
 # questions.
 #
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# This line needs to be here, verbatim, after all includes.
-# It is replaced with custom functionality when building
+# $1 = compiler to test (CC or CXX)
+# $2 = human readable name of compiler (C or C++)
+
+
+
+
+
+# $1 = compiler to test (CC or CXX)
+# $2 = human readable name of compiler (C or C++)
+# $3 = list of compiler names to search for
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+
+
+
+
+
+
+# Check if the VS env variables were setup prior to running configure.
+# If not, then find vcvarsall.bat and run it automatically, and integrate
+# the set env variables into the spec file.
+
+
+
+
+
+
+# This line needs to be here, verbatim, after all includes and the dummy hook
+# definitions. It is replaced with custom functionality when building
 # custom sources.
-
-
-###############################################################################
-#
-# Initialization
+#CUSTOM_AUTOCONF_INCLUDE
+
+# Do not change or remove the following line, it is needed for consistency checks:
+DATE_WHEN_GENERATED=1351539315
+
+###############################################################################
+#
+# Initialization / Boot-strapping
+#
+# The bootstrapping process needs to solve the "chicken or the egg" problem,
+# thus it jumps back and forth, each time gaining something needed later on.
 #
 ###############################################################################
 
@@ -3592,789 +3682,12 @@
 
 DATE_WHEN_CONFIGURED=`LANG=C date`
 
-
-
-# Now we can determine OpenJDK build and target platforms. This is required to
-# have early on.
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
-  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
-$as_echo_n "checking target system type... " >&6; }
-if test "${ac_cv_target+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$target_alias" = x; then
-  ac_cv_target=$ac_cv_host
-else
-  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
-    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
-$as_echo "$ac_cv_target" >&6; }
-case $ac_cv_target in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
-esac
-target=$ac_cv_target
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_target
-shift
-target_cpu=$1
-target_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-target_os=$*
-IFS=$ac_save_IFS
-case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
-  test "$program_prefix$program_suffix$program_transform_name" = \
-    NONENONEs,x,x, &&
-  program_prefix=${target_alias}-
-
-# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
-# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
-# product you're building. The target of this build is called "host". Since this is confusing to most people, we
-# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
-# to use the configure naming style.
-
-
-
-
-
-    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
-    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
-    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
-    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
-    OPENJDK_TARGET_AUTOCONF_NAME="$host"
-    OPENJDK_BUILD_AUTOCONF_NAME="$build"
-
-
-
-    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
-
-  case "$host_os" in
-    *linux*)
-      VAR_OS=linux
-      VAR_OS_API=posix
-      ;;
-    *solaris*)
-      VAR_OS=solaris
-      VAR_OS_API=posix
-      ;;
-    *darwin*)
-      VAR_OS=macosx
-      VAR_OS_API=posix
-      ;;
-    *bsd*)
-      VAR_OS=bsd
-      VAR_OS_API=posix
-      ;;
-    *cygwin*|*windows*)
-      VAR_OS=windows
-      VAR_OS_API=winapi
-      ;;
-    *)
-      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
-      ;;
-  esac
-
-
-  # First argument is the cpu name from the trip/quad
-  case "$host_cpu" in
-    x86_64)
-      VAR_CPU=x86_64
-      VAR_CPU_ARCH=x86
-      VAR_CPU_BITS=64
-      VAR_CPU_ENDIAN=little
-      ;;
-    i?86)
-      VAR_CPU=x86
-      VAR_CPU_ARCH=x86
-      VAR_CPU_BITS=32
-      VAR_CPU_ENDIAN=little
-      ;;
-    arm*)
-      VAR_CPU=arm
-      VAR_CPU_ARCH=arm
-      VAR_CPU_BITS=32
-      VAR_CPU_ENDIAN=little
-      ;;
-    powerpc)
-      VAR_CPU=ppc
-      VAR_CPU_ARCH=ppc
-      VAR_CPU_BITS=32
-      VAR_CPU_ENDIAN=big
-       ;;
-    powerpc64)
-      VAR_CPU=ppc64
-      VAR_CPU_ARCH=ppc
-      VAR_CPU_BITS=64
-      VAR_CPU_ENDIAN=big
-       ;;
-    sparc)
-      VAR_CPU=sparc
-      VAR_CPU_ARCH=sparc
-      VAR_CPU_BITS=32
-      VAR_CPU_ENDIAN=big
-       ;;
-    sparcv9)
-      VAR_CPU=sparcv9
-      VAR_CPU_ARCH=sparc
-      VAR_CPU_BITS=64
-      VAR_CPU_ENDIAN=big
-       ;;
-    *)
-      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
-      ;;
-  esac
-
-    # ... and setup our own variables. (Do this explicitely to facilitate searching)
-    OPENJDK_TARGET_OS="$VAR_OS"
-    OPENJDK_TARGET_OS_API="$VAR_OS_API"
-    OPENJDK_TARGET_CPU="$VAR_CPU"
-    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
-    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
-    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
-
-
-
-
-
-
-
-    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
-
-  case "$build_os" in
-    *linux*)
-      VAR_OS=linux
-      VAR_OS_API=posix
-      ;;
-    *solaris*)
-      VAR_OS=solaris
-      VAR_OS_API=posix
-      ;;
-    *darwin*)
-      VAR_OS=macosx
-      VAR_OS_API=posix
-      ;;
-    *bsd*)
-      VAR_OS=bsd
-      VAR_OS_API=posix
-      ;;
-    *cygwin*|*windows*)
-      VAR_OS=windows
-      VAR_OS_API=winapi
-      ;;
-    *)
-      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
-      ;;
-  esac
-
-
-  # First argument is the cpu name from the trip/quad
-  case "$build_cpu" in
-    x86_64)
-      VAR_CPU=x86_64
-      VAR_CPU_ARCH=x86
-      VAR_CPU_BITS=64
-      VAR_CPU_ENDIAN=little
-      ;;
-    i?86)
-      VAR_CPU=x86
-      VAR_CPU_ARCH=x86
-      VAR_CPU_BITS=32
-      VAR_CPU_ENDIAN=little
-      ;;
-    arm*)
-      VAR_CPU=arm
-      VAR_CPU_ARCH=arm
-      VAR_CPU_BITS=32
-      VAR_CPU_ENDIAN=little
-      ;;
-    powerpc)
-      VAR_CPU=ppc
-      VAR_CPU_ARCH=ppc
-      VAR_CPU_BITS=32
-      VAR_CPU_ENDIAN=big
-       ;;
-    powerpc64)
-      VAR_CPU=ppc64
-      VAR_CPU_ARCH=ppc
-      VAR_CPU_BITS=64
-      VAR_CPU_ENDIAN=big
-       ;;
-    sparc)
-      VAR_CPU=sparc
-      VAR_CPU_ARCH=sparc
-      VAR_CPU_BITS=32
-      VAR_CPU_ENDIAN=big
-       ;;
-    sparcv9)
-      VAR_CPU=sparcv9
-      VAR_CPU_ARCH=sparc
-      VAR_CPU_BITS=64
-      VAR_CPU_ENDIAN=big
-       ;;
-    *)
-      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
-      ;;
-  esac
-
-    # ..and setup our own variables. (Do this explicitely to facilitate searching)
-    OPENJDK_BUILD_OS="$VAR_OS"
-    OPENJDK_BUILD_OS_API="$VAR_OS_API"
-    OPENJDK_BUILD_CPU="$VAR_CPU"
-    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
-    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
-    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
-
-
-
-
-
-
-
-
-
-# Check whether --with-target-bits was given.
-if test "${with_target_bits+set}" = set; then :
-  withval=$with_target_bits;
-fi
-
-
-  # We have three types of compiles:
-  # native  == normal compilation, target system == build system
-  # cross   == traditional cross compilation, target system != build system; special toolchain needed
-  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
-  #
-  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
-    # We're doing a proper cross-compilation
-    COMPILE_TYPE="cross"
-  else
-    COMPILE_TYPE="native"
-  fi
-
-  if test "x$with_target_bits" != x; then
-    if test "x$COMPILE_TYPE" = "xcross"; then
-      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
-    fi
-
-    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-      # A reduced build is requested
-      COMPILE_TYPE="reduced"
-      OPENJDK_TARGET_CPU_BITS=32
-      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
-        OPENJDK_TARGET_CPU=x86
-      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
-        OPENJDK_TARGET_CPU=sparc
-      else
-        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
-      fi
-    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
-      as_fn_error $? "It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead." "$LINENO" 5
-    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
-$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
-    else
-      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
-    fi
-  fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compilation type" >&5
-$as_echo_n "checking for compilation type... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
-$as_echo "$COMPILE_TYPE" >&6; }
-
-
-    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
-       REQUIRED_OS_NAME=SunOS
-       REQUIRED_OS_VERSION=5.10
-    fi
-    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
-       REQUIRED_OS_NAME=Linux
-       REQUIRED_OS_VERSION=2.6
-    fi
-    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
-        REQUIRED_OS_NAME=Windows
-        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
-            REQUIRED_OS_VERSION=5.2
-        else
-            REQUIRED_OS_VERSION=5.1
-        fi
-    fi
-    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
-        REQUIRED_OS_NAME=Darwin
-        REQUIRED_OS_VERSION=11.2
-    fi
-
-
-
-
-
-    # Also store the legacy naming of the cpu.
-    # Ie i586 and amd64 instead of x86 and x86_64
-    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
-    if test "x$OPENJDK_TARGET_CPU" = xx86; then
-      OPENJDK_TARGET_CPU_LEGACY="i586"
-    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
-      # On all platforms except MacOSX replace x86_64 with amd64.
-      OPENJDK_TARGET_CPU_LEGACY="amd64"
-    fi
-
-
-    # And the second legacy naming of the cpu.
-    # Ie i386 and amd64 instead of x86 and x86_64.
-    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
-    if test "x$OPENJDK_TARGET_CPU" = xx86; then
-      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
-    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
-      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
-    fi
-
-
-    # This is the name of the cpu (but using i386 and amd64 instead of
-    # x86 and x86_64, respectively), preceeded by a /, to be used when
-    # locating libraries. On macosx, it's empty, though.
-    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
-    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-        OPENJDK_TARGET_CPU_LIBDIR=""
-    fi
-
-
-    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
-    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
-    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
-    OPENJDK_TARGET_CPU_ISADIR=""
-    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
-          OPENJDK_TARGET_CPU_ISADIR="/amd64"
-      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
-          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
-      fi
-    fi
-
-
-    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
-    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
-    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
-      # On linux only, we replace x86 with i386.
-      OPENJDK_TARGET_CPU_OSARCH="i386"
-    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
-      # On all platforms except macosx, we replace x86_64 with amd64.
-      OPENJDK_TARGET_CPU_OSARCH="amd64"
-    fi
-
-
-    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
-    if test "x$OPENJDK_TARGET_CPU" = xx86; then
-      OPENJDK_TARGET_CPU_JLI="i386"
-    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
-      # On all platforms except macosx, we replace x86_64 with amd64.
-      OPENJDK_TARGET_CPU_JLI="amd64"
-    fi
-    # Now setup the -D flags for building libjli.
-    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
-    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
-        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
-      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
-        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
-      fi
-    fi
-
-
-    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
-    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
-        OPENJDK_TARGET_OS_API_DIR="solaris"
-    fi
-    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
-        OPENJDK_TARGET_OS_API_DIR="windows"
-    fi
-
-
-    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-        A_LP64="LP64:="
-        ADD_LP64="-D_LP64=1"
-    fi
-    LP64=$A_LP64
-
-
-    if test "x$COMPILE_TYPE" = "xcross"; then
-      # FIXME: ... or should this include reduced builds..?
-      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
-    else
-      DEFINE_CROSS_COMPILE_ARCH=""
-    fi
-
-
-
-
-# Continue setting up basic stuff.
-
-# Locate the directory of this script.
-SCRIPT="$0"
-
-    if test "x$OPENJDK_BUILD_OS" != xwindows; then
-        # Follow a chain of symbolic links. Use readlink
-        # where it exists, else fall back to horribly
-        # complicated shell code.
-        # Extract the first word of "readlink", so it can be a program name with args.
-set dummy readlink; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_READLINK+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $READLINK in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-READLINK=$ac_cv_path_READLINK
-if test -n "$READLINK"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
-$as_echo "$READLINK" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-        if test "x$READLINK_TESTED" != yes; then
-            # On MacOSX there is a readlink tool with a different
-            # purpose than the GNU readlink tool. Check the found readlink.
-            ISGNU=`$READLINK --help 2>&1 | grep GNU`
-            if test "x$ISGNU" = x; then
-                 # A readlink that we do not know how to use.
-                 # Are there other non-GNU readlinks out there?
-                 READLINK_TESTED=yes
-                 READLINK=
-            fi
-        fi
-
-        if test "x$READLINK" != x; then
-            SCRIPT=`$READLINK -f $SCRIPT`
-        else
-            STARTDIR=$PWD
-            COUNTER=0
-            DIR=`dirname $SCRIPT`
-            FIL=`basename $SCRIPT`
-            while test $COUNTER -lt 20; do
-                ISLINK=`ls -l $DIR/$FIL | grep '\->' | sed -e 's/.*-> \(.*\)/\1/'`
-                if test "x$ISLINK" == x; then
-                    # This is not a symbolic link! We are done!
-                    break
-                fi
-                # The link might be relative! We have to use cd to travel safely.
-                cd $DIR
-                cd `dirname $ISLINK`
-                DIR=`pwd`
-                FIL=`basename $ISLINK`
-                let COUNTER=COUNTER+1
-            done
-            cd $STARTDIR
-            SCRIPT=$DIR/$FIL
-        fi
-    fi
-
-AUTOCONF_DIR=`dirname $0`
-
-# Where is the source? It is located two levels above the configure script.
-CURDIR="$PWD"
-cd "$AUTOCONF_DIR/../.."
-SRC_ROOT="`pwd`"
-if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-    SRC_ROOT_LENGTH=`pwd|wc -m`
-    if test $SRC_ROOT_LENGTH -gt 100; then
-        as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
-    fi
-fi
-
-cd "$CURDIR"
-
-
-    # Fail with message the path to the source root if var SRC_ROOT contains a path with no spaces in it.
-    # Unless on Windows, where we can rewrite the path.
-    HAS_SPACE=`echo "$SRC_ROOT" | grep " "`
-    if test "x$HAS_SPACE" != x; then
-        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-            # First convert it to DOS-style, short mode (no spaces)
-            SRC_ROOT=`$CYGPATH -s -m -a "$SRC_ROOT"`
-            # Now it's case insensitive; let's make it lowercase to improve readability
-            SRC_ROOT=`$ECHO "$SRC_ROOT" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
-            # Now convert it back to Unix-stile (cygpath)
-            SRC_ROOT=`$CYGPATH -u "$SRC_ROOT"`
-        else
-            as_fn_error $? "You cannot have spaces in the path to the source root! \"$SRC_ROOT\"" "$LINENO" 5
-        fi
-    fi
-
-
-    # Fail with message the path to the current directory if var CURDIR contains a path with no spaces in it.
-    # Unless on Windows, where we can rewrite the path.
-    HAS_SPACE=`echo "$CURDIR" | grep " "`
-    if test "x$HAS_SPACE" != x; then
-        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-            # First convert it to DOS-style, short mode (no spaces)
-            CURDIR=`$CYGPATH -s -m -a "$CURDIR"`
-            # Now it's case insensitive; let's make it lowercase to improve readability
-            CURDIR=`$ECHO "$CURDIR" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
-            # Now convert it back to Unix-stile (cygpath)
-            CURDIR=`$CYGPATH -u "$CURDIR"`
-        else
-            as_fn_error $? "You cannot have spaces in the path to the current directory! \"$CURDIR\"" "$LINENO" 5
-        fi
-    fi
-
-
-if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
-    # Add extra search paths on solaris for utilities like ar and as etc...
-    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
-fi
-
-# For cygwin we need cygpath first, since it is used everywhere.
-# Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CYGPATH+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $CYGPATH in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-CYGPATH=$ac_cv_path_CYGPATH
-if test -n "$CYGPATH"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
-$as_echo "$CYGPATH" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-PATH_SEP=":"
-if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-    if test "x$CYGPATH" = x; then
-        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
-    fi
-    PATH_SEP=";"
-fi
-
-
-# You can force the sys-root if the sys-root encoded into the cross compiler tools
-# is not correct.
-
-# Check whether --with-sys-root was given.
-if test "${with_sys_root+set}" = set; then :
-  withval=$with_sys_root;
-fi
-
-
-if test "x$with_sys_root" != x; then
-  SYS_ROOT=$with_sys_root
-else
-  SYS_ROOT=/
-fi
-
-
-
-# Check whether --with-tools-dir was given.
-if test "${with_tools_dir+set}" = set; then :
-  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
-fi
-
-
-
-# Check whether --with-devkit was given.
-if test "${with_devkit+set}" = set; then :
-  withval=$with_devkit;
-    if test "x$with_sys_root" != x; then
-      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
-    fi
-    if test "x$with_tools_dir" != x; then
-      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
-    fi
-    TOOLS_DIR=$with_devkit/bin
-    SYS_ROOT=$with_devkit/$host_alias/libc
-
-fi
-
-
-
-
-# Setup default logging of stdout and stderr to build.log in the output root.
-BUILD_LOG='$(OUTPUT_ROOT)/build.log'
-BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
-BUILD_LOG_WRAPPER='$(SH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
-
-
-
-
-
-# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
-
-    for ac_prog in apt-get yum port pkgutil pkgadd
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$PKGHANDLER"; then
-  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_PKGHANDLER="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-PKGHANDLER=$ac_cv_prog_PKGHANDLER
-if test -n "$PKGHANDLER"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
-$as_echo "$PKGHANDLER" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$PKGHANDLER" && break
-done
-
-
-
-# Setup simple tools, that do not need have cross compilation support.
-# Without these, we can't properly run the rest of the configure script.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
+$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
+$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
+
+
 
 # Start with tools that do not need have cross compilation support
 # and can be expected to be found in the default PATH. These tools are
@@ -4443,6 +3756,65 @@
 
 
 
+    for ac_prog in bash
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_BASH+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $BASH in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+BASH=$ac_cv_path_BASH
+if test -n "$BASH"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
+$as_echo "$BASH" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$BASH" && break
+done
+
+
+    if test "x$BASH" = x; then
+        if test "xbash" = x; then
+          PROG_NAME=bash
+        else
+          PROG_NAME=bash
+        fi
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+        as_fn_error $? "Cannot continue" "$LINENO" 5
+    fi
+
+
+
     for ac_prog in cat
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -4679,65 +4051,6 @@
 
 
 
-    for ac_prog in cpio
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CPIO+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $CPIO in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-CPIO=$ac_cv_path_CPIO
-if test -n "$CPIO"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
-$as_echo "$CPIO" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$CPIO" && break
-done
-
-
-    if test "x$CPIO" = x; then
-        if test "xcpio" = x; then
-          PROG_NAME=cpio
-        else
-          PROG_NAME=cpio
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
-    fi
-
-
-
     for ac_prog in cut
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -4856,65 +4169,6 @@
 
 
 
-    for ac_prog in df
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_DF+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $DF in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_DF="$DF" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-DF=$ac_cv_path_DF
-if test -n "$DF"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
-$as_echo "$DF" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$DF" && break
-done
-
-
-    if test "x$DF" = x; then
-        if test "xdf" = x; then
-          PROG_NAME=df
-        else
-          PROG_NAME=df
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
-    fi
-
-
-
     for ac_prog in gdiff diff
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -4974,6 +4228,65 @@
 
 
 
+    for ac_prog in dirname
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_DIRNAME+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $DIRNAME in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+DIRNAME=$ac_cv_path_DIRNAME
+if test -n "$DIRNAME"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
+$as_echo "$DIRNAME" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$DIRNAME" && break
+done
+
+
+    if test "x$DIRNAME" = x; then
+        if test "xdirname" = x; then
+          PROG_NAME=dirname
+        else
+          PROG_NAME=dirname
+        fi
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+        as_fn_error $? "Cannot continue" "$LINENO" 5
+    fi
+
+
+
     for ac_prog in echo
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -5446,6 +4759,65 @@
 
 
 
+    for ac_prog in mktemp
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_MKTEMP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $MKTEMP in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+MKTEMP=$ac_cv_path_MKTEMP
+if test -n "$MKTEMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
+$as_echo "$MKTEMP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$MKTEMP" && break
+done
+
+
+    if test "x$MKTEMP" = x; then
+        if test "xmktemp" = x; then
+          PROG_NAME=mktemp
+        else
+          PROG_NAME=mktemp
+        fi
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+        as_fn_error $? "Cannot continue" "$LINENO" 5
+    fi
+
+
+
     for ac_prog in mv
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -5564,6 +4936,124 @@
 
 
 
+    for ac_prog in pwd
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $THEPWDCMD in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+THEPWDCMD=$ac_cv_path_THEPWDCMD
+if test -n "$THEPWDCMD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
+$as_echo "$THEPWDCMD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$THEPWDCMD" && break
+done
+
+
+    if test "x$THEPWDCMD" = x; then
+        if test "xpwd" = x; then
+          PROG_NAME=thepwdcmd
+        else
+          PROG_NAME=pwd
+        fi
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+        as_fn_error $? "Cannot continue" "$LINENO" 5
+    fi
+
+
+
+    for ac_prog in rm
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_RM+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $RM in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_RM="$RM" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+RM=$ac_cv_path_RM
+if test -n "$RM"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
+$as_echo "$RM" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$RM" && break
+done
+
+
+    if test "x$RM" = x; then
+        if test "xrm" = x; then
+          PROG_NAME=rm
+        else
+          PROG_NAME=rm
+        fi
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+        as_fn_error $? "Cannot continue" "$LINENO" 5
+    fi
+
+
+
     for ac_prog in sh
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -5977,6 +5467,65 @@
 
 
 
+    for ac_prog in uname
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_UNAME+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $UNAME in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+UNAME=$ac_cv_path_UNAME
+if test -n "$UNAME"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
+$as_echo "$UNAME" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$UNAME" && break
+done
+
+
+    if test "x$UNAME" = x; then
+        if test "xuname" = x; then
+          PROG_NAME=uname
+        else
+          PROG_NAME=uname
+        fi
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+        as_fn_error $? "Cannot continue" "$LINENO" 5
+    fi
+
+
+
     for ac_prog in uniq
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -6036,65 +5585,6 @@
 
 
 
-    for ac_prog in unzip
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_UNZIP+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $UNZIP in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-UNZIP=$ac_cv_path_UNZIP
-if test -n "$UNZIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
-$as_echo "$UNZIP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$UNZIP" && break
-done
-
-
-    if test "x$UNZIP" = x; then
-        if test "xunzip" = x; then
-          PROG_NAME=unzip
-        else
-          PROG_NAME=unzip
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
-    fi
-
-
-
     for ac_prog in wc
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -6154,6 +5644,65 @@
 
 
 
+    for ac_prog in which
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_WHICH+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $WHICH in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+WHICH=$ac_cv_path_WHICH
+if test -n "$WHICH"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
+$as_echo "$WHICH" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$WHICH" && break
+done
+
+
+    if test "x$WHICH" = x; then
+        if test "xwhich" = x; then
+          PROG_NAME=which
+        else
+          PROG_NAME=which
+        fi
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+        as_fn_error $? "Cannot continue" "$LINENO" 5
+    fi
+
+
+
     for ac_prog in xargs
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -6213,65 +5762,6 @@
 
 
 
-    for ac_prog in zip
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ZIP+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $ZIP in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-ZIP=$ac_cv_path_ZIP
-if test -n "$ZIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
-$as_echo "$ZIP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ZIP" && break
-done
-
-
-    if test "x$ZIP" = x; then
-        if test "xzip" = x; then
-          PROG_NAME=zip
-        else
-          PROG_NAME=zip
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
-    fi
-
-
-
 # Then required tools that require some special treatment.
 for ac_prog in gawk mawk nawk awk
 do
@@ -6700,1231 +6190,1150 @@
     fi
 
 
-
-  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
-  if test "x$MAKE" != x; then
-    # User has supplied a make, test it.
-    if test ! -f "$MAKE"; then
-      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
-    fi
-
-  MAKE_CANDIDATE=""$MAKE""
-  DESCRIPTION="user supplied MAKE="
-  if test "x$MAKE_CANDIDATE" != x; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
-$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
-
-    # Translate "gcc -E" into "`which gcc` -E" ie
-    # extract the full path to the binary and at the
-    # same time maintain any arguments passed to it.
-    # The command MUST exist in the path, or else!
-    tmp="$MAKE_CANDIDATE"
-    car="${tmp%% *}"
-    tmp="$MAKE_CANDIDATE EOL"
-    cdr="${tmp#* }"
-    # On windows we want paths without spaces.
-    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
-    # Translate long cygdrive or C:\sdfsf path
-    # into a short mixed mode path that has no
-    # spaces in it.
-    tmp="$car"
-
-    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-        tmp=`$CYGPATH -u "$car"`
-        tmp=`which "$tmp"`
-        # If file exists with .exe appended, that's the real filename
-        # and cygpath needs that to convert to short style path.
-        if test -f "${tmp}.exe"; then
-           tmp="${tmp}.exe"
-        elif test -f "${tmp}.cmd"; then
-           tmp="${tmp}.cmd"
-        fi
-        # Convert to C:/ mixed style path without spaces.
-         tmp=`$CYGPATH -s -m "$tmp"`
-    fi
-    car="$tmp"
-
-    else
-        # "which" is not portable, but is used here
-        # because we know that the command exists!
-        car=`which $car`
-    fi
-    if test "x$cdr" != xEOL; then
-        MAKE_CANDIDATE="$car ${cdr% *}"
-    else
-        MAKE_CANDIDATE="$car"
-    fi
-
-    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
-    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
-    if test "x$IS_GNU_MAKE" = x; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
-$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
-    else
-      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
-      if test "x$IS_MODERN_MAKE" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
-$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
-      else
-        FOUND_MAKE=$MAKE_CANDIDATE
-      fi
-    fi
-  fi
-
-    if test "x$FOUND_MAKE" = x; then
-      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
-    fi
-  else
-    # Try our hardest to locate a correct version of GNU make
-    for ac_prog in gmake
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $CHECK_GMAKE in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
-if test -n "$CHECK_GMAKE"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
-$as_echo "$CHECK_GMAKE" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$CHECK_GMAKE" && break
-done
-
-
-  MAKE_CANDIDATE=""$CHECK_GMAKE""
-  DESCRIPTION="gmake in PATH"
-  if test "x$MAKE_CANDIDATE" != x; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
-$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
-
-    # Translate "gcc -E" into "`which gcc` -E" ie
-    # extract the full path to the binary and at the
-    # same time maintain any arguments passed to it.
-    # The command MUST exist in the path, or else!
-    tmp="$MAKE_CANDIDATE"
-    car="${tmp%% *}"
-    tmp="$MAKE_CANDIDATE EOL"
-    cdr="${tmp#* }"
-    # On windows we want paths without spaces.
-    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
-    # Translate long cygdrive or C:\sdfsf path
-    # into a short mixed mode path that has no
-    # spaces in it.
-    tmp="$car"
-
-    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-        tmp=`$CYGPATH -u "$car"`
-        tmp=`which "$tmp"`
-        # If file exists with .exe appended, that's the real filename
-        # and cygpath needs that to convert to short style path.
-        if test -f "${tmp}.exe"; then
-           tmp="${tmp}.exe"
-        elif test -f "${tmp}.cmd"; then
-           tmp="${tmp}.cmd"
-        fi
-        # Convert to C:/ mixed style path without spaces.
-         tmp=`$CYGPATH -s -m "$tmp"`
-    fi
-    car="$tmp"
-
-    else
-        # "which" is not portable, but is used here
-        # because we know that the command exists!
-        car=`which $car`
-    fi
-    if test "x$cdr" != xEOL; then
-        MAKE_CANDIDATE="$car ${cdr% *}"
-    else
-        MAKE_CANDIDATE="$car"
-    fi
-
-    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
-    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
-    if test "x$IS_GNU_MAKE" = x; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
-$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
-    else
-      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
-      if test "x$IS_MODERN_MAKE" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
-$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
-      else
-        FOUND_MAKE=$MAKE_CANDIDATE
-      fi
-    fi
-  fi
-
-
-    if test "x$FOUND_MAKE" = x; then
-      for ac_prog in make
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $CHECK_MAKE in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-CHECK_MAKE=$ac_cv_path_CHECK_MAKE
-if test -n "$CHECK_MAKE"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
-$as_echo "$CHECK_MAKE" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$CHECK_MAKE" && break
-done
-
-
-  MAKE_CANDIDATE=""$CHECK_MAKE""
-  DESCRIPTION="make in PATH"
-  if test "x$MAKE_CANDIDATE" != x; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
-$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
-
-    # Translate "gcc -E" into "`which gcc` -E" ie
-    # extract the full path to the binary and at the
-    # same time maintain any arguments passed to it.
-    # The command MUST exist in the path, or else!
-    tmp="$MAKE_CANDIDATE"
-    car="${tmp%% *}"
-    tmp="$MAKE_CANDIDATE EOL"
-    cdr="${tmp#* }"
-    # On windows we want paths without spaces.
-    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
-    # Translate long cygdrive or C:\sdfsf path
-    # into a short mixed mode path that has no
-    # spaces in it.
-    tmp="$car"
-
-    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-        tmp=`$CYGPATH -u "$car"`
-        tmp=`which "$tmp"`
-        # If file exists with .exe appended, that's the real filename
-        # and cygpath needs that to convert to short style path.
-        if test -f "${tmp}.exe"; then
-           tmp="${tmp}.exe"
-        elif test -f "${tmp}.cmd"; then
-           tmp="${tmp}.cmd"
-        fi
-        # Convert to C:/ mixed style path without spaces.
-         tmp=`$CYGPATH -s -m "$tmp"`
-    fi
-    car="$tmp"
-
-    else
-        # "which" is not portable, but is used here
-        # because we know that the command exists!
-        car=`which $car`
-    fi
-    if test "x$cdr" != xEOL; then
-        MAKE_CANDIDATE="$car ${cdr% *}"
-    else
-        MAKE_CANDIDATE="$car"
-    fi
-
-    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
-    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
-    if test "x$IS_GNU_MAKE" = x; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
-$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
-    else
-      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
-      if test "x$IS_MODERN_MAKE" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
-$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
-      else
-        FOUND_MAKE=$MAKE_CANDIDATE
-      fi
-    fi
-  fi
-
-    fi
-
-    if test "x$FOUND_MAKE" = x; then
-      if test "x$TOOLS_DIR" != x; then
-        # We have a tools-dir, check that as well before giving up.
-        OLD_PATH=$PATH
-        PATH=$TOOLS_DIR:$PATH
-        for ac_prog in gmake
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $CHECK_TOOLSDIR_GMAKE in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
-if test -n "$CHECK_TOOLSDIR_GMAKE"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
-$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$CHECK_TOOLSDIR_GMAKE" && break
-done
-
-
-  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
-  DESCRIPTION="gmake in tools-dir"
-  if test "x$MAKE_CANDIDATE" != x; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
-$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
-
-    # Translate "gcc -E" into "`which gcc` -E" ie
-    # extract the full path to the binary and at the
-    # same time maintain any arguments passed to it.
-    # The command MUST exist in the path, or else!
-    tmp="$MAKE_CANDIDATE"
-    car="${tmp%% *}"
-    tmp="$MAKE_CANDIDATE EOL"
-    cdr="${tmp#* }"
-    # On windows we want paths without spaces.
-    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
-    # Translate long cygdrive or C:\sdfsf path
-    # into a short mixed mode path that has no
-    # spaces in it.
-    tmp="$car"
-
-    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-        tmp=`$CYGPATH -u "$car"`
-        tmp=`which "$tmp"`
-        # If file exists with .exe appended, that's the real filename
-        # and cygpath needs that to convert to short style path.
-        if test -f "${tmp}.exe"; then
-           tmp="${tmp}.exe"
-        elif test -f "${tmp}.cmd"; then
-           tmp="${tmp}.cmd"
-        fi
-        # Convert to C:/ mixed style path without spaces.
-         tmp=`$CYGPATH -s -m "$tmp"`
-    fi
-    car="$tmp"
-
-    else
-        # "which" is not portable, but is used here
-        # because we know that the command exists!
-        car=`which $car`
-    fi
-    if test "x$cdr" != xEOL; then
-        MAKE_CANDIDATE="$car ${cdr% *}"
-    else
-        MAKE_CANDIDATE="$car"
-    fi
-
-    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
-    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
-    if test "x$IS_GNU_MAKE" = x; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
-$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
-    else
-      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
-      if test "x$IS_MODERN_MAKE" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
-$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
-      else
-        FOUND_MAKE=$MAKE_CANDIDATE
-      fi
-    fi
-  fi
-
-        if test "x$FOUND_MAKE" = x; then
-          for ac_prog in make
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $CHECK_TOOLSDIR_MAKE in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
-if test -n "$CHECK_TOOLSDIR_MAKE"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
-$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$CHECK_TOOLSDIR_MAKE" && break
-done
-
-
-  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
-  DESCRIPTION="make in tools-dir"
-  if test "x$MAKE_CANDIDATE" != x; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
-$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
-
-    # Translate "gcc -E" into "`which gcc` -E" ie
-    # extract the full path to the binary and at the
-    # same time maintain any arguments passed to it.
-    # The command MUST exist in the path, or else!
-    tmp="$MAKE_CANDIDATE"
-    car="${tmp%% *}"
-    tmp="$MAKE_CANDIDATE EOL"
-    cdr="${tmp#* }"
-    # On windows we want paths without spaces.
-    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-
-    # Translate long cygdrive or C:\sdfsf path
-    # into a short mixed mode path that has no
-    # spaces in it.
-    tmp="$car"
-
-    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
-        tmp=`$CYGPATH -u "$car"`
-        tmp=`which "$tmp"`
-        # If file exists with .exe appended, that's the real filename
-        # and cygpath needs that to convert to short style path.
-        if test -f "${tmp}.exe"; then
-           tmp="${tmp}.exe"
-        elif test -f "${tmp}.cmd"; then
-           tmp="${tmp}.cmd"
-        fi
-        # Convert to C:/ mixed style path without spaces.
-         tmp=`$CYGPATH -s -m "$tmp"`
-    fi
-    car="$tmp"
-
-    else
-        # "which" is not portable, but is used here
-        # because we know that the command exists!
-        car=`which $car`
-    fi
-    if test "x$cdr" != xEOL; then
-        MAKE_CANDIDATE="$car ${cdr% *}"
-    else
-        MAKE_CANDIDATE="$car"
-    fi
-
-    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
-    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
-    if test "x$IS_GNU_MAKE" = x; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
-$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
-    else
-      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
-      if test "x$IS_MODERN_MAKE" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
-$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
-      else
-        FOUND_MAKE=$MAKE_CANDIDATE
-      fi
-    fi
-  fi
-
-        fi
-        PATH=$OLD_PATH
-      fi
-    fi
-
-    if test "x$FOUND_MAKE" = x; then
-      as_fn_error $? "Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
-    fi
-  fi
-
-  MAKE=$FOUND_MAKE
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
-$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
-
-
-
-    for ac_prog in rm
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_RM+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $RM in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_RM="$RM" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-RM=$ac_cv_path_RM
-if test -n "$RM"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
-$as_echo "$RM" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$RM" && break
-done
-
-
-    if test "x$RM" = x; then
-        if test "xrm" = x; then
-          PROG_NAME=rm
-        else
-          PROG_NAME=rm
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
-$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
-        as_fn_error $? "Cannot continue" "$LINENO" 5
-    fi
-
-
+# Always force rm.
 RM="$RM -f"
 
-
-    # Test if find supports -delete
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
-$as_echo_n "checking if find supports -delete... " >&6; }
-    FIND_DELETE="-delete"
-
-    DELETEDIR=`mktemp -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
-
-    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
-
-    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
-    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
-        # No, it does not.
-        rm $DELETEDIR/TestIfFindSupportsDelete
-        FIND_DELETE="-exec rm \{\} \+"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-    fi
-    rmdir $DELETEDIR
-
-
-
-# Non-required basic tools
-
-# Extract the first word of "pwd", so it can be a program name with args.
-set dummy pwd; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $THEPWDCMD in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-THEPWDCMD=$ac_cv_path_THEPWDCMD
-if test -n "$THEPWDCMD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
-$as_echo "$THEPWDCMD" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-# Extract the first word of "ldd", so it can be a program name with args.
-set dummy ldd; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_LDD+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $LDD in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-LDD=$ac_cv_path_LDD
-if test -n "$LDD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
-$as_echo "$LDD" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-if test "x$LDD" = "x"; then
-    # List shared lib dependencies is used for
-    # debug output and checking for forbidden dependencies.
-    # We can build without it.
-    LDD="true"
-fi
-# Extract the first word of "otool", so it can be a program name with args.
-set dummy otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_OTOOL+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $OTOOL in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-OTOOL=$ac_cv_path_OTOOL
-if test -n "$OTOOL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
-$as_echo "$OTOOL" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-if test "x$OTOOL" = "x"; then
-   OTOOL="true"
-fi
-for ac_prog in readelf greadelf
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_READELF+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $READELF in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-READELF=$ac_cv_path_READELF
-if test -n "$READELF"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
-$as_echo "$READELF" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$READELF" && break
-done
-
-for ac_prog in objdump gobjdump
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_OBJDUMP+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $OBJDUMP in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-OBJDUMP=$ac_cv_path_OBJDUMP
-if test -n "$OBJDUMP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
-$as_echo "$OBJDUMP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$OBJDUMP" && break
-done
-
-# Extract the first word of "hg", so it can be a program name with args.
-set dummy hg; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_HG+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $HG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_HG="$HG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-HG=$ac_cv_path_HG
-if test -n "$HG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
-$as_echo "$HG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-
-# Check if pkg-config is available.
-
-
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-	if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_path_PKG_CONFIG"; then
-  ac_pt_PKG_CONFIG=$PKG_CONFIG
-  # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $ac_pt_PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-if test -n "$ac_pt_PKG_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
-$as_echo "$ac_pt_PKG_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_pt_PKG_CONFIG" = x; then
-    PKG_CONFIG=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    PKG_CONFIG=$ac_pt_PKG_CONFIG
-  fi
-else
-  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
-fi
-
-fi
-if test -n "$PKG_CONFIG"; then
-	_pkg_min_version=0.9.0
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
-$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
-	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	else
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-		PKG_CONFIG=""
-	fi
-
-fi
-
-# After basic tools have been setup, we can check build os specific details.
-
-###############################################################################
-
-# Note that this is the build platform OS version!
-
-OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
-OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
-OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
-OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
-
-
-
-
-
-# Setup builddeps, for automatic downloading of tools we need.
-# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
-# boot-jdk setup, but we need to have basic tools setup first.
-
-
-# Check whether --with-builddeps-conf was given.
-if test "${with_builddeps_conf+set}" = set; then :
-  withval=$with_builddeps_conf;
-fi
-
-
-
-# Check whether --with-builddeps-server was given.
-if test "${with_builddeps_server+set}" = set; then :
-  withval=$with_builddeps_server;
-fi
-
-
-
-# Check whether --with-builddeps-dir was given.
-if test "${with_builddeps_dir+set}" = set; then :
-  withval=$with_builddeps_dir;
-else
-  with_builddeps_dir=/localhome/builddeps
-fi
-
-
-
-# Check whether --with-builddeps-group was given.
-if test "${with_builddeps_group+set}" = set; then :
-  withval=$with_builddeps_group;
-fi
-
-
-# Check whether --enable-list-builddeps was given.
-if test "${enable_list_builddeps+set}" = set; then :
-  enableval=$enable_list_builddeps; LIST_BUILDDEPS="${enableval}"
-else
-  LIST_BUILDDEPS='no'
-fi
-
-
-if test "x$LIST_BUILDDEPS" = xyes; then
-    echo
-    echo List of build dependencies known to the configure script,
-    echo that can be used in builddeps.conf files:
-    cat $AUTOCONF_DIR/*.ac $AUTOCONF_DIR/*.m4 | grep BDEPS_CHECK_MODULE\( | cut -f 2 -d ',' | tr -d ' ' | sort
-    echo
-    exit 1
-fi
-
-
-
-    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
-        if test "x$with_builddeps_conf" != x; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
-$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
-            builddepsfile=$with_builddeps_conf
-            if test -s $builddepsfile; then
-                . $builddepsfile
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
-$as_echo "loaded!" >&6; }
-            else
-               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
-           fi
-        else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
-$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
-            builddepsfile=`mktemp`
-            touch $builddepsfile
-            # Put all found confs into a single file.
-            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
-            # Source the file to acquire the variables
-            if test -s $builddepsfile; then
-                . $builddepsfile
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
-$as_echo "found at least one!" >&6; }
-            else
-               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
-           fi
-        fi
-        # Create build and target names that use _ instead of "-" and ".".
-        # This is necessary to use them in variable names.
-        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
-        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
-        # Extract rewrite information for build and target
-        eval rewritten_build=\${REWRITE_${build_var}}
-        if test "x$rewritten_build" = x; then
-            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
-            echo Build stays the same $rewritten_build
-        else
-            echo Rewriting build for builddeps into $rewritten_build
-        fi
-        eval rewritten_target=\${REWRITE_${target_var}}
-        if test "x$rewritten_target" = x; then
-            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
-            echo Target stays the same $rewritten_target
-        else
-            echo Rewriting target for builddeps into $rewritten_target
-        fi
-        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
-        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
-    fi
-    for ac_prog in 7z unzip
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$BDEPS_UNZIP"; then
-  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
-if test -n "$BDEPS_UNZIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
-$as_echo "$BDEPS_UNZIP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$BDEPS_UNZIP" && break
-done
-
-    if test "x$BDEPS_UNZIP" = x7z; then
-        BDEPS_UNZIP="7z x"
-    fi
-
-    for ac_prog in wget lftp ftp
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$BDEPS_FTP"; then
-  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_BDEPS_FTP="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
-if test -n "$BDEPS_FTP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
-$as_echo "$BDEPS_FTP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$BDEPS_FTP" && break
-done
-
-
-
-###############################################################################
-#
-# Determine OpenJDK variants, options and version numbers.
-#
-###############################################################################
-
-# We need build & target for this.
+# These are not required on all platforms
+# Extract the first word of "cygpath", so it can be a program name with args.
+set dummy cygpath; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_CYGPATH+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $CYGPATH in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+CYGPATH=$ac_cv_path_CYGPATH
+if test -n "$CYGPATH"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
+$as_echo "$CYGPATH" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "readlink", so it can be a program name with args.
+set dummy readlink; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_READLINK+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $READLINK in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+READLINK=$ac_cv_path_READLINK
+if test -n "$READLINK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
+$as_echo "$READLINK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "df", so it can be a program name with args.
+set dummy df; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_DF+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $DF in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_DF="$DF" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+DF=$ac_cv_path_DF
+if test -n "$DF"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
+$as_echo "$DF" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "SetFile", so it can be a program name with args.
+set dummy SetFile; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_SETFILE+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $SETFILE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+SETFILE=$ac_cv_path_SETFILE
+if test -n "$SETFILE"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
+$as_echo "$SETFILE" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+# Now we can determine OpenJDK build and target platforms. This is required to
+# have early on.
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
+$as_echo_n "checking target system type... " >&6; }
+if test "${ac_cv_target+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$target_alias" = x; then
+  ac_cv_target=$ac_cv_host
+else
+  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
+$as_echo "$ac_cv_target" >&6; }
+case $ac_cv_target in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
+esac
+target=$ac_cv_target
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_target
+shift
+target_cpu=$1
+target_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+target_os=$*
+IFS=$ac_save_IFS
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+
+# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
+# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
+# product you're building. The target of this build is called "host". Since this is confusing to most people, we
+# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
+# to use the configure naming style.
+
+
+
+
+
+    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
+    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
+    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
+    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
+    OPENJDK_TARGET_AUTOCONF_NAME="$host"
+    OPENJDK_BUILD_AUTOCONF_NAME="$build"
+
+
+
+    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
+
+  case "$build_os" in
+    *linux*)
+      VAR_OS=linux
+      VAR_OS_API=posix
+      VAR_OS_ENV=linux
+      ;;
+    *solaris*)
+      VAR_OS=solaris
+      VAR_OS_API=posix
+      VAR_OS_ENV=solaris
+      ;;
+    *darwin*)
+      VAR_OS=macosx
+      VAR_OS_API=posix
+      VAR_OS_ENV=macosx
+      ;;
+    *bsd*)
+      VAR_OS=bsd
+      VAR_OS_API=posix
+      VAR_OS_ENV=bsd
+      ;;
+    *cygwin*)
+      VAR_OS=windows
+      VAR_OS_API=winapi
+      VAR_OS_ENV=windows.cygwin
+      ;;
+    *mingw*)
+      VAR_OS=windows
+      VAR_OS_API=winapi
+      VAR_OS_ENV=windows.msys
+      ;;
+    *)
+      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
+      ;;
+  esac
+
+
+  # First argument is the cpu name from the trip/quad
+  case "$build_cpu" in
+    x86_64)
+      VAR_CPU=x86_64
+      VAR_CPU_ARCH=x86
+      VAR_CPU_BITS=64
+      VAR_CPU_ENDIAN=little
+      ;;
+    i?86)
+      VAR_CPU=x86
+      VAR_CPU_ARCH=x86
+      VAR_CPU_BITS=32
+      VAR_CPU_ENDIAN=little
+      ;;
+    arm*)
+      VAR_CPU=arm
+      VAR_CPU_ARCH=arm
+      VAR_CPU_BITS=32
+      VAR_CPU_ENDIAN=little
+      ;;
+    powerpc)
+      VAR_CPU=ppc
+      VAR_CPU_ARCH=ppc
+      VAR_CPU_BITS=32
+      VAR_CPU_ENDIAN=big
+       ;;
+    powerpc64)
+      VAR_CPU=ppc64
+      VAR_CPU_ARCH=ppc
+      VAR_CPU_BITS=64
+      VAR_CPU_ENDIAN=big
+       ;;
+    sparc)
+      VAR_CPU=sparc
+      VAR_CPU_ARCH=sparc
+      VAR_CPU_BITS=32
+      VAR_CPU_ENDIAN=big
+       ;;
+    sparcv9)
+      VAR_CPU=sparcv9
+      VAR_CPU_ARCH=sparc
+      VAR_CPU_BITS=64
+      VAR_CPU_ENDIAN=big
+       ;;
+    *)
+      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
+      ;;
+  esac
+
+    # ..and setup our own variables. (Do this explicitely to facilitate searching)
+    OPENJDK_BUILD_OS="$VAR_OS"
+    OPENJDK_BUILD_OS_API="$VAR_OS_API"
+    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
+    OPENJDK_BUILD_CPU="$VAR_CPU"
+    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
+    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
+    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
+$as_echo_n "checking openjdk-build os-cpu... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
+$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
+
+    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
+
+  case "$host_os" in
+    *linux*)
+      VAR_OS=linux
+      VAR_OS_API=posix
+      VAR_OS_ENV=linux
+      ;;
+    *solaris*)
+      VAR_OS=solaris
+      VAR_OS_API=posix
+      VAR_OS_ENV=solaris
+      ;;
+    *darwin*)
+      VAR_OS=macosx
+      VAR_OS_API=posix
+      VAR_OS_ENV=macosx
+      ;;
+    *bsd*)
+      VAR_OS=bsd
+      VAR_OS_API=posix
+      VAR_OS_ENV=bsd
+      ;;
+    *cygwin*)
+      VAR_OS=windows
+      VAR_OS_API=winapi
+      VAR_OS_ENV=windows.cygwin
+      ;;
+    *mingw*)
+      VAR_OS=windows
+      VAR_OS_API=winapi
+      VAR_OS_ENV=windows.msys
+      ;;
+    *)
+      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
+      ;;
+  esac
+
+
+  # First argument is the cpu name from the trip/quad
+  case "$host_cpu" in
+    x86_64)
+      VAR_CPU=x86_64
+      VAR_CPU_ARCH=x86
+      VAR_CPU_BITS=64
+      VAR_CPU_ENDIAN=little
+      ;;
+    i?86)
+      VAR_CPU=x86
+      VAR_CPU_ARCH=x86
+      VAR_CPU_BITS=32
+      VAR_CPU_ENDIAN=little
+      ;;
+    arm*)
+      VAR_CPU=arm
+      VAR_CPU_ARCH=arm
+      VAR_CPU_BITS=32
+      VAR_CPU_ENDIAN=little
+      ;;
+    powerpc)
+      VAR_CPU=ppc
+      VAR_CPU_ARCH=ppc
+      VAR_CPU_BITS=32
+      VAR_CPU_ENDIAN=big
+       ;;
+    powerpc64)
+      VAR_CPU=ppc64
+      VAR_CPU_ARCH=ppc
+      VAR_CPU_BITS=64
+      VAR_CPU_ENDIAN=big
+       ;;
+    sparc)
+      VAR_CPU=sparc
+      VAR_CPU_ARCH=sparc
+      VAR_CPU_BITS=32
+      VAR_CPU_ENDIAN=big
+       ;;
+    sparcv9)
+      VAR_CPU=sparcv9
+      VAR_CPU_ARCH=sparc
+      VAR_CPU_BITS=64
+      VAR_CPU_ENDIAN=big
+       ;;
+    *)
+      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
+      ;;
+  esac
+
+    # ... and setup our own variables. (Do this explicitely to facilitate searching)
+    OPENJDK_TARGET_OS="$VAR_OS"
+    OPENJDK_TARGET_OS_API="$VAR_OS_API"
+    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
+    OPENJDK_TARGET_CPU="$VAR_CPU"
+    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
+    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
+    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
+$as_echo_n "checking openjdk-target os-cpu... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
+$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
+
+
+
+# Check whether --with-target-bits was given.
+if test "${with_target_bits+set}" = set; then :
+  withval=$with_target_bits;
+fi
+
+
+  # We have three types of compiles:
+  # native  == normal compilation, target system == build system
+  # cross   == traditional cross compilation, target system != build system; special toolchain needed
+  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
+  #
+  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
+    # We're doing a proper cross-compilation
+    COMPILE_TYPE="cross"
+  else
+    COMPILE_TYPE="native"
+  fi
+
+  if test "x$with_target_bits" != x; then
+    if test "x$COMPILE_TYPE" = "xcross"; then
+      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
+    fi
+
+    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+      # A reduced build is requested
+      COMPILE_TYPE="reduced"
+      OPENJDK_TARGET_CPU_BITS=32
+      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
+        OPENJDK_TARGET_CPU=x86
+      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
+        OPENJDK_TARGET_CPU=sparc
+      else
+        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
+      fi
+    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+      as_fn_error $? "It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead." "$LINENO" 5
+    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
+$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
+    else
+      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
+    fi
+  fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
+$as_echo_n "checking compilation type... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
+$as_echo "$COMPILE_TYPE" >&6; }
+
+
+    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
+       REQUIRED_OS_NAME=SunOS
+       REQUIRED_OS_VERSION=5.10
+    fi
+    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
+       REQUIRED_OS_NAME=Linux
+       REQUIRED_OS_VERSION=2.6
+    fi
+    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+        REQUIRED_OS_NAME=Windows
+        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
+            REQUIRED_OS_VERSION=5.2
+        else
+            REQUIRED_OS_VERSION=5.1
+        fi
+    fi
+    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
+        REQUIRED_OS_NAME=Darwin
+        REQUIRED_OS_VERSION=11.2
+    fi
+
+
+
+
+
+    # Also store the legacy naming of the cpu.
+    # Ie i586 and amd64 instead of x86 and x86_64
+    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
+    if test "x$OPENJDK_TARGET_CPU" = xx86; then
+      OPENJDK_TARGET_CPU_LEGACY="i586"
+    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+      # On all platforms except MacOSX replace x86_64 with amd64.
+      OPENJDK_TARGET_CPU_LEGACY="amd64"
+    fi
+
+
+    # And the second legacy naming of the cpu.
+    # Ie i386 and amd64 instead of x86 and x86_64.
+    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
+    if test "x$OPENJDK_TARGET_CPU" = xx86; then
+      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
+    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
+    fi
+
+
+    # This is the name of the cpu (but using i386 and amd64 instead of
+    # x86 and x86_64, respectively), preceeded by a /, to be used when
+    # locating libraries. On macosx, it's empty, though.
+    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
+    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+        OPENJDK_TARGET_CPU_LIBDIR=""
+    fi
+
+
+    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
+    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
+    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
+    OPENJDK_TARGET_CPU_ISADIR=""
+    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+          OPENJDK_TARGET_CPU_ISADIR="/amd64"
+      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
+          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
+      fi
+    fi
+
+
+    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
+    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
+    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
+      # On linux only, we replace x86 with i386.
+      OPENJDK_TARGET_CPU_OSARCH="i386"
+    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+      # On all platforms except macosx, we replace x86_64 with amd64.
+      OPENJDK_TARGET_CPU_OSARCH="amd64"
+    fi
+
+
+    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
+    if test "x$OPENJDK_TARGET_CPU" = xx86; then
+      OPENJDK_TARGET_CPU_JLI="i386"
+    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+      # On all platforms except macosx, we replace x86_64 with amd64.
+      OPENJDK_TARGET_CPU_JLI="amd64"
+    fi
+    # Now setup the -D flags for building libjli.
+    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
+    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
+        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
+      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
+        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
+      fi
+    fi
+
+
+    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
+    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
+        OPENJDK_TARGET_OS_API_DIR="solaris"
+    fi
+    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
+        OPENJDK_TARGET_OS_API_DIR="windows"
+    fi
+
+
+    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+        A_LP64="LP64:="
+        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
+        # unpack200.exe
+        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
+            ADD_LP64="-D_LP64=1"
+        fi
+    fi
+    LP64=$A_LP64
+
+
+    if test "x$COMPILE_TYPE" = "xcross"; then
+      # FIXME: ... or should this include reduced builds..?
+      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
+    else
+      DEFINE_CROSS_COMPILE_ARCH=""
+    fi
+
+
+
+
+# Continue setting up basic stuff. Most remaining code require fundamental tools.
+
+# Locate the directory of this script.
+SCRIPT="$0"
+
+    if test "x$OPENJDK_BUILD_OS" != xwindows; then
+        # Follow a chain of symbolic links. Use readlink
+        # where it exists, else fall back to horribly
+        # complicated shell code.
+        if test "x$READLINK_TESTED" != yes; then
+            # On MacOSX there is a readlink tool with a different
+            # purpose than the GNU readlink tool. Check the found readlink.
+            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
+            if test "x$ISGNU" = x; then
+                 # A readlink that we do not know how to use.
+                 # Are there other non-GNU readlinks out there?
+                 READLINK_TESTED=yes
+                 READLINK=
+            fi
+        fi
+
+        if test "x$READLINK" != x; then
+            SCRIPT=`$READLINK -f $SCRIPT`
+        else
+            STARTDIR=$PWD
+            COUNTER=0
+            sym_link_dir=`$DIRNAME $SCRIPT`
+            sym_link_file=`$BASENAME $SCRIPT`
+            while test $COUNTER -lt 20; do
+                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
+                if test "x$ISLINK" == x; then
+                    # This is not a symbolic link! We are done!
+                    break
+                fi
+                # The link might be relative! We have to use cd to travel safely.
+                cd $sym_link_dir
+                # ... and we must get the to the absolute path, not one using symbolic links.
+                cd `pwd -P`
+                cd `$DIRNAME $ISLINK`
+                sym_link_dir=`$THEPWDCMD`
+                sym_link_file=`$BASENAME $ISLINK`
+                let COUNTER=COUNTER+1
+            done
+            cd $STARTDIR
+            SCRIPT=$sym_link_dir/$sym_link_file
+        fi
+    fi
+
+AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
+
+# Where is the source? It is located two levels above the configure script.
+CURDIR="$PWD"
+cd "$AUTOCONF_DIR/../.."
+SRC_ROOT="`pwd`"
+
+if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+  PATH_SEP=";"
+
+  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
+  if test $SRC_ROOT_LENGTH -gt 100; then
+      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
+  fi
+
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
+$as_echo_n "checking cygwin release... " >&6; }
+    CYGWIN_VERSION=`$UNAME -r`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
+$as_echo "$CYGWIN_VERSION" >&6; }
+    WINDOWS_ENV_VENDOR='cygwin'
+    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
+
+    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
+    if test "x$CYGWIN_VERSION_OK" = x; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&5
+$as_echo "$as_me: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&6;}
+      as_fn_error $? "Cannot continue" "$LINENO" 5
+    fi
+    if test "x$CYGPATH" = x; then
+        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
+$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
+    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
+    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
+    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
+    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
+$as_echo "$CYGWIN_ROOT_PATH" >&6; }
+    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
+    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
+    if test "x$test_cygdrive_prefix" = x; then
+        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
+    fi
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
+$as_echo_n "checking msys release... " >&6; }
+    MSYS_VERSION=`$UNAME -r`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
+$as_echo "$MSYS_VERSION" >&6; }
+
+    WINDOWS_ENV_VENDOR='msys'
+    WINDOWS_ENV_VERSION="$MSYS_VERSION"
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
+$as_echo_n "checking msys root directory as unix-style path... " >&6; }
+    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
+    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
+
+  windows_path="$MSYS_ROOT_PATH"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    MSYS_ROOT_PATH="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    MSYS_ROOT_PATH="$unix_path"
+  fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
+$as_echo "$MSYS_ROOT_PATH" >&6; }
+    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
+  else
+    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
+  fi
+
+  # Test if windows or unix (cygwin/msys) find is first in path.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
+$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
+  FIND_BINARY_OUTPUT=`find --version 2>&1`
+  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
+$as_echo "unix style" >&6; }
+  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
+$as_echo "Windows" >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
+$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&5
+$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
+$as_echo "unknown" >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
+$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
+  fi
+
+else
+  PATH_SEP=":"
+fi
+
+
+
+cd "$CURDIR"
+
+
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then