Merge jdk8-b47
authorduke
Wed, 05 Jul 2017 18:16:12 +0200
changeset 13187 b820143a6f1c
parent 13186 539f6443db5c (diff)
parent 13130 718b6a255947 (current diff)
child 13188 897f06def407
child 13189 cd95d0518c65
child 13190 9a809edf1ff6
child 13192 51b651d43758
child 13210 b070f2471114
child 13212 7a93e19ba08f
child 13214 ff4cbdd893ef
child 13216 2bd7c6c12449
child 13218 9d19a5f8d2ad
Merge
--- a/.hgtags-top-repo	Wed Jul 05 18:15:28 2017 +0200
+++ b/.hgtags-top-repo	Wed Jul 05 18:16:12 2017 +0200
@@ -167,3 +167,4 @@
 661c9aae602bbd9766d12590800c90f1edd1d8dd jdk8-b43
 e4f81a817447c3a4f6868f083c81c2fb1b15d44c jdk8-b44
 633f2378c904c92bb922a6e19e9f62fe8eac14af jdk8-b45
+27fa766a2298ba8347dc198f0cf85ba6618e17db jdk8-b46
--- a/common/autoconf/autogen.sh	Wed Jul 05 18:15:28 2017 +0200
+++ b/common/autoconf/autogen.sh	Wed Jul 05 18:16:12 2017 +0200
@@ -22,5 +22,19 @@
 # questions.
 #
 
-autoconf -W all configure.ac > configure
-rm -rf config.status config.log autom4te.cache
+script_dir=`dirname $0`
+closed_script_dir="$script_dir/../../jdk/make/closed/autoconf"
+
+# Create a timestamp as seconds since epoch
+TIMESTAMP=`date +%s`
+
+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 $closed_script_dir/closed-hook.m4; then
+  # We have closed sources available; also generate configure script
+  # with closed hooks compiled in.
+  cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \
+    sed -e "s|AC_DEFUN_ONCE(\[CLOSED_HOOK\])|m4_include([$closed_script_dir/closed-hook.m4])|" | autoconf -W all -I$script_dir - > $closed_script_dir/generated-configure.sh
+  rm -rf autom4te.cache
+fi
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/basics.m4	Wed Jul 05 18:16:12 2017 +0200
@@ -0,0 +1,485 @@
+#
+# 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([ADD_JVM_ARG_IF_OK],
+[
+    # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
+    # If so, then append $1 to $2
+    FOUND_WARN=`$3 $1 -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$3 $1 -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        $2="[$]$2 $1"
+    fi
+])
+
+AC_DEFUN([WHICHCMD],
+[
+    # 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
+        WHICHCMD_SPACESAFE(car)
+    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
+        $1="$car ${cdr% *}"
+    else
+        $1="$car"
+    fi
+])
+
+AC_DEFUN([SPACESAFE],
+[
+    # 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
+            $1=`$CYGPATH -s -m -a "[$]$1"`
+            $1=`$CYGPATH -u "[$]$1"`            
+        else
+            AC_MSG_ERROR([You cannot have spaces in $2! "[$]$1"])
+        fi
+    fi
+])
+
+AC_DEFUN([WHICHCMD_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],
+[
+    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`
+            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
+            $1=`$READLINK -f [$]$1`
+        else
+            STARTDIR=$PWD
+            COUNTER=0
+            DIR=`dirname [$]$1`
+            FIL=`basename [$]$1`
+            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
+            $1=$DIR/$FIL
+        fi
+    fi
+])
+
+AC_DEFUN_ONCE([BASIC_INIT],
+[
+# Save the original command line. This is passed to us by the wrapper configure script.
+AC_SUBST(CONFIGURE_COMMAND_LINE)
+DATE_WHEN_CONFIGURED=`LANG=C date`
+AC_SUBST(DATE_WHEN_CONFIGURED)
+
+# Locate the directory of this script.
+SCRIPT="[$]0"
+REMOVE_SYMBOLIC_LINKS(SCRIPT)        
+AUTOCONF_DIR=`dirname [$]0`
+])
+
+AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
+[
+# 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
+fi
+AC_SUBST(SRC_ROOT)
+cd "$CURDIR"
+
+SPACESAFE(SRC_ROOT,[the path to the source root])
+SPACESAFE(CURDIR,[the path to the current directory])
+])
+
+AC_DEFUN_ONCE([BASIC_SETUP_SEARCHPATH],
+[
+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
+])
+
+AC_DEFUN_ONCE([BASIC_SETUP_PATH_SEP],
+[
+# 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)
+])
+
+AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
+[
+
+AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name],
+	[use this as the name of the configuration, overriding the generated default])],
+        [ CONF_NAME=${with_conf_name} ])
+
+# Test from where we are running configure, in or outside of src root.
+if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
+    # We are running configure from the src root.
+    # Create a default ./build/target-variant-debuglevel output root.
+    if test "x${CONF_NAME}" = x; then
+        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"
+    if test ! -d "$OUTPUT_ROOT"; then
+        AC_MSG_ERROR([Could not create build directory $OUTPUT_ROOT])
+    fi
+else
+    # We are running configure from outside of the src dir.
+    # Then use the current directory as output dir!
+    # If configuration is situated in normal build directory, just use the build
+    # directory name as configuration name, otherwise use the complete path.
+    if test "x${CONF_NAME}" = x; then
+        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
+    fi
+    OUTPUT_ROOT="$CURDIR"
+fi
+
+SPACESAFE(OUTPUT_ROOT,[the path to the output root])
+
+AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk)
+AC_SUBST(CONF_NAME, $CONF_NAME)
+AC_SUBST(OUTPUT_ROOT, $OUTPUT_ROOT)
+
+# Most of the probed defines are put into config.h
+AC_CONFIG_HEADERS([$OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in])
+# The spec.gmk file contains all variables for the make system.
+AC_CONFIG_FILES([$OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in])
+# The spec.sh file contains variables for compare{images|-objects}.sh scrips.
+AC_CONFIG_FILES([$OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in])
+# The generated Makefile knows where the spec.gmk is and where the source is.
+# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
+# which will look for generated configurations
+AC_CONFIG_FILES([$OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in])
+
+# Save the arguments given to us
+echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
+])
+
+AC_DEFUN_ONCE([BASIC_SETUP_LOGGING],
+[
+# 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)'
+AC_SUBST(BUILD_LOG)
+AC_SUBST(BUILD_LOG_PREVIOUS)
+AC_SUBST(BUILD_LOG_WRAPPER)
+])
+
+
+#%%% Simple tools %%%
+
+AC_DEFUN([BASIC_CHECK_FIND_DELETE],
+[
+    # Test if find supports -delete
+    AC_MSG_CHECKING([if find supports -delete])
+    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 \{\} \+"
+        AC_MSG_RESULT([no])    
+    else
+        AC_MSG_RESULT([yes])    
+    fi
+    rmdir $DELETEDIR
+])
+
+AC_DEFUN([CHECK_NONEMPTY],
+[
+    # Test that variable $1 is not empty.
+    if test "" = "[$]$1"; then AC_MSG_ERROR(Could not find translit($1,A-Z,a-z) !); fi
+])
+
+AC_DEFUN_ONCE([BASIC_SETUP_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. 
+AC_PROG_AWK
+CHECK_NONEMPTY(AWK)
+AC_PATH_PROG(CAT, cat)
+CHECK_NONEMPTY(CAT)
+AC_PATH_PROG(CHMOD, chmod)
+CHECK_NONEMPTY(CHMOD)
+AC_PATH_PROG(CP, cp)
+CHECK_NONEMPTY(CP)
+AC_PATH_PROG(CPIO, cpio)
+CHECK_NONEMPTY(CPIO)
+AC_PATH_PROG(CUT, cut)
+CHECK_NONEMPTY(CUT)
+AC_PATH_PROG(DATE, date)
+CHECK_NONEMPTY(DATE)
+AC_PATH_PROG(DF, df)
+CHECK_NONEMPTY(DF)
+AC_PATH_PROG(DIFF, diff)
+CHECK_NONEMPTY(DIFF)
+# Warning echo is really, really unportable!!!!! Different
+# behaviour in bash and dash and in a lot of other shells!
+# Use printf for serious work! 
+AC_PATH_PROG(ECHO, echo)
+CHECK_NONEMPTY(ECHO)
+AC_PROG_EGREP
+CHECK_NONEMPTY(EGREP)
+AC_PROG_FGREP
+CHECK_NONEMPTY(FGREP)
+
+AC_PATH_PROG(FIND, find)
+CHECK_NONEMPTY(FIND)
+BASIC_CHECK_FIND_DELETE
+AC_SUBST(FIND_DELETE)
+
+AC_PROG_GREP
+CHECK_NONEMPTY(GREP)
+AC_PATH_PROG(HEAD, head)
+CHECK_NONEMPTY(HEAD)
+AC_PATH_PROG(LN, ln)
+CHECK_NONEMPTY(LN)
+AC_PATH_PROG(LS, ls)
+CHECK_NONEMPTY(LS)
+AC_PATH_PROGS(MAKE, [gmake make])
+CHECK_NONEMPTY(MAKE)
+MAKE_VERSION=`$MAKE --version | head -n 1 | grep '3.8[[12346789]]'`
+if test "x$MAKE_VERSION" = x; then
+    AC_MSG_ERROR([You must use 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.])
+fi
+AC_PATH_PROG(MKDIR, mkdir)
+CHECK_NONEMPTY(MKDIR)
+AC_PATH_PROG(MV, mv)
+CHECK_NONEMPTY(MV)
+AC_PATH_PROGS(NAWK, [nawk gawk awk])
+CHECK_NONEMPTY(NAWK)
+AC_PATH_PROG(PRINTF, printf)
+CHECK_NONEMPTY(PRINTF)
+AC_PATH_PROG(THEPWDCMD, pwd)
+AC_PATH_PROG(RM, rm)
+CHECK_NONEMPTY(RM)
+RM="$RM -f"
+AC_PROG_SED
+CHECK_NONEMPTY(SED)
+AC_PATH_PROG(SH, sh)
+CHECK_NONEMPTY(SH)
+AC_PATH_PROG(SORT, sort)
+CHECK_NONEMPTY(SORT)
+AC_PATH_PROG(TAR, tar)
+CHECK_NONEMPTY(TAR)
+AC_PATH_PROG(TAIL, tail)
+CHECK_NONEMPTY(TAIL)
+AC_PATH_PROG(TEE, tee)
+CHECK_NONEMPTY(TEE)
+AC_PATH_PROG(TR, tr)
+CHECK_NONEMPTY(TR)
+AC_PATH_PROG(TOUCH, touch)
+CHECK_NONEMPTY(TOUCH)
+AC_PATH_PROG(WC, wc)
+CHECK_NONEMPTY(WC)
+AC_PATH_PROG(XARGS, xargs)
+CHECK_NONEMPTY(XARGS)
+AC_PATH_PROG(ZIP, zip)
+CHECK_NONEMPTY(ZIP)
+AC_PATH_PROG(UNZIP, unzip)
+CHECK_NONEMPTY(UNZIP)
+AC_PATH_PROG(LDD, ldd)
+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
+AC_PATH_PROG(OTOOL, otool)
+if test "x$OTOOL" = "x"; then
+   OTOOL="true"
+fi
+AC_PATH_PROG(READELF, readelf)
+AC_PATH_PROG(EXPR, expr)
+CHECK_NONEMPTY(EXPR)
+AC_PATH_PROG(FILE, file)
+CHECK_NONEMPTY(FILE)
+AC_PATH_PROG(HG, hg)
+])
+
+
+
+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
+fi
+
+AC_SUBST(UNCYGDRIVE)
+])
+
+
+# Check if build directory is on local disk.
+# 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)
+AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
+[
+	# 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
+])
+
+AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
+[
+
+AC_MSG_CHECKING([if build directory is on local disk])
+BASIC_CHECK_DIR_ON_LOCAL_DISK($OUTPUT_ROOT,
+  [OUTPUT_DIR_IS_LOCAL="yes"],
+  [OUTPUT_DIR_IS_LOCAL="no"])
+AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL)
+
+# Check if the user has any old-style ALT_ variables set.
+FOUND_ALT_VARIABLES=`env | grep ^ALT_`
+
+# Before generating output files, test if they exist. If they do, this is a reconfigure.
+# Since we can't properly handle the dependencies for this, warn the user about the situation
+if test -e $OUTPUT_ROOT/spec.gmk; then
+  IS_RECONFIGURE=yes
+else
+  IS_RECONFIGURE=no
+fi
+
+if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
+  HIDE_PERFORMANCE_HINTS=yes
+else
+  HIDE_PERFORMANCE_HINTS=no
+  # Hide it the next time around...
+  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
+fi
+
+])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/boot-jdk.m4	Wed Jul 05 18:16:12 2017 +0200
@@ -0,0 +1,295 @@
+#
+# 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.
+#
+
+# Fixes paths on windows to be mixed mode short.
+AC_DEFUN([BOOTJDK_WIN_FIX_PATH],
+[
+    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+        AC_PATH_PROG(CYGPATH, cygpath)
+        tmp="[$]$1"
+        # Convert to C:/ mixed style path without spaces.
+        tmp=`$CYGPATH -s -m "$tmp"`
+        $1="$tmp"
+    fi
+])
+
+AC_DEFUN([BOOTJDK_MISSING_ERROR],
+[
+    AC_MSG_NOTICE([This might be fixed by explicitely setting --with-boot-jdk])
+    AC_MSG_ERROR([Cannot continue])
+])
+
+###############################################################################
+#
+# We need a Boot JDK to bootstrap the build. 
+#
+
+AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
+[
+BOOT_JDK_FOUND=no
+AC_ARG_WITH(boot-jdk, [AS_HELP_STRING([--with-boot-jdk],
+    [path to Boot JDK (used to bootstrap build) @<:@probed@:>@])])
+                    
+if test "x$with_boot_jdk" != x; then
+    BOOT_JDK=$with_boot_jdk
+    BOOT_JDK_FOUND=yes
+fi
+if test "x$BOOT_JDK_FOUND" = xno; then
+    BDEPS_CHECK_MODULE(BOOT_JDK, boot-jdk, xxx, [BOOT_JDK_FOUND=yes], [BOOT_JDK_FOUND=no])
+fi
+
+if test "x$BOOT_JDK_FOUND" = xno; then
+    if test "x$JAVA_HOME" != x; then
+        if test ! -d "$JAVA_HOME"; then
+            AC_MSG_NOTICE([Your JAVA_HOME points to a non-existing directory!])
+            BOOTJDK_MISSING_ERROR
+        fi
+        # Aha, the user has set a JAVA_HOME
+        # let us use that as the Boot JDK.
+        BOOT_JDK="$JAVA_HOME"
+        BOOT_JDK_FOUND=yes
+        # To be on the safe side, lets check that it is a JDK.
+        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
+            JAVAC="$BOOT_JDK/bin/javac"
+            JAVA="$BOOT_JDK/bin/java"
+            BOOT_JDK_FOUND=yes
+        else
+            AC_MSG_NOTICE([Your JAVA_HOME points to a JRE! The build needs a JDK! Please point JAVA_HOME to a JDK. JAVA_HOME=[$]JAVA_HOME])
+            BOOTJDK_MISSING_ERROR
+        fi            
+    fi
+fi
+
+if test "x$BOOT_JDK_FOUND" = xno; then
+    AC_PATH_PROG(JAVAC_CHECK, javac)
+    AC_PATH_PROG(JAVA_CHECK, java)
+    BINARY="$JAVAC_CHECK"
+    if test "x$JAVAC_CHECK" = x; then
+        BINARY="$JAVA_CHECK"
+    fi
+    if test "x$BINARY" != x; then
+        # So there is a java(c) binary, it might be part of a JDK.
+        # 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.
+	WHICHCMD_SPACESAFE(BINARY,[path to javac])
+        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
+            JAVAC=$BOOT_JDK/bin/javac
+            JAVA=$BOOT_JDK/bin/java
+            BOOT_JDK_FOUND=yes
+        fi
+    fi
+fi
+
+if test "x$BOOT_JDK_FOUND" = xno; then
+    # Try the MacOSX way.
+    if test -x /usr/libexec/java_home; then
+        BOOT_JDK=`/usr/libexec/java_home`
+        if test -x $BOOT_JDK/bin/javac && test -x $BOOT_JDK/bin/java; then
+            JAVAC=$BOOT_JDK/bin/javac
+            JAVA=$BOOT_JDK/bin/java
+            BOOT_JDK_FOUND=yes
+        fi
+    fi
+fi
+
+if test "x$BOOT_JDK_FOUND" = xno; then
+    AC_PATH_PROG(JAVA_CHECK, java)
+    if test "x$JAVA_CHECK" != x; then
+        # There is a java in the path. But apparently we have not found a javac 
+        # in the path, since that would have been tested earlier.
+        if test "x$OPENJDK_TARGET_OS" = xwindows; then
+            # Now if this is a windows platform. The default installation of a JDK
+            # actually puts the JRE in the path and keeps the JDK out of the path!
+            # Go look in the default installation location.
+            BOOT_JDK=/cygdrive/c/Program\ Files/Java/`ls /cygdrive/c/Program\ Files/Java | grep jdk | sort -r | head --lines 1`
+            if test -d "$BOOT_JDK"; then
+                BOOT_JDK_FOUND=yes
+            fi
+        fi
+        if test "x$BOOT_JDK_FOUND" = xno; then
+            HELP_MSG_MISSING_DEPENDENCY([openjdk])
+            AC_MSG_NOTICE([Found a JRE, not not a JDK! Please remove the JRE from your path and put a JDK there instead. $HELP_MSG])
+            BOOTJDK_MISSING_ERROR
+        fi
+    else
+        HELP_MSG_MISSING_DEPENDENCY([openjdk])
+        AC_MSG_NOTICE([Could not find a JDK. $HELP_MSG])
+        BOOTJDK_MISSING_ERROR
+    fi
+fi
+
+BOOTJDK_WIN_FIX_PATH(BOOT_JDK)
+
+# Now see if we can find the rt.jar, or its nearest equivalent.
+BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
+SPACESAFE(BOOT_RTJAR,[the path to the Boot JDK rt.jar (or nearest equivalent)])
+
+BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
+SPACESAFE(BOOT_TOOLSJAR,[the path to the Boot JDK tools.jar (or nearest equivalent)])
+
+if test ! -f $BOOT_RTJAR; then
+    # On MacOSX it is called classes.jar
+    BOOT_RTJAR=$BOOT_JDK/../Classes/classes.jar
+    if test ! -f $BOOT_RTJAR; then
+        AC_MSG_NOTICE([Cannot find the rt.jar or its equivalent!])
+        AC_MSG_NOTICE([This typically means that configure failed to automatically find a suitable Boot JDK])
+        BOOTJDK_MISSING_ERROR
+    fi
+    # Remove the .. 
+    BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
+    # The tools.jar is part of classes.jar
+    BOOT_TOOLSJAR="$BOOT_RTJAR"
+fi
+
+AC_SUBST(BOOT_JDK)
+AC_SUBST(BOOT_RTJAR)
+AC_SUBST(BOOT_TOOLSJAR)
+AC_MSG_CHECKING([for Boot JDK])
+AC_MSG_RESULT([$BOOT_JDK])
+AC_MSG_CHECKING([for Boot rt.jar])
+AC_MSG_RESULT([$BOOT_RTJAR])
+AC_MSG_CHECKING([for Boot tools.jar])
+AC_MSG_RESULT([$BOOT_TOOLSJAR])
+
+# Use the java tool from the Boot JDK.
+AC_MSG_CHECKING([for java in Boot JDK])
+JAVA=$BOOT_JDK/bin/java
+if test ! -x $JAVA; then
+    AC_MSG_NOTICE([Could not find a working java])
+    BOOTJDK_MISSING_ERROR
+fi
+BOOT_JDK_VERSION=`$JAVA -version 2>&1 | head -n 1`
+AC_MSG_RESULT([yes $BOOT_JDK_VERSION])
+AC_SUBST(JAVA)
+
+# Extra M4 quote needed to protect [] in grep expression.
+[FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`]
+if test "x$FOUND_VERSION_78" = x; then
+    HELP_MSG_MISSING_DEPENDENCY([openjdk])
+    AC_MSG_NOTICE([Your boot-jdk must be version 7 or 8. $HELP_MSG])
+    BOOTJDK_MISSING_ERROR
+fi
+
+# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
+BOOT_JDK_SOURCETARGET="-source 7 -target 7"
+AC_SUBST(BOOT_JDK_SOURCETARGET)
+
+# Use the javac tool from the Boot JDK.
+AC_MSG_CHECKING([for javac in Boot JDK])
+JAVAC=$BOOT_JDK/bin/javac
+if test ! -x $JAVAC; then
+    AC_MSG_ERROR([Could not find a working javac])
+fi
+AC_MSG_RESULT(yes)
+AC_SUBST(JAVAC)
+AC_SUBST(JAVAC_FLAGS)
+
+# Use the javah tool from the Boot JDK.
+AC_MSG_CHECKING([for javah in Boot JDK])
+JAVAH=$BOOT_JDK/bin/javah
+if test ! -x $JAVAH; then
+    AC_MSG_NOTICE([Could not find a working javah])
+    BOOTJDK_MISSING_ERROR
+fi
+AC_MSG_RESULT(yes)
+AC_SUBST(JAVAH)
+
+# Use the jar tool from the Boot JDK.
+AC_MSG_CHECKING([for jar in Boot JDK])
+JAR=$BOOT_JDK/bin/jar
+if test ! -x $JAR; then
+    AC_MSG_NOTICE([Could not find a working jar])
+    BOOTJDK_MISSING_ERROR
+fi
+AC_SUBST(JAR)
+AC_MSG_RESULT(yes)
+
+# Use the rmic tool from the Boot JDK.
+AC_MSG_CHECKING([for rmic in Boot JDK])
+RMIC=$BOOT_JDK/bin/rmic
+if test ! -x $RMIC; then
+    AC_MSG_NOTICE([Could not find a working rmic])
+    BOOTJDK_MISSING_ERROR
+fi
+AC_SUBST(RMIC)
+AC_MSG_RESULT(yes)
+
+# Use the native2ascii tool from the Boot JDK.
+AC_MSG_CHECKING([for native2ascii in Boot JDK])
+NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
+if test ! -x $NATIVE2ASCII; then
+    AC_MSG_NOTICE([Could not find a working native2ascii])
+    BOOTJDK_MISSING_ERROR
+fi
+AC_MSG_RESULT(yes)
+AC_SUBST(NATIVE2ASCII)
+])
+
+AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
+[
+##############################################################################
+#
+# Specify options for anything that is run with the Boot JDK.
+#
+AC_ARG_WITH(boot-jdk-jvmargs, [AS_HELP_STRING([--with-boot-jdk-jvmargs],
+	[specify JVM arguments to be passed to all invocations of the Boot JDK, overriding the default values,
+     e.g --with-boot-jdk-jvmargs="-Xmx8G -enableassertions"])])
+
+if test "x$with_boot_jdk_jvmargs" = x; then
+    # Not all JVM:s accept the same arguments on the command line.
+    # OpenJDK specific increase in thread stack for JDK build,
+    # well more specifically, when running javac.
+    if test "x$BUILD_NUM_BITS" = x32; then
+       STACK_SIZE=768
+    else
+       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
+       # since 64-bit pointers are pushed on the stach. Apparently, we need
+       # to increase the stack space when javacing the JDK....
+       STACK_SIZE=1536
+    fi
+
+    # Minimum amount of heap memory.
+    ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA])
+    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
+        # Why does macosx need more heap? Its the huge JDK batch.
+        ADD_JVM_ARG_IF_OK([-Xmx1600M],boot_jdk_jvmargs,[$JAVA])
+    else
+        ADD_JVM_ARG_IF_OK([-Xmx1100M],boot_jdk_jvmargs,[$JAVA])
+    fi
+    # When is adding -client something that speeds up the JVM?
+    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
+    ADD_JVM_ARG_IF_OK([-XX:PermSize=32m],boot_jdk_jvmargs,[$JAVA])
+    ADD_JVM_ARG_IF_OK([-XX:MaxPermSize=160m],boot_jdk_jvmargs,[$JAVA])
+    ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs,[$JAVA])
+    # Disable special log output when a debug build is used as Boot JDK...
+    ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA])
+fi
+
+AC_SUBST(BOOT_JDK_JVMARGS, $boot_jdk_jvmargs)
+])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/build-aux/autoconf-config.guess	Wed Jul 05 18:16:12 2017 +0200
@@ -0,0 +1,1531 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   Free Software Foundation, Inc.
+
+timestamp='2008-01-23'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program 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 for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+	for c in cc gcc c89 c99 ; do
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	if test x"$CC_FOR_BUILD" = x ; then
+	  CC_FOR_BUILD=no_compiler_found ;
+	fi
+	;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    sh5el) machine=sh5le-unknown ;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep __ELF__ >/dev/null
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+	        os=netbsd
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case "${UNAME_VERSION}" in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}"
+	exit ;;
+    *:OpenBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	exit ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	exit ;;
+    *:SolidBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+	exit ;;
+    macppc:MirBSD:*:*)
+	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    alpha:OSF1:*:*)
+	case $UNAME_RELEASE in
+	*4.0)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+		;;
+	*5.*)
+	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case "$ALPHA_CPU_TYPE" in
+	    "EV4 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE="alphaev5" ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE="alphaev56" ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE="alphapca56" ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE="alphapca57" ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE="alphaev6" ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE="alphaev67" ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE="alphaev69" ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE="alphaev7" ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE="alphaev79" ;;
+	esac
+	# A Pn.n version is a patched version.
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	exit ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-unknown-sysv4
+	exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
+	exit ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+	exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+	echo arm-unknown-riscos
+	exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7; exit ;;
+	esac ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+        exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c &&
+	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	    { echo "$SYSTEM_NAME"; exit; }
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit ;;
+    Motorola:*:4.3:PL8-*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+ 	exit ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	echo i386-ibm-aix
+	exit ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
+		sed 's/^		//' << EOF >$dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		then
+			echo "$SYSTEM_NAME"
+		else
+			echo rs6000-ibm-aix3.2.5
+		fi
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit ;;
+    *:AIX:*:[456])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit ;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if [ -x /usr/bin/getconf ]; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+		fi
+		if [ "${HP_ARCH}" = "" ]; then
+		    eval $set_cc_for_build
+		    sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+              	{
+              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+              	case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+              	    switch (bits)
+              		{
+              		case 64: puts ("hppa2.0w"); break;
+              		case 32: puts ("hppa2.0n"); break;
+              		default: puts ("hppa2.0"); break;
+              		} break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+              	    puts ("hppa2.0"); break;
+              #endif
+              	default: puts ("hppa1.0"); break;
+              	}
+                  exit (0);
+              }
+EOF
+		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if [ ${HP_ARCH} = "hppa2.0w" ]
+	then
+	    eval $set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep __LP64__ >/dev/null
+	    then
+		HP_ARCH="hppa2.0w"
+	    else
+		HP_ARCH="hppa64"
+	    fi
+	fi
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit ;;
+    3050*:HI-UX:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+		{ echo "$SYSTEM_NAME"; exit; }
+	echo unknown-hitachi-hiuxwe2
+	exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit ;;
+    i*86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-unknown-osf1
+	fi
+	exit ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+        exit ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+        exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	echo c34-convex-bsd
+        exit ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+        exit ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+        exit ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*[A-Z]90:*:*:*)
+	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*TS:*:*:*)
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*T3E:*:*:*)
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*SV1:*:*:*)
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    *:UNICOS/mp:*:*)
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit ;;
+    5000:UNIX_System_V:4.*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	exit ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:FreeBSD:*:*)
+	case ${UNAME_MACHINE} in
+	    pc98)
+		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    amd64)
+		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    *)
+		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	esac
+	exit ;;
+    i*:CYGWIN*:*)
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit ;;
+    *:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit ;;
+    i*:windows32*:*)
+    	# uname -m includes "-pc" on this system.
+    	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit ;;
+    *:Interix*:[3456]*)
+    	case ${UNAME_MACHINE} in
+	    x86)
+		echo i586-pc-interix${UNAME_RELEASE}
+		exit ;;
+	    EM64T | authenticamd)
+		echo x86_64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	    IA64)
+		echo ia64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	esac ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
+	exit ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i586-pc-interix
+	exit ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	echo x86_64-unknown-cygwin
+	exit ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-unknown-cygwin
+	exit ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    *:GNU:*:*)
+	# the GNU system
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit ;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+	exit ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit ;;
+    arm*:Linux:*:*)
+	eval $set_cc_for_build
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_EABI__
+	then
+	    echo ${UNAME_MACHINE}-unknown-linux-gnu
+	else
+	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+	fi
+	exit ;;
+    avr32*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    cris:Linux:*:*)
+	echo cris-axis-linux-gnu
+	exit ;;
+    crisv32:Linux:*:*)
+	echo crisv32-axis-linux-gnu
+	exit ;;
+    frv:Linux:*:*)
+    	echo frv-unknown-linux-gnu
+	exit ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    mips:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips
+	#undef mipsel
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mipsel
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^CPU/{
+		s: ::g
+		p
+	    }'`"
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	;;
+    mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips64
+	#undef mips64el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mips64el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips64
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^CPU/{
+		s: ::g
+		p
+	    }'`"
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	;;
+    or32:Linux:*:*)
+	echo or32-unknown-linux-gnu
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-gnu
+	exit ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
+	exit ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
+	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
+	  *)    echo hppa-unknown-linux-gnu ;;
+	esac
+	exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-gnu
+	exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux
+	exit ;;
+    sh64*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    vax:Linux:*:*)
+	echo ${UNAME_MACHINE}-dec-linux-gnu
+	exit ;;
+    x86_64:Linux:*:*)
+	echo x86_64-unknown-linux-gnu
+	exit ;;
+    xtensa*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    i*86:Linux:*:*)
+	# The BFD linker knows what the default object file format is, so
+	# first see if it will tell us. cd to the root directory to prevent
+	# problems with other programs or directories called `ld' in the path.
+	# Set LC_ALL=C to ensure ld outputs messages in English.
+	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+			 | sed -ne '/supported targets:/!d
+				    s/[ 	][ 	]*/ /g
+				    s/.*supported targets: *//
+				    s/ .*//
+				    p'`
+        case "$ld_supported_targets" in
+	  elf32-i386)
+		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+		;;
+	  a.out-i386-linux)
+		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+		exit ;;
+	  coff-i386)
+		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+		exit ;;
+	  "")
+		# Either a pre-BFD a.out linker (linux-gnuoldld) or
+		# one that does not give us useful --help.
+		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+		exit ;;
+	esac
+	# Determine whether the default compiler is a.out or elf
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <features.h>
+	#ifdef __ELF__
+	# ifdef __GLIBC__
+	#  if __GLIBC__ >= 2
+	LIBC=gnu
+	#  else
+	LIBC=gnulibc1
+	#  endif
+	# else
+	LIBC=gnulibc1
+	# endif
+	#else
+	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+	LIBC=gnu
+	#else
+	LIBC=gnuaout
+	#endif
+	#endif
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
+EOF
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^LIBC/{
+		s: ::g
+		p
+	    }'`"
+	test x"${LIBC}" != x && {
+		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+		exit
+	}
+	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+	;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	echo i386-sequent-sysv4
+	exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit ;;
+    i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit ;;
+    i*86:*:5:[678]*)
+    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+	echo i386-pc-msdosdjgpp
+        exit ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit ;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && { echo i486-ncr-sysv4; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel@ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes@openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	echo hppa1.1-stratus-sysv4
+	exit ;;
+    *:*:*:FTX*)
+	# From seanf@swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit ;;
+    i*86:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	echo ${UNAME_MACHINE}-stratus-vos
+	exit ;;
+    *:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	echo hppa1.1-stratus-vos
+	exit ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit ;;
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+	        echo mips-nec-sysv${UNAME_RELEASE}
+	else
+	        echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+        exit ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-7:SUPER-UX:*:*)
+	echo sx7-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8:SUPER-UX:*:*)
+	echo sx8-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8R:SUPER-UX:*:*)
+	echo sx8r-nec-superux${UNAME_RELEASE}
+	exit ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Darwin:*:*)
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	eval $set_cc_for_build
+	echo "int main(){}" > $dummy.c
+        if test "`$CC_FOR_BUILD -o $dummy $dummy.c; file $dummy |  grep -c x86_64`" = 1 ; then
+             UNAME_PROCESSOR=x86_64
+        fi
+	case $UNAME_PROCESSOR in
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	exit ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit ;;
+    *:TOPS-10:*:*)
+	echo pdp10-unknown-tops10
+	exit ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit ;;
+    *:ITS:*:*)
+	echo pdp10-unknown-its
+	exit ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+	exit ;;
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
+    *:*VMS:*:*)
+    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case "${UNAME_MACHINE}" in
+	    A*) echo alpha-dec-vms ; exit ;;
+	    I*) echo ia64-dec-vms ; exit ;;
+	    V*) echo vax-dec-vms ; exit ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	echo i386-pc-xenix
+	exit ;;
+    i*86:skyos:*:*)
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+	exit ;;
+    i*86:rdos:*:*)
+	echo ${UNAME_MACHINE}-pc-rdos
+	exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+	  ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+	printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+	printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+	{ echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+	echo c1-convex-bsd
+	exit ;;
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    c34*)
+	echo c34-convex-bsd
+	exit ;;
+    c38*)
+	echo c38-convex-bsd
+	exit ;;
+    c4*)
+	echo c4-convex-bsd
+	exit ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
--- a/common/autoconf/build-aux/config.guess	Wed Jul 05 18:15:28 2017 +0200
+++ b/common/autoconf/build-aux/config.guess	Wed Jul 05 18:16:12 2017 +0200
@@ -1,1531 +1,38 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-#   Free Software Foundation, Inc.
-
-timestamp='2008-01-23'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program 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 for more details.
+#!/bin/sh
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
+# 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.
 #
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help" >&2
-       exit 1 ;;
-    * )
-       break ;;
-  esac
-done
-
-if test $# != 0; then
-  echo "$me: too many arguments$help" >&2
-  exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int x;" > $dummy.c ;
-	for c in cc gcc c89 c99 ; do
-	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
-	     CC_FOR_BUILD="$c"; break ;
-	  fi ;
-	done ;
-	if test x"$CC_FOR_BUILD" = x ; then
-	  CC_FOR_BUILD=no_compiler_found ;
-	fi
-	;;
- ,,*)   CC_FOR_BUILD=$CC ;;
- ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
-	PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    *:NetBSD:*:*)
-	# NetBSD (nbsd) targets should (where applicable) match one or
-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
-	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
-	# switched to ELF, *-*-netbsd* would select the old
-	# object file format.  This provides both forward
-	# compatibility and a consistent mechanism for selecting the
-	# object file format.
-	#
-	# Note: NetBSD doesn't particularly care about the vendor
-	# portion of the name.  We always set it to "unknown".
-	sysctl="sysctl -n hw.machine_arch"
-	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
-	case "${UNAME_MACHINE_ARCH}" in
-	    armeb) machine=armeb-unknown ;;
-	    arm*) machine=arm-unknown ;;
-	    sh3el) machine=shl-unknown ;;
-	    sh3eb) machine=sh-unknown ;;
-	    sh5el) machine=sh5le-unknown ;;
-	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
-	esac
-	# The Operating System including object format, if it has switched
-	# to ELF recently, or will in the future.
-	case "${UNAME_MACHINE_ARCH}" in
-	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
-		eval $set_cc_for_build
-		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-			| grep __ELF__ >/dev/null
-		then
-		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
-		    # Return netbsd for either.  FIX?
-		    os=netbsd
-		else
-		    os=netbsdelf
-		fi
-		;;
-	    *)
-	        os=netbsd
-		;;
-	esac
-	# The OS release
-	# Debian GNU/NetBSD machines have a different userland, and
-	# thus, need a distinct triplet. However, they do not need
-	# kernel version information, so it can be replaced with a
-	# suitable tag, in the style of linux-gnu.
-	case "${UNAME_VERSION}" in
-	    Debian*)
-		release='-gnu'
-		;;
-	    *)
-		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-		;;
-	esac
-	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
-	# contains redundant information, the shorter form:
-	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "${machine}-${os}${release}"
-	exit ;;
-    *:OpenBSD:*:*)
-	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
-	exit ;;
-    *:ekkoBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
-	exit ;;
-    *:SolidBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
-	exit ;;
-    macppc:MirBSD:*:*)
-	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
-	exit ;;
-    *:MirBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
-	exit ;;
-    alpha:OSF1:*:*)
-	case $UNAME_RELEASE in
-	*4.0)
-		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-		;;
-	*5.*)
-	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
-		;;
-	esac
-	# According to Compaq, /usr/sbin/psrinfo has been available on
-	# OSF/1 and Tru64 systems produced since 1995.  I hope that
-	# covers most systems running today.  This code pipes the CPU
-	# types through head -n 1, so we only detect the type of CPU 0.
-	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
-	case "$ALPHA_CPU_TYPE" in
-	    "EV4 (21064)")
-		UNAME_MACHINE="alpha" ;;
-	    "EV4.5 (21064)")
-		UNAME_MACHINE="alpha" ;;
-	    "LCA4 (21066/21068)")
-		UNAME_MACHINE="alpha" ;;
-	    "EV5 (21164)")
-		UNAME_MACHINE="alphaev5" ;;
-	    "EV5.6 (21164A)")
-		UNAME_MACHINE="alphaev56" ;;
-	    "EV5.6 (21164PC)")
-		UNAME_MACHINE="alphapca56" ;;
-	    "EV5.7 (21164PC)")
-		UNAME_MACHINE="alphapca57" ;;
-	    "EV6 (21264)")
-		UNAME_MACHINE="alphaev6" ;;
-	    "EV6.7 (21264A)")
-		UNAME_MACHINE="alphaev67" ;;
-	    "EV6.8CB (21264C)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.8AL (21264B)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.8CX (21264D)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.9A (21264/EV69A)")
-		UNAME_MACHINE="alphaev69" ;;
-	    "EV7 (21364)")
-		UNAME_MACHINE="alphaev7" ;;
-	    "EV7.9 (21364A)")
-		UNAME_MACHINE="alphaev79" ;;
-	esac
-	# A Pn.n version is a patched version.
-	# A Vn.n version is a released version.
-	# A Tn.n version is a released field test version.
-	# A Xn.n version is an unreleased experimental baselevel.
-	# 1.2 uses "1.2" for uname -r.
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	exit ;;
-    Alpha\ *:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# Should we change UNAME_MACHINE based on the output of uname instead
-	# of the specific Alpha model?
-	echo alpha-pc-interix
-	exit ;;
-    21064:Windows_NT:50:3)
-	echo alpha-dec-winnt3.5
-	exit ;;
-    Amiga*:UNIX_System_V:4.0:*)
-	echo m68k-unknown-sysv4
-	exit ;;
-    *:[Aa]miga[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-amigaos
-	exit ;;
-    *:[Mm]orph[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-morphos
-	exit ;;
-    *:OS/390:*:*)
-	echo i370-ibm-openedition
-	exit ;;
-    *:z/VM:*:*)
-	echo s390-ibm-zvmoe
-	exit ;;
-    *:OS400:*:*)
-        echo powerpc-ibm-os400
-	exit ;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit ;;
-    arm:riscos:*:*|arm:RISCOS:*:*)
-	echo arm-unknown-riscos
-	exit ;;
-    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-	echo hppa1.1-hitachi-hiuxmpp
-	exit ;;
-    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
-	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-	if test "`(/bin/universe) 2>/dev/null`" = att ; then
-		echo pyramid-pyramid-sysv3
-	else
-		echo pyramid-pyramid-bsd
-	fi
-	exit ;;
-    NILE*:*:*:dcosx)
-	echo pyramid-pyramid-svr4
-	exit ;;
-    DRS?6000:unix:4.0:6*)
-	echo sparc-icl-nx6
-	exit ;;
-    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
-	case `/usr/bin/uname -p` in
-	    sparc) echo sparc-icl-nx7; exit ;;
-	esac ;;
-    sun4H:SunOS:5.*:*)
-	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:6*:*)
-	# According to config.sub, this is the proper way to canonicalize
-	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-	# it's likely to be more like Solaris than SunOS4.
-	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:*:*)
-	case "`/usr/bin/arch -k`" in
-	    Series*|S4*)
-		UNAME_RELEASE=`uname -v`
-		;;
-	esac
-	# Japanese Language versions have a version number like `4.1.3-JL'.
-	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-	exit ;;
-    sun3*:SunOS:*:*)
-	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit ;;
-    sun*:*:4.2BSD:*)
-	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
-	case "`/bin/arch`" in
-	    sun3)
-		echo m68k-sun-sunos${UNAME_RELEASE}
-		;;
-	    sun4)
-		echo sparc-sun-sunos${UNAME_RELEASE}
-		;;
-	esac
-	exit ;;
-    aushp:SunOS:*:*)
-	echo sparc-auspex-sunos${UNAME_RELEASE}
-	exit ;;
-    # The situation for MiNT is a little confusing.  The machine name
-    # can be virtually everything (everything which is not
-    # "atarist" or "atariste" at least should have a processor
-    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
-    # to the lowercase version "mint" (or "freemint").  Finally
-    # the system name "TOS" denotes a system which is actually not
-    # MiNT.  But MiNT is downward compatible to TOS, so this should
-    # be no problem.
-    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-	exit ;;
-    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
-    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-	exit ;;
-    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
-    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
-    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
-    m68k:machten:*:*)
-	echo m68k-apple-machten${UNAME_RELEASE}
-	exit ;;
-    powerpc:machten:*:*)
-	echo powerpc-apple-machten${UNAME_RELEASE}
-	exit ;;
-    RISC*:Mach:*:*)
-	echo mips-dec-mach_bsd4.3
-	exit ;;
-    RISC*:ULTRIX:*:*)
-	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit ;;
-    VAX*:ULTRIX*:*:*)
-	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit ;;
-    2020:CLIX:*:* | 2430:CLIX:*:*)
-	echo clipper-intergraph-clix${UNAME_RELEASE}
-	exit ;;
-    mips:*:*:UMIPS | mips:*:*:RISCos)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-	int main (int argc, char *argv[]) {
-#else
-	int main (argc, argv) int argc; char *argv[]; {
-#endif
-	#if defined (host_mips) && defined (MIPSEB)
-	#if defined (SYSTYPE_SYSV)
-	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_SVR4)
-	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
-	#endif
-	#endif
-	  exit (-1);
-	}
-EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c &&
-	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-	  SYSTEM_NAME=`$dummy $dummyarg` &&
-	    { echo "$SYSTEM_NAME"; exit; }
-	echo mips-mips-riscos${UNAME_RELEASE}
-	exit ;;
-    Motorola:PowerMAX_OS:*:*)
-	echo powerpc-motorola-powermax
-	exit ;;
-    Motorola:*:4.3:PL8-*)
-	echo powerpc-harris-powermax
-	exit ;;
-    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
-	echo powerpc-harris-powermax
-	exit ;;
-    Night_Hawk:Power_UNIX:*:*)
-	echo powerpc-harris-powerunix
-	exit ;;
-    m88k:CX/UX:7*:*)
-	echo m88k-harris-cxux7
-	exit ;;
-    m88k:*:4*:R4*)
-	echo m88k-motorola-sysv4
-	exit ;;
-    m88k:*:3*:R3*)
-	echo m88k-motorola-sysv3
-	exit ;;
-    AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
-	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
-	then
-	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-	       [ ${TARGET_BINARY_INTERFACE}x = x ]
-	    then
-		echo m88k-dg-dgux${UNAME_RELEASE}
-	    else
-		echo m88k-dg-dguxbcs${UNAME_RELEASE}
-	    fi
-	else
-	    echo i586-dg-dgux${UNAME_RELEASE}
-	fi
- 	exit ;;
-    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
-	echo m88k-dolphin-sysv3
-	exit ;;
-    M88*:*:R3*:*)
-	# Delta 88k system running SVR3
-	echo m88k-motorola-sysv3
-	exit ;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-	echo m88k-tektronix-sysv3
-	exit ;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-	echo m68k-tektronix-bsd
-	exit ;;
-    *:IRIX*:*:*)
-	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-	exit ;;
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
-	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
-    i*86:AIX:*:*)
-	echo i386-ibm-aix
-	exit ;;
-    ia64:AIX:*:*)
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-	exit ;;
-    *:AIX:2:3)
-	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-		eval $set_cc_for_build
-		sed 's/^		//' << EOF >$dummy.c
-		#include <sys/systemcfg.h>
-
-		main()
-			{
-			if (!__power_pc())
-				exit(1);
-			puts("powerpc-ibm-aix3.2.5");
-			exit(0);
-			}
-EOF
-		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
-		then
-			echo "$SYSTEM_NAME"
-		else
-			echo rs6000-ibm-aix3.2.5
-		fi
-	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-		echo rs6000-ibm-aix3.2.4
-	else
-		echo rs6000-ibm-aix3.2
-	fi
-	exit ;;
-    *:AIX:*:[456])
-	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
-		IBM_ARCH=rs6000
-	else
-		IBM_ARCH=powerpc
-	fi
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit ;;
-    *:AIX:*:*)
-	echo rs6000-ibm-aix
-	exit ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
-	echo romp-ibm-bsd4.4
-	exit ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-	exit ;;                             # report: romp-ibm BSD 4.3
-    *:BOSX:*:*)
-	echo rs6000-bull-bosx
-	exit ;;
-    DPX/2?00:B.O.S.:*:*)
-	echo m68k-bull-sysv3
-	exit ;;
-    9000/[34]??:4.3bsd:1.*:*)
-	echo m68k-hp-bsd
-	exit ;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-	echo m68k-hp-bsd4.4
-	exit ;;
-    9000/[34678]??:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	case "${UNAME_MACHINE}" in
-	    9000/31? )            HP_ARCH=m68000 ;;
-	    9000/[34]?? )         HP_ARCH=m68k ;;
-	    9000/[678][0-9][0-9])
-		if [ -x /usr/bin/getconf ]; then
-		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
-			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                        esac ;;
-                    esac
-		fi
-		if [ "${HP_ARCH}" = "" ]; then
-		    eval $set_cc_for_build
-		    sed 's/^              //' << EOF >$dummy.c
-
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
-
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
-
-                  switch (cpu)
-              	{
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-              	case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-              	    switch (bits)
-              		{
-              		case 64: puts ("hppa2.0w"); break;
-              		case 32: puts ("hppa2.0n"); break;
-              		default: puts ("hppa2.0"); break;
-              		} break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-              	    puts ("hppa2.0"); break;
-              #endif
-              	default: puts ("hppa1.0"); break;
-              	}
-                  exit (0);
-              }
-EOF
-		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
-		    test -z "$HP_ARCH" && HP_ARCH=hppa
-		fi ;;
-	esac
-	if [ ${HP_ARCH} = "hppa2.0w" ]
-	then
-	    eval $set_cc_for_build
-
-	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
-	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
-	    # generating 64-bit code.  GNU and HP use different nomenclature:
-	    #
-	    # $ CC_FOR_BUILD=cc ./config.guess
-	    # => hppa2.0w-hp-hpux11.23
-	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
-	    # => hppa64-hp-hpux11.23
+# 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 echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-		grep __LP64__ >/dev/null
-	    then
-		HP_ARCH="hppa2.0w"
-	    else
-		HP_ARCH="hppa64"
-	    fi
-	fi
-	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit ;;
-    ia64:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	echo ia64-hp-hpux${HPUX_REV}
-	exit ;;
-    3050*:HI-UX:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <unistd.h>
-	int
-	main ()
-	{
-	  long cpu = sysconf (_SC_CPU_VERSION);
-	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-	     results, however.  */
-	  if (CPU_IS_PA_RISC (cpu))
-	    {
-	      switch (cpu)
-		{
-		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-		  default: puts ("hppa-hitachi-hiuxwe2"); break;
-		}
-	    }
-	  else if (CPU_IS_HP_MC68K (cpu))
-	    puts ("m68k-hitachi-hiuxwe2");
-	  else puts ("unknown-hitachi-hiuxwe2");
-	  exit (0);
-	}
-EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
-		{ echo "$SYSTEM_NAME"; exit; }
-	echo unknown-hitachi-hiuxwe2
-	exit ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
-	echo hppa1.1-hp-bsd
-	exit ;;
-    9000/8??:4.3bsd:*:*)
-	echo hppa1.0-hp-bsd
-	exit ;;
-    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
-	echo hppa1.0-hp-mpeix
-	exit ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
-	echo hppa1.1-hp-osf
-	exit ;;
-    hp8??:OSF1:*:*)
-	echo hppa1.0-hp-osf
-	exit ;;
-    i*86:OSF1:*:*)
-	if [ -x /usr/sbin/sysversion ] ; then
-	    echo ${UNAME_MACHINE}-unknown-osf1mk
-	else
-	    echo ${UNAME_MACHINE}-unknown-osf1
-	fi
-	exit ;;
-    parisc*:Lites*:*:*)
-	echo hppa1.1-hp-lites
-	exit ;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-	echo c1-convex-bsd
-        exit ;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-        exit ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-	echo c34-convex-bsd
-        exit ;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-	echo c38-convex-bsd
-        exit ;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-	echo c4-convex-bsd
-        exit ;;
-    CRAY*Y-MP:*:*:*)
-	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*[A-Z]90:*:*:*)
-	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
-	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-	      -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*TS:*:*:*)
-	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*T3E:*:*:*)
-	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*SV1:*:*:*)
-	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    *:UNICOS/mp:*:*)
-	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit ;;
-    5000:UNIX_System_V:4.*:*)
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-	exit ;;
-    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-	exit ;;
-    sparc*:BSD/OS:*:*)
-	echo sparc-unknown-bsdi${UNAME_RELEASE}
-	exit ;;
-    *:BSD/OS:*:*)
-	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-	exit ;;
-    *:FreeBSD:*:*)
-	case ${UNAME_MACHINE} in
-	    pc98)
-		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	    amd64)
-		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	    *)
-		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	esac
-	exit ;;
-    i*:CYGWIN*:*)
-	echo ${UNAME_MACHINE}-pc-cygwin
-	exit ;;
-    *:MINGW*:*)
-	echo ${UNAME_MACHINE}-pc-mingw32
-	exit ;;
-    i*:windows32*:*)
-    	# uname -m includes "-pc" on this system.
-    	echo ${UNAME_MACHINE}-mingw32
-	exit ;;
-    i*:PW*:*)
-	echo ${UNAME_MACHINE}-pc-pw32
-	exit ;;
-    *:Interix*:[3456]*)
-    	case ${UNAME_MACHINE} in
-	    x86)
-		echo i586-pc-interix${UNAME_RELEASE}
-		exit ;;
-	    EM64T | authenticamd)
-		echo x86_64-unknown-interix${UNAME_RELEASE}
-		exit ;;
-	    IA64)
-		echo ia64-unknown-interix${UNAME_RELEASE}
-		exit ;;
-	esac ;;
-    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
-	echo i${UNAME_MACHINE}-pc-mks
-	exit ;;
-    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
-	# UNAME_MACHINE based on the output of uname instead of i386?
-	echo i586-pc-interix
-	exit ;;
-    i*:UWIN*:*)
-	echo ${UNAME_MACHINE}-pc-uwin
-	exit ;;
-    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-	echo x86_64-unknown-cygwin
-	exit ;;
-    p*:CYGWIN*:*)
-	echo powerpcle-unknown-cygwin
-	exit ;;
-    prep*:SunOS:5.*:*)
-	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    *:GNU:*:*)
-	# the GNU system
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-	exit ;;
-    *:GNU/*:*:*)
-	# other systems with GNU libc and userland
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
-	exit ;;
-    i*86:Minix:*:*)
-	echo ${UNAME_MACHINE}-pc-minix
-	exit ;;
-    arm*:Linux:*:*)
-	eval $set_cc_for_build
-	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
-	    | grep -q __ARM_EABI__
-	then
-	    echo ${UNAME_MACHINE}-unknown-linux-gnu
-	else
-	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
-	fi
-	exit ;;
-    avr32*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    cris:Linux:*:*)
-	echo cris-axis-linux-gnu
-	exit ;;
-    crisv32:Linux:*:*)
-	echo crisv32-axis-linux-gnu
-	exit ;;
-    frv:Linux:*:*)
-    	echo frv-unknown-linux-gnu
-	exit ;;
-    ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    m32r*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    mips:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#undef CPU
-	#undef mips
-	#undef mipsel
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mipsel
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips
-	#else
-	CPU=
-	#endif
-	#endif
-EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^CPU/{
-		s: ::g
-		p
-	    }'`"
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-	;;
-    mips64:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#undef CPU
-	#undef mips64
-	#undef mips64el
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mips64el
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips64
-	#else
-	CPU=
-	#endif
-	#endif
-EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^CPU/{
-		s: ::g
-		p
-	    }'`"
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-	;;
-    or32:Linux:*:*)
-	echo or32-unknown-linux-gnu
-	exit ;;
-    ppc:Linux:*:*)
-	echo powerpc-unknown-linux-gnu
-	exit ;;
-    ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-gnu
-	exit ;;
-    alpha:Linux:*:*)
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-	  EV5)   UNAME_MACHINE=alphaev5 ;;
-	  EV56)  UNAME_MACHINE=alphaev56 ;;
-	  PCA56) UNAME_MACHINE=alphapca56 ;;
-	  PCA57) UNAME_MACHINE=alphapca56 ;;
-	  EV6)   UNAME_MACHINE=alphaev6 ;;
-	  EV67)  UNAME_MACHINE=alphaev67 ;;
-	  EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-	exit ;;
-    parisc:Linux:*:* | hppa:Linux:*:*)
-	# Look for CPU level
-	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
-	  *)    echo hppa-unknown-linux-gnu ;;
-	esac
-	exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
-	exit ;;
-    s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux
-	exit ;;
-    sh64*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    vax:Linux:*:*)
-	echo ${UNAME_MACHINE}-dec-linux-gnu
-	exit ;;
-    x86_64:Linux:*:*)
-	echo x86_64-unknown-linux-gnu
-	exit ;;
-    xtensa*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    i*86:Linux:*:*)
-	# The BFD linker knows what the default object file format is, so
-	# first see if it will tell us. cd to the root directory to prevent
-	# problems with other programs or directories called `ld' in the path.
-	# Set LC_ALL=C to ensure ld outputs messages in English.
-	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-			 | sed -ne '/supported targets:/!d
-				    s/[ 	][ 	]*/ /g
-				    s/.*supported targets: *//
-				    s/ .*//
-				    p'`
-        case "$ld_supported_targets" in
-	  elf32-i386)
-		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-		;;
-	  a.out-i386-linux)
-		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-		exit ;;
-	  coff-i386)
-		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-		exit ;;
-	  "")
-		# Either a pre-BFD a.out linker (linux-gnuoldld) or
-		# one that does not give us useful --help.
-		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-		exit ;;
-	esac
-	# Determine whether the default compiler is a.out or elf
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <features.h>
-	#ifdef __ELF__
-	# ifdef __GLIBC__
-	#  if __GLIBC__ >= 2
-	LIBC=gnu
-	#  else
-	LIBC=gnulibc1
-	#  endif
-	# else
-	LIBC=gnulibc1
-	# endif
-	#else
-	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-	LIBC=gnu
-	#else
-	LIBC=gnuaout
-	#endif
-	#endif
-	#ifdef __dietlibc__
-	LIBC=dietlibc
-	#endif
-EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^LIBC/{
-		s: ::g
-		p
-	    }'`"
-	test x"${LIBC}" != x && {
-		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-		exit
-	}
-	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
-	;;
-    i*86:DYNIX/ptx:4*:*)
-	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
-	# earlier versions are messed up and put the nodename in both
-	# sysname and nodename.
-	echo i386-sequent-sysv4
-	exit ;;
-    i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
-	# I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
-	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-	exit ;;
-    i*86:OS/2:*:*)
-	# If we were able to find `uname', then EMX Unix compatibility
-	# is probably installed.
-	echo ${UNAME_MACHINE}-pc-os2-emx
-	exit ;;
-    i*86:XTS-300:*:STOP)
-	echo ${UNAME_MACHINE}-unknown-stop
-	exit ;;
-    i*86:atheos:*:*)
-	echo ${UNAME_MACHINE}-unknown-atheos
-	exit ;;
-    i*86:syllable:*:*)
-	echo ${UNAME_MACHINE}-pc-syllable
-	exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
-	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    i*86:*DOS:*:*)
-	echo ${UNAME_MACHINE}-pc-msdosdjgpp
-	exit ;;
-    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
-	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
-	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
-	else
-		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
-	fi
-	exit ;;
-    i*86:*:5:[678]*)
-    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
-	case `/bin/uname -X | grep "^Machine"` in
-	    *486*)	     UNAME_MACHINE=i486 ;;
-	    *Pentium)	     UNAME_MACHINE=i586 ;;
-	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
-	esac
-	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-	exit ;;
-    i*86:*:3.2:*)
-	if test -f /usr/options/cb.name; then
-		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-	elif /bin/uname -X 2>/dev/null >/dev/null ; then
-		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
-		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
-		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
-			&& UNAME_MACHINE=i586
-		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
-	else
-		echo ${UNAME_MACHINE}-pc-sysv32
-	fi
-	exit ;;
-    pc:*:*:*)
-	# Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-	echo i386-pc-msdosdjgpp
-        exit ;;
-    Intel:Mach:3*:*)
-	echo i386-pc-mach3
-	exit ;;
-    paragon:*:*:*)
-	echo i860-intel-osf1
-	exit ;;
-    i860:*:4.*:*) # i860-SVR4
-	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
-	else # Add other i860-SVR4 vendors below as they are discovered.
-	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
-	fi
-	exit ;;
-    mini*:CTIX:SYS*5:*)
-	# "miniframe"
-	echo m68010-convergent-sysv
-	exit ;;
-    mc68k:UNIX:SYSTEM5:3.51m)
-	echo m68k-convergent-sysv
-	exit ;;
-    M680?0:D-NIX:5.3:*)
-	echo m68k-diab-dnix
-	exit ;;
-    M68*:*:R3V[5678]*:*)
-	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
-    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
-	OS_REL=''
-	test -r /etc/.relid \
-	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
-	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && { echo i486-ncr-sysv4; exit; } ;;
-    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-	echo m68k-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    mc68030:UNIX_System_V:4.*:*)
-	echo m68k-atari-sysv4
-	exit ;;
-    TSUNAMI:LynxOS:2.*:*)
-	echo sparc-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    rs6000:LynxOS:2.*:*)
-	echo rs6000-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
-	echo powerpc-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    SM[BE]S:UNIX_SV:*:*)
-	echo mips-dde-sysv${UNAME_RELEASE}
-	exit ;;
-    RM*:ReliantUNIX-*:*:*)
-	echo mips-sni-sysv4
-	exit ;;
-    RM*:SINIX-*:*:*)
-	echo mips-sni-sysv4
-	exit ;;
-    *:SINIX-*:*:*)
-	if uname -p 2>/dev/null >/dev/null ; then
-		UNAME_MACHINE=`(uname -p) 2>/dev/null`
-		echo ${UNAME_MACHINE}-sni-sysv4
-	else
-		echo ns32k-sni-sysv
-	fi
-	exit ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit ;;
-    *:UNIX_System_V:4*:FTX*)
-	# From Gerald Hewes <hewes@openmarket.com>.
-	# How about differentiating between stratus architectures? -djm
-	echo hppa1.1-stratus-sysv4
-	exit ;;
-    *:*:*:FTX*)
-	# From seanf@swdc.stratus.com.
-	echo i860-stratus-sysv4
-	exit ;;
-    i*86:VOS:*:*)
-	# From Paul.Green@stratus.com.
-	echo ${UNAME_MACHINE}-stratus-vos
-	exit ;;
-    *:VOS:*:*)
-	# From Paul.Green@stratus.com.
-	echo hppa1.1-stratus-vos
-	exit ;;
-    mc68*:A/UX:*:*)
-	echo m68k-apple-aux${UNAME_RELEASE}
-	exit ;;
-    news*:NEWS-OS:6*:*)
-	echo mips-sony-newsos6
-	exit ;;
-    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-	if [ -d /usr/nec ]; then
-	        echo mips-nec-sysv${UNAME_RELEASE}
-	else
-	        echo mips-unknown-sysv${UNAME_RELEASE}
-	fi
-        exit ;;
-    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
-	echo powerpc-be-beos
-	exit ;;
-    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
-	echo powerpc-apple-beos
-	exit ;;
-    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
-	echo i586-pc-beos
-	exit ;;
-    SX-4:SUPER-UX:*:*)
-	echo sx4-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-5:SUPER-UX:*:*)
-	echo sx5-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-6:SUPER-UX:*:*)
-	echo sx6-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-7:SUPER-UX:*:*)
-	echo sx7-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-8:SUPER-UX:*:*)
-	echo sx8-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-8R:SUPER-UX:*:*)
-	echo sx8r-nec-superux${UNAME_RELEASE}
-	exit ;;
-    Power*:Rhapsody:*:*)
-	echo powerpc-apple-rhapsody${UNAME_RELEASE}
-	exit ;;
-    *:Rhapsody:*:*)
-	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-	exit ;;
-    *:Darwin:*:*)
-	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-	eval $set_cc_for_build
-	echo "int main(){}" > $dummy.c
-        if test "`$CC_FOR_BUILD -o $dummy $dummy.c; file $dummy |  grep -c x86_64`" = 1 ; then
-             UNAME_PROCESSOR=x86_64
-        fi
-	case $UNAME_PROCESSOR in
-	    unknown) UNAME_PROCESSOR=powerpc ;;
-	esac
-	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-	exit ;;
-    *:procnto*:*:* | *:QNX:[0123456789]*:*)
-	UNAME_PROCESSOR=`uname -p`
-	if test "$UNAME_PROCESSOR" = "x86"; then
-		UNAME_PROCESSOR=i386
-		UNAME_MACHINE=pc
-	fi
-	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-	exit ;;
-    *:QNX:*:4*)
-	echo i386-pc-qnx
-	exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
-	echo nse-tandem-nsk${UNAME_RELEASE}
-	exit ;;
-    NSR-?:NONSTOP_KERNEL:*:*)
-	echo nsr-tandem-nsk${UNAME_RELEASE}
-	exit ;;
-    *:NonStop-UX:*:*)
-	echo mips-compaq-nonstopux
-	exit ;;
-    BS2000:POSIX*:*:*)
-	echo bs2000-siemens-sysv
-	exit ;;
-    DS/*:UNIX_System_V:*:*)
-	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-	exit ;;
-    *:Plan9:*:*)
-	# "uname -m" is not consistent, so use $cputype instead. 386
-	# is converted to i386 for consistency with other x86
-	# operating systems.
-	if test "$cputype" = "386"; then
-	    UNAME_MACHINE=i386
-	else
-	    UNAME_MACHINE="$cputype"
-	fi
-	echo ${UNAME_MACHINE}-unknown-plan9
-	exit ;;
-    *:TOPS-10:*:*)
-	echo pdp10-unknown-tops10
-	exit ;;
-    *:TENEX:*:*)
-	echo pdp10-unknown-tenex
-	exit ;;
-    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-	echo pdp10-dec-tops20
-	exit ;;
-    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-	echo pdp10-xkl-tops20
-	exit ;;
-    *:TOPS-20:*:*)
-	echo pdp10-unknown-tops20
-	exit ;;
-    *:ITS:*:*)
-	echo pdp10-unknown-its
-	exit ;;
-    SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
-	exit ;;
-    *:DragonFly:*:*)
-	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-	exit ;;
-    *:*VMS:*:*)
-    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
-	case "${UNAME_MACHINE}" in
-	    A*) echo alpha-dec-vms ; exit ;;
-	    I*) echo ia64-dec-vms ; exit ;;
-	    V*) echo vax-dec-vms ; exit ;;
-	esac ;;
-    *:XENIX:*:SysV)
-	echo i386-pc-xenix
-	exit ;;
-    i*86:skyos:*:*)
-	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
-	exit ;;
-    i*86:rdos:*:*)
-	echo ${UNAME_MACHINE}-pc-rdos
-	exit ;;
-esac
+# This is a wrapper for the config.guess from autoconf. The latter does not properly
+# detect amd64 systems, since that require isainfo instead of uname. Instead of patching
+# the autoconf system (which might easily get lost in a future update), we wrap it and
+# fix the broken property, if needed.
 
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-          "4"
-#else
-	  ""
-#endif
-         ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-	printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-	printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-	{ echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-	echo c1-convex-bsd
-	exit ;;
-    c2*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-	exit ;;
-    c34*)
-	echo c34-convex-bsd
-	exit ;;
-    c38*)
-	echo c38-convex-bsd
-	exit ;;
-    c4*)
-	echo c4-convex-bsd
-	exit ;;
-    esac
+DIR=`dirname $0`
+OUT=`. $DIR/autoconf-config.guess`
+echo $OUT | grep i386-pc-solaris > /dev/null 2> /dev/null
+if test $? = 0; then
+  # isainfo -n returns either i386 or amd64 on Intel systems
+  REAL_CPU=`isainfo -n`
+  OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
 fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-and
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo               = `(hostinfo) 2>/dev/null`
-/bin/universe          = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch              = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
+echo $OUT
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/build-performance.m4	Wed Jul 05 18:16:12 2017 +0200
@@ -0,0 +1,378 @@
+#
+# 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([BPERF_CHECK_CORES],
+[
+    AC_MSG_CHECKING([for number of cores])
+    NUM_CORES=1
+    FOUND_CORES=no
+    
+    if test -f /proc/cpuinfo; then
+        # Looks like a Linux system
+        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
+        FOUND_CORES=yes
+    fi
+
+    if test -x /usr/sbin/psrinfo; then
+        # Looks like a Solaris system
+        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
+        FOUND_CORES=yes
+    fi
+
+    if test -x /usr/sbin/system_profiler; then
+        # Looks like a MacOSX system
+        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print [$]5}'`
+        FOUND_CORES=yes
+    fi
+
+    if test "x$build_os" = xwindows; then
+        NUM_CORES=4
+    fi
+
+    # For c/c++ code we run twice as many concurrent build
+    # jobs than we have cores, otherwise we will stall on io.
+    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
+
+    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!])
+    fi 
+
+])
+
+AC_DEFUN([BPERF_CHECK_MEMORY_SIZE],
+[
+    AC_MSG_CHECKING([for memory size])
+    # Default to 1024MB
+    MEMORY_SIZE=1024
+    FOUND_MEM=no
+    
+    if test -f /proc/cpuinfo; then
+        # Looks like a Linux system
+        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print [$]2}'`
+        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
+        FOUND_MEM=yes
+    fi
+
+    if test -x /usr/sbin/prtconf; then
+        # Looks like a Solaris system
+        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print [$]3 }'`
+        FOUND_MEM=yes
+    fi
+
+    if test -x /usr/sbin/system_profiler; then
+        # Looks like a MacOSX system
+        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print [$]2}'`
+        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
+        FOUND_MEM=yes
+    fi
+
+    if test "x$build_os" = xwindows; then
+        MEMORY_SIZE=`systeminfo | grep 'Total Physical Memory:' | awk '{ print [$]4 }' | sed 's/,//'`
+        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 1024MB!])
+    fi 
+])
+
+AC_DEFUN_ONCE([BPERF_SETUP_BUILD_CORES],
+[
+# How many cores do we have on this build system?
+AC_ARG_WITH(num-cores, [AS_HELP_STRING([--with-num-cores],
+    [number of cores in the build system, e.g. --with-num-cores=8 @<:@probed@:>@])])
+if test "x$with_num_cores" = x; then
+    # The number of cores were not specified, try to probe them.
+    BPERF_CHECK_CORES
+else
+    NUM_CORES=$with_num_cores
+    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
+fi
+AC_SUBST(NUM_CORES)
+AC_SUBST(CONCURRENT_BUILD_JOBS)
+])
+
+AC_DEFUN_ONCE([BPERF_SETUP_BUILD_MEMORY],
+[
+# How much memory do we have on this build system?
+AC_ARG_WITH(memory-size, [AS_HELP_STRING([--with-memory-size],
+    [memory (in MB) available in the build system, e.g. --with-memory-size=1024 @<:@probed@:>@])])
+if test "x$with_memory_size" = x; then
+    # The memory size was not specified, try to probe it.
+    BPERF_CHECK_MEMORY_SIZE
+else
+    MEMORY_SIZE=$with_memory_size
+fi
+AC_SUBST(MEMORY_SIZE)
+])
+
+AC_DEFUN([BPERF_SETUP_CCACHE],
+[
+    AC_ARG_ENABLE([ccache],
+	      [AS_HELP_STRING([--disable-ccache],
+	      		      [use 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)
+    else
+        AC_MSG_CHECKING([for ccache])
+        AC_MSG_RESULT([explicitly disabled])    
+        CCACHE=
+    fi    
+    AC_SUBST(CCACHE)
+
+    AC_ARG_WITH([ccache-dir],
+	      [AS_HELP_STRING([--with-ccache-dir],
+	      		      [where to store ccache files @<:@~/.ccache@:>@])])
+
+    if test "x$with_ccache_dir" != x; then
+        # When using a non home ccache directory, assume the use is to share ccache files
+        # with other users. Thus change the umask.
+        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
+    fi
+    CCACHE_FOUND=""
+    if test "x$CCACHE" != x; then
+        BPERF_SETUP_CCACHE_USAGE
+    fi    
+])
+
+AC_DEFUN([BPERF_SETUP_CCACHE_USAGE],
+[
+    if test "x$CCACHE" != x; then
+        CCACHE_FOUND="true"
+        # Only use ccache if it is 3.1.4 or later, which supports
+        # precompiled headers.
+        AC_MSG_CHECKING([if ccache supports precompiled headers])
+        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.@<:@456789@:>@) 2> /dev/null`
+        if test "x$HAS_GOOD_CCACHE" = x; then
+            AC_MSG_RESULT([no, disabling ccache])
+            CCACHE=
+        else
+            AC_MSG_RESULT([yes])
+            AC_MSG_CHECKING([if C-compiler supports ccache precompiled headers])
+            PUSHED_FLAGS="$CXXFLAGS"
+            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
+            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [CC_KNOWS_CCACHE_TRICK=yes], [CC_KNOWS_CCACHE_TRICK=no])
+            CXXFLAGS="$PUSHED_FLAGS"
+            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
+                AC_MSG_RESULT([yes])
+            else
+                AC_MSG_RESULT([no, disabling ccaching of precompiled headers])
+                CCACHE=
+            fi
+        fi
+    fi
+
+    if test "x$CCACHE" != x; then
+        CCACHE_SLOPPINESS=time_macros
+        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
+        CCACHE_FLAGS=-fpch-preprocess
+
+        if test "x$SET_CCACHE_DIR" != x; then
+            mkdir -p $CCACHE_DIR > /dev/null 2>&1
+	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
+        fi
+    fi
+])
+
+AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS],
+[
+       
+###############################################################################
+#
+# 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@:>@])],
+    [ENABLE_PRECOMPH=${enable_precompiled-headers}], [ENABLE_PRECOMPH=yes])
+
+USE_PRECOMPILED_HEADER=1
+if test "x$ENABLE_PRECOMPH" = xno; then
+    USE_PRECOMPILED_HEADER=0
+fi
+
+if test "x$ENABLE_PRECOMPH" = xyes; then
+    # Check that the compiler actually supports precomp headers.
+    if test "x$GCC" = xyes; then
+         AC_MSG_CHECKING([that precompiled headers work])         
+         echo "int alfa();" > conftest.h
+         $CXX -x c++-header conftest.h -o conftest.hpp.gch
+         if test ! -f conftest.hpp.gch; then
+             echo Precompiled header is not working!
+             USE_PRECOMPILED_HEADER=0
+             AC_MSG_RESULT([no])        
+         else
+             AC_MSG_RESULT([yes])
+         fi
+         rm -f conftest.h
+    fi
+fi
+
+AC_SUBST(USE_PRECOMPILED_HEADER)
+])
+
+
+AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC],
+[
+AC_ARG_WITH(server-java, [AS_HELP_STRING([--with-server-java],
+	[use this java binary for running the javac background server and other long running java tasks in the build process,
+     e.g. ---with-server-java="/opt/jrockit/bin/java -server"])])
+
+if test "x$with_server_java" != x; then
+    SERVER_JAVA="$with_server_java"
+    FOUND_VERSION=`$SERVER_JAVA -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" = x; then
+        AC_MSG_ERROR([Could not execute server java: $SERVER_JAVA])
+    fi
+else
+    SERVER_JAVA=""
+    # Hotspot specific options.
+    ADD_JVM_ARG_IF_OK([-XX:+UseParallelOldGC],SERVER_JAVA,[$JAVA])
+    ADD_JVM_ARG_IF_OK([-verbosegc],SERVER_JAVA,[$JAVA])
+    # JRockit specific options.
+    ADD_JVM_ARG_IF_OK([-Xverbose:gc],SERVER_JAVA,[$JAVA])
+    SERVER_JAVA="$JAVA $SERVER_JAVA"
+fi                    
+AC_SUBST(SERVER_JAVA)
+
+AC_MSG_CHECKING([whether to use shared server for javac])
+AC_ARG_ENABLE([javac-server], [AS_HELP_STRING([--enable-javac-server],
+	[enable the shared javac server during the build process @<:@disabled@:>@])],
+	[ENABLE_JAVAC_SERVER="${enableval}"], [ENABLE_JAVAC_SERVER='no'])
+AC_MSG_RESULT([$ENABLE_JAVAC_SERVER])
+if test "x$ENABLE_JAVAC_SERVER" = xyes; then
+    JAVAC_USE_REMOTE=true
+    JAVAC_SERVERS="$OUTPUT_ROOT/javacservers"
+else
+    JAVAC_USE_REMOTE=false
+    JAVAC_SERVERS=
+fi
+AC_SUBST(JAVAC_USE_REMOTE)
+AC_SUBST(JAVAC_SERVERS)
+
+AC_ARG_WITH(javac-server-cores, [AS_HELP_STRING([--with-javac-server-cores],
+	[use at most this number of concurrent threads on the javac server @<:@probed@:>@])])
+if test "x$with_javac_server_cores" != x; then
+    JAVAC_SERVER_CORES="$with_javac_server_cores"
+else
+    if test "$NUM_CORES" -gt 16; then
+        # We set this arbitrary limit because we want to limit the heap
+        # size of the javac server.
+        # In the future we will make the javac compilers in the server
+        # share more and more state, thus enabling us to use more and
+        # more concurrent threads in the server.
+        JAVAC_SERVER_CORES="16"
+    else
+        JAVAC_SERVER_CORES="$NUM_CORES"
+    fi
+
+    if test "$MEMORY_SIZE" -gt "17000"; then
+        MAX_HEAP_MEM=10000
+        ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA])
+        ADD_JVM_ARG_IF_OK([-Xms10G -Xmx10G],SERVER_JAVA,[$SERVER_JAVA])
+        ADD_JVM_ARG_IF_OK([-Xmn2G],SERVER_JAVA,[$SERVER_JAVA])
+    elif test "$MEMORY_SIZE" -gt "10000"; then
+        MAX_HEAP_MEM=6000
+        ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA])
+        ADD_JVM_ARG_IF_OK([-Xms6G -Xmx6G],SERVER_JAVA,[$SERVER_JAVA])
+        ADD_JVM_ARG_IF_OK([-Xmn1G],SERVER_JAVA,[$SERVER_JAVA])
+    elif test "$MEMORY_SIZE" -gt "5000"; then
+        MAX_HEAP_MEM=3000
+        ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA])
+        ADD_JVM_ARG_IF_OK([-Xms1G -Xmx3G],SERVER_JAVA,[$SERVER_JAVA])
+        ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA])
+    elif test "$MEMORY_SIZE" -gt "3800"; then
+        MAX_HEAP_MEM=2500
+        ADD_JVM_ARG_IF_OK([-Xms1G -Xmx2500M],SERVER_JAVA,[$SERVER_JAVA])
+        ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA])
+    elif test "$MEMORY_SIZE" -gt "1900"; then
+        MAX_HEAP_MEM=1200
+        ADD_JVM_ARG_IF_OK([-Xms700M -Xmx1200M],SERVER_JAVA,[$SERVER_JAVA])
+        ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA])
+    elif test "$MEMORY_SIZE" -gt "1000"; then
+        MAX_HEAP_MEM=900
+        ADD_JVM_ARG_IF_OK([-Xms400M -Xmx900M],SERVER_JAVA,[$SERVER_JAVA])
+        ADD_JVM_ARG_IF_OK([-Xmn128M],SERVER_JAVA,[$SERVER_JAVA])
+    else
+        MAX_HEAP_MEM=512
+        ADD_JVM_ARG_IF_OK([-Xms256M -Xmx512M],SERVER_JAVA,[$SERVER_JAVA])
+        ADD_JVM_ARG_IF_OK([-Xmn128M],SERVER_JAVA,[$SERVER_JAVA])
+    fi
+
+    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
+    if test "$JAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
+        AC_MSG_CHECKING([if number of server cores must be reduced])
+        JAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
+        AC_MSG_RESULT([yes, to $JAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB])
+    fi
+fi                    
+AC_SUBST(JAVAC_SERVER_CORES)
+
+AC_MSG_CHECKING([whether to track dependencies between Java packages])
+AC_ARG_ENABLE([javac-deps], [AS_HELP_STRING([--enable-javac-deps],
+	[enable the dependency tracking between Java packages @<:@disabled@:>@])],
+	[ENABLE_JAVAC_DEPS="${enableval}"], [ENABLE_JAVAC_DEPS='no'])
+AC_MSG_RESULT([$ENABLE_JAVAC_DEPS])
+if test "x$ENABLE_JAVAC_DEPS" = xyes; then
+    JAVAC_USE_DEPS=true
+else
+    JAVAC_USE_DEPS=false
+fi
+AC_SUBST(JAVAC_USE_DEPS)
+
+AC_MSG_CHECKING([whether to use multiple cores for javac compilation])
+AC_ARG_ENABLE([javac-multi-core], [AS_HELP_STRING([--enable-javac-multi-core],
+	[compile Java packages concurrently @<:@disabled@:>@])],
+	[ENABLE_JAVAC_MULTICORE="${enableval}"], [ENABLE_JAVAC_MULTICORE='no'])
+AC_MSG_RESULT([$ENABLE_JAVAC_MULTICORE])
+if test "x$ENABLE_JAVAC_MULTICORE" = xyes; then
+    JAVAC_USE_MODE=MULTI_CORE_CONCURRENT
+else
+    JAVAC_USE_MODE=SINGLE_THREADED_BATCH
+    if test "x$ENABLE_JAVAC_DEPS" = xyes; then
+        AC_MSG_WARN([Dependency tracking is not supported with single threaded batch compiles of Java source roots. Please add --disable-javac-deps to your configure options.])
+        AC_MSG_WARN([Disabling dependency tracking for you now.])
+        JAVAC_USE_DEPS=false
+    fi
+    if test "x$ENABLE_JAVAC_SERVER" = xyes; then
+        AC_MSG_WARN([The javac server will not be used since single threaded batch compiles are run within their own JVM. Please add --disable-javac-server to your configure options.])
+        AC_MSG_WARN([Disabling javac server for you now.])
+        JAVAC_USE_REMOTE=false
+    fi
+fi
+AC_SUBST(JAVAC_USE_MODE)
+
+AC_MSG_CHECKING([whether to use sjavac])
+AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac],
+	[use sjavac to do fast incremental compiles @<:@disabled@:>@])],
+	[ENABLE_SJAVAC="${enableval}"], [ENABLE_SJAVAC='no'])
+AC_MSG_RESULT([$ENABLE_SJAVAC])
+AC_SUBST(ENABLE_SJAVAC)
+
+])
--- a/common/autoconf/builddeps.conf.example	Wed Jul 05 18:15:28 2017 +0200
+++ b/common/autoconf/builddeps.conf.example	Wed Jul 05 18:16:12 2017 +0200
@@ -31,11 +31,11 @@
 
 # Translate a configuration triplet/quadruplet into something
 # known by this configuration file.
-# If no rewrite was found, then rewritten_host=${host}
+# If no rewrite was found, then rewritten_target=${OPENJDK_TARGET_SYSTEM}
 REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu
 REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10
  
-# The needed cups builddeps are host independent header files.
+# The needed cups builddeps are platform independent header files.
 # I.e. they need not be part of the devkit.
 builddep_cups=lib/cups_1_3_9.zip
 builddep_cups_CFLAGS=-I${depdir}
@@ -44,10 +44,10 @@
 # for the build platform.
 builddep_devkit=sdk/sdk-${rewritten_build}-20110921.tar.gz
 
-# The freetype dependency is partyl host dependent.
+# The freetype dependency is partly platform dependent.
 # It is stored inside the sys-root.
 builddep_freetype2=sdk/sdk-${rewritten_build}-20110921.tar.gz
-builddep_freetype2_CFLAGS=-I${depdir}/${rewritten_host}/sys-root/usr/include/freetype2
+builddep_freetype2_CFLAGS=-I${depdir}/${rewritten_target}/sys-root/usr/include/freetype2
 builddep_freetype2_LIBS=-lfreetype
 
 # There are many other build dependencies, but they are implicitly
--- a/common/autoconf/builddeps.m4	Wed Jul 05 18:15:28 2017 +0200
+++ b/common/autoconf/builddeps.m4	Wed Jul 05 18:16:12 2017 +0200
@@ -23,7 +23,7 @@
 # questions.
 #
 
-AC_DEFUN([BDEPS_SCAN_FOR_BUILDDEPS],
+AC_DEFUN_ONCE([BDEPS_SCAN_FOR_BUILDDEPS],
 [
     define(LIST_OF_BUILD_DEPENDENCIES,)
     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
@@ -50,27 +50,27 @@
                AC_MSG_ERROR([Could not find any builddeps.conf at all!])
            fi
         fi
-        # Create build and host names that use _ instead of "-" and ".".
+        # Create build and target names that use _ instead of "-" and ".".
         # This is necessary to use them in variable names.
-        build_var=`echo ${build} | tr '-' '_' | tr '.' '_'`
-        host_var=`echo ${host} | tr '-' '_' | tr '.' '_'`
-        # Extract rewrite information for build and host
+        build_var=`echo ${OPENJDK_BUILD_SYSTEM} | tr '-' '_' | tr '.' '_'`
+        target_var=`echo ${OPENJDK_TARGET_SYSTEM} | tr '-' '_' | tr '.' '_'`
+        # Extract rewrite information for build and target
         eval rewritten_build=\${REWRITE_${build_var}}
         if test "x$rewritten_build" = x; then
-            rewritten_build=${build}
+            rewritten_build=${OPENJDK_BUILD_SYSTEM}
             echo Build stays the same $rewritten_build
         else
             echo Rewriting build for builddeps into $rewritten_build
         fi
-        eval rewritten_host=\${REWRITE_${host_var}}
-        if test "x$rewritten_host" = x; then
-            rewritten_host=${host}
-            echo Host stays the same $rewritten_host
+        eval rewritten_target=\${REWRITE_${target_var}}
+        if test "x$rewritten_target" = x; then
+            rewritten_target=${OPENJDK_TARGET_SYSTEM}
+            echo Target stays the same $rewritten_target
         else
-            echo Rewriting host for builddeps into $rewritten_host
+            echo Rewriting target for builddeps into $rewritten_target
         fi
         rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
-        rewritten_host_var=`echo ${rewritten_host} | tr '-' '_' | tr '.' '_'`        
+        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`        
     fi
     AC_CHECK_PROGS(BDEPS_UNZIP, [7z unzip])
     if test "x$BDEPS_UNZIP" = x7z; then
@@ -127,11 +127,11 @@
     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
         # Source the builddeps file again, to make sure it uses the latest variables!
         . $builddepsfile
-        # Look for a host and build machine specific resource!
-        eval resource=\${builddep_$2_BUILD_${rewritten_build_var}_HOST_${rewritten_host_var}}
+        # Look for a target and build machine specific resource!
+        eval resource=\${builddep_$2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
         if test "x$resource" = x; then
-            # Ok, lets instead look for a host specific resource
-            eval resource=\${builddep_$2_HOST_${rewritten_host_var}}
+            # Ok, lets instead look for a target specific resource
+            eval resource=\${builddep_$2_TARGET_${rewritten_target_var}}
         fi
         if test "x$resource" = x; then
             # Ok, lets instead look for a build specific resource
@@ -228,3 +228,33 @@
         $5=$installdir
     fi
 ])
+
+AC_DEFUN_ONCE([BDEPS_CONFIGURE_BUILDDEPS],
+[
+AC_ARG_WITH(builddeps-conf, [AS_HELP_STRING([--with-builddeps-conf],
+    [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])])
+
+AC_ARG_WITH(builddeps-dir, [AS_HELP_STRING([--with-builddeps-dir],
+    [store downloaded build dependencies here @<:@d/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/configure	Wed Jul 05 18:15:28 2017 +0200
+++ b/common/autoconf/configure	Wed Jul 05 18:16:12 2017 +0200
@@ -1,16781 +1,121 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for openjdk version-0.1.
-#
-# Report bugs to <build-infra-dev@openjdk.java.net>.
-#
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
-#
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in #(
-  *posix*) :
-    set -o posix ;; #(
-  *) :
-     ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
-    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='print -r --'
-  as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in #(
-      *"$as_nl"*)
-	expr "X$arg" : "X\\(.*\\)$as_nl";
-	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" ""	$as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-case $0 in #((
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-  done
-IFS=$as_save_IFS
+#!/bin/sh
 
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there.  '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test "x$CONFIG_SHELL" = x; then
-  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '\${1+\"\$@\"}'='\"\$@\"'
-  setopt NO_GLOB_SUBST
-else
-  case \`(set -o) 2>/dev/null\` in #(
-  *posix*) :
-    set -o posix ;; #(
-  *) :
-     ;;
-esac
-fi
-"
-  as_required="as_fn_return () { (exit \$1); }
-as_fn_success () { as_fn_return 0; }
-as_fn_failure () { as_fn_return 1; }
-as_fn_ret_success () { return 0; }
-as_fn_ret_failure () { return 1; }
-
-exitcode=0
-as_fn_success || { exitcode=1; echo as_fn_success failed.; }
-as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
-as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
-as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
-
-else
-  exitcode=1; echo positional parameters were not saved.
-fi
-test x\$exitcode = x0 || exit 1"
-  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
-  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
-  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
-  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
-test \$(( 1 + 1 )) = 2 || exit 1"
-  if (eval "$as_required") 2>/dev/null; then :
-  as_have_required=yes
-else
-  as_have_required=no
-fi
-  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
-
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_found=false
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  as_found=:
-  case $as_dir in #(
-	 /*)
-	   for as_base in sh bash ksh sh5; do
-	     # Try only shells that exist, to save several forks.
-	     as_shell=$as_dir/$as_base
-	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
-  CONFIG_SHELL=$as_shell as_have_required=yes
-		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
-  break 2
-fi
-fi
-	   done;;
-       esac
-  as_found=false
-done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
-	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
-  CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
-IFS=$as_save_IFS
-
-
-      if test "x$CONFIG_SHELL" != x; then :
-  # We cannot yet assume a decent shell, so we have to provide a
-	# neutralization value for shells without unset; and this also
-	# works around shells that cannot unset nonexistent variables.
-	BASH_ENV=/dev/null
-	ENV=/dev/null
-	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-	export CONFIG_SHELL
-	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
+CONFIGURE_COMMAND_LINE="$@"
+conf_script_dir=`dirname $0`
+conf_closed_script_dir="$conf_script_dir/../../jdk/make/closed/autoconf"
 
-    if test x$as_have_required = xno; then :
-  $as_echo "$0: This script requires a shell more modern than all"
-  $as_echo "$0: the shells that I found on your system."
-  if test x${ZSH_VERSION+set} = xset ; then
-    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
-    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
-  else
-    $as_echo "$0: Please tell bug-autoconf@gnu.org and
-$0: build-infra-dev@openjdk.java.net about your system,
-$0: including any error possibly output before this
-$0: message. Then install a modern shell, or manually run
-$0: the script under such a shell if you do have one."
-  fi
-  exit 1
-fi
-fi
-fi
-SHELL=${CONFIG_SHELL-/bin/sh}
-export SHELL
-# Unset more variables known to interfere with behavior of common tools.
-CLICOLOR_FORCE= GREP_OPTIONS=
-unset CLICOLOR_FORCE GREP_OPTIONS
-
-## --------------------- ##
-## M4sh Shell Functions. ##
-## --------------------- ##
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
-  { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
-  return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
-  set +e
-  as_fn_set_status $1
-  exit $1
-} # as_fn_exit
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || eval $as_mkdir_p || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
+###
+### Test that the generated configure is up-to-date
+###
 
-} # as_fn_mkdir_p
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
-  eval 'as_fn_append ()
-  {
-    eval $1+=\$2
-  }'
-else
-  as_fn_append ()
-  {
-    eval $1=\$$1\$2
-  }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
-  eval 'as_fn_arith ()
-  {
-    as_val=$(( $* ))
-  }'
-else
-  as_fn_arith ()
-  {
-    as_val=`expr "$@" || test $? -eq 1`
-  }
-fi # as_fn_arith
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
-  as_status=$1; test $as_status -eq 0 && as_status=1
-  if test "$4"; then
-    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
-  fi
-  $as_echo "$as_me: error: $2" >&2
-  as_fn_exit $as_status
-} # as_fn_error
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
+# On Solaris /bin/sh doesn't support test -nt but /usr/bin/test does.
+TEST=`which test`
 
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-
-  as_lineno_1=$LINENO as_lineno_1a=$LINENO
-  as_lineno_2=$LINENO as_lineno_2a=$LINENO
-  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
-  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
-  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
-    sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
-      N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
-      t loop
-      s/-\n.*//
-    ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
-  # Exit status is that of the last command.
-  exit
+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_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
-  case `echo 'xy\c'` in
-  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  xy)  ECHO_C='\c';;
-  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
-       ECHO_T='	';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
-  if ln -s conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s='ln -s'
-    # ... but there are two gotchas:
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
-    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
-  elif ln conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s=ln
-  else
-    as_ln_s='cp -p'
-  fi
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p='mkdir -p "$as_dir"'
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-	test -d "$1/.";
-      else
-	case $1 in #(
-	-*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-test -n "$DJDIR" || exec 7<&0 </dev/null
-exec 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-
-# Identity of this package.
-PACKAGE_NAME='openjdk'
-PACKAGE_TARNAME='openjdk'
-PACKAGE_VERSION='version-0.1'
-PACKAGE_STRING='openjdk version-0.1'
-PACKAGE_BUGREPORT='build-infra-dev@openjdk.java.net'
-PACKAGE_URL=''
-
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
-#endif
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-#  include <memory.h>
-# endif
-# include <string.h>
-#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
-
-ac_subst_vars='LTLIBOBJS
-LIBOBJS
-CACERTS_FILE
-TEST_IN_BUILD
-SALIB_NAME
-OS_VERSION_MICRO
-OS_VERSION_MINOR
-OS_VERSION_MAJOR
-LIBCXX
-LDFLAGS_JDKEXE_SUFFIX
-LDFLAGS_JDKLIB_SUFFIX
-LDFLAGS_JDKEXE
-LDFLAGS_JDKLIB
-CXXFLAGS_JDKEXE
-CXXFLAGS_JDKLIB
-CFLAGS_JDKEXE
-CFLAGS_JDKLIB
-PACKAGE_PATH
-IMAGES_MAKE_ARGS
-IMAGES_OUTPUTDIR
-JDK_MAKE_ARGS
-JDK_OUTPUTDIR
-HOTSPOT_MAKE_ARGS
-HOTSPOT_DIST
-HOTSPOT_OUTPUTDIR
-JAXWS_MAKE_ARGS
-JAXWS_DIST
-JAXWS_OUTPUTDIR
-JAXP_MAKE_ARGS
-JAXP_DIST
-JAXP_OUTPUTDIR
-CORBA_MAKE_ARGS
-CORBA_DIST
-CORBA_OUTPUTDIR
-LANGTOOLS_MAKE_ARGS
-LANGTOOLS_DIST
-LANGTOOLS_OUTPUTDIR
-CXX_FLAG_DEPS
-C_FLAG_DEPS
-CXX_O_FLAG_NONE
-CXX_O_FLAG_NORM
-CXX_O_FLAG_HI
-CXX_O_FLAG_HIGHEST
-C_O_FLAG_NONE
-C_O_FLAG_NORM
-C_O_FLAG_HI
-C_O_FLAG_HIGHEST
-DISABLE_NIMBUS
-GENERATE_DOCS
-ENABLE_DOCS
-LIBDL
-LIBM
-USE_EXTERNAL_LIBZ
-USE_EXTERNAL_LIBGIF
-USE_EXTERNAL_LIBJPEG
-PULSE_LIBS
-PULSE_CFLAGS
-LIBPULSE_LIBS
-LIBPULSE_CFLAGS
-ALSA_LIBS
-ALSA_CFLAGS
-FREETYPE2_LIB_PATH
-USING_SYSTEM_FT_LIB
-FREETYPE2_LIBS
-FREETYPE2_CFLAGS
-CUPS_LIBS
-CUPS_CFLAGS
-OPENWIN_HOME
-X_EXTRA_LIBS
-X_LIBS
-X_PRE_LIBS
-X_CFLAGS
-XMKMF
-JAVAC_USE_MODE
-JAVAC_USE_DEPS
-JAVAC_SERVER_CORES
-JAVAC_SERVERS
-JAVAC_USE_REMOTE
-SERVER_JAVA
-BOOT_JDK_JVMARGS
-OVERRIDE_SRC_ROOT
-ADD_SRC_ROOT
-NATIVE2ASCII
-RMIC
-JAR
-JAVAH
-JAVAC_FLAGS
-JAVAC
-BOOT_JDK_SOURCETARGET
-JAVA
-BOOT_TOOLSJAR
-BOOT_RTJAR
-BOOT_JDK
-JAVA_CHECK
-JAVAC_CHECK
-ENDIAN
-POST_MCS_CMD
-POST_STRIP_CMD
-SET_SHARED_LIBRARY_ORIGIN
-CXX_FLAG_REORDER
-C_FLAG_REORDER
-SET_SHARED_LIBRARY_MAPFILE
-SET_SHARED_LIBRARY_NAME
-SHARED_LIBRARY_FLAGS
-EXE_SUFFIX
-STATIC_LIBRARY_SUFFIX
-SHARED_LIBRARY_SUFFIX
-LIBRARY_PREFIX
-STATIC_LIBRARY
-SHARED_LIBRARY
-OBJ_SUFFIX
-USE_PRECOMPILED_HEADER
-ARCH_DATA_MODEL
-LP64
-BUILD_LOG_WRAPPER
-BUILD_LOG
-CCACHE
-UNCYGDRIVE
-MCS
-STRIP
-NM
-ASFLAGS
-AS
-CXXCPP
-CPP
-COMPILER_TYPE
-RC_FLAGS
-DUMPBIN
-WINAR
-RC
-MT
-WINLD
-ARFLAGS
-AR
-LDEXECXX
-LDCXX
-LDEXE
-LD
-ac_ct_OBJC
-OBJCFLAGS
-OBJC
-ac_ct_CXX
-CXXFLAGS
-CXX
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
-HOSTCXX
-HOSTCC
-HOST_CXX
-HOST_CC
-DEFINE_CROSS_COMPILE_ARCH
-AR_OUT_OPTION
-LD_OUT_OPTION
-EXE_OUT_OPTION
-CC_OUT_OPTION
-SYS_ROOT
-BDEPS_FTP
-BDEPS_UNZIP
-PKG_CONFIG
-JDK_TOPDIR
-HOTSPOT_TOPDIR
-JAXWS_TOPDIR
-JAXP_TOPDIR
-CORBA_TOPDIR
-LANGTOOLS_TOPDIR
-OUTPUT_ROOT
-CONF_NAME
-SPEC
-MSVCR100DLL
-CHECK_FOR_VCINSTALLDIR
-SETUPDEVENV
-COOKED_BUILD_NUMBER
-FULL_VERSION
-RELEASE
-JDK_VERSION
-RUNTIME_NAME
-COPYRIGHT_YEAR
-COMPANY_NAME
-JDK_RC_PLATFORM_NAME
-PRODUCT_SUFFIX
-PRODUCT_NAME
-LAUNCHER_NAME
-MILESTONE
-JDK_BUILD_NUMBER
-JDK_UPDATE_VERSION
-JDK_MICRO_VERSION
-JDK_MINOR_VERSION
-JDK_MAJOR_VERSION
-BUILD_VARIANT_RELEASE
-DEBUG_CLASSFILES
-FASTDEBUG
-VARIANT
-DEBUG_LEVEL
-JVM_VARIANT_ZEROSHARK
-JVM_VARIANT_ZERO
-JVM_VARIANT_KERNEL
-JVM_VARIANT_CLIENT
-JVM_VARIANT_SERVER
-JVM_VARIANTS
-BUILD_HEADLESS_ONLY
-BUILD_HEADLESS
-SUPPORT_HEADFUL
-SUPPORT_HEADLESS
-JDK_VARIANT
-MINIMIZE_RAM_USAGE
-JAVASE_EMBEDDED
-JIGSAW
-SET_OPENJDK
-PATH_SEP
-CYGPATH
-SRC_ROOT
-MEMORY_SIZE
-CONCURRENT_BUILD_JOBS
-NUM_CORES
-DATE_WHEN_CONFIGURED
-REQUIRED_OS_VERSION
-REQUIRED_OS_NAME
-LEGACY_BUILD_CPU3
-LEGACY_BUILD_CPU2
-LEGACY_BUILD_CPU1
-BUILD_CPU_ENDIAN
-BUILD_CPU_BITS
-BUILD_CPU_ARCH
-BUILD_CPU
-LEGACY_BUILD_OS_API
-BUILD_OS_API
-BUILD_OS_FAMILY
-BUILD_OS
-LEGACY_HOST_CPU3
-LEGACY_HOST_CPU2
-LEGACY_HOST_CPU1
-HOST_CPU_ENDIAN
-HOST_CPU_BITS
-HOST_CPU_ARCH
-HOST_CPU
-LEGACY_HOST_OS_API
-HOST_OS_API
-HOST_OS_FAMILY
-HOST_OS
-BUILD
-HOST
-host_os
-host_vendor
-host_cpu
-host
-build_os
-build_vendor
-build_cpu
-build
-HG
-FILE
-EXPR
-READELF
-OTOOL
-LDD
-UNZIP
-ZIP
-XARGS
-WC
-TOUCH
-TR
-TEE
-TAIL
-TAR
-SORT
-SH
-SED
-RM
-THEPWDCMD
-PRINTF
-NAWK
-MV
-MKDIR
-MAKE
-LS
-LN
-HEAD
-FIND_DELETE
-FIND
-FGREP
-EGREP
-GREP
-ECHO
-DIFF
-DF
-DATE
-CUT
-CPIO
-CP
-CHMOD
-CAT
-AWK
-READLINK
-CONFIGURE_COMMAND_LINE
-PKGHANDLER
-target_alias
-host_alias
-build_alias
-LIBS
-ECHO_T
-ECHO_N
-ECHO_C
-DEFS
-mandir
-localedir
-libdir
-psdir
-pdfdir
-dvidir
-htmldir
-infodir
-docdir
-oldincludedir
-includedir
-localstatedir
-sharedstatedir
-sysconfdir
-datadir
-datarootdir
-libexecdir
-sbindir
-bindir
-program_transform_name
-prefix
-exec_prefix
-PACKAGE_URL
-PACKAGE_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
-PATH_SEPARATOR
-SHELL'
-ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-with_data_model
-with_num_cores
-with_memory_size
-enable_openjdk_only
-enable_jigsaw
-with_jdk_variant
-enable_headful
-with_jvm_variants
-enable_debug
-with_debug_level
-with_msvcr100dll
-with_builddeps_conf
-with_builddeps_server
-with_builddeps_dir
-with_builddeps_group
-enable_list_builddeps
-with_sys_root
-enable_ccache
-with_ccache_dir
-enable_precompiled_headers
-with_boot_jdk
-with_add_source_root
-with_override_source_root
-with_adds_and_overrides
-with_override_langtools
-with_override_corba
-with_override_jaxp
-with_override_jaxws
-with_override_hotspot
-with_override_jdk
-with_boot_jdk_jvmargs
-with_server_java
-enable_javac_server
-with_javac_server_cores
-enable_javac_deps
-enable_javac_multi_core
-enable_macosx_runtime_support
-with_x
-with_cups
-with_cups_include
-with_cups_lib
-with_freetype
-with_alsa
-with_alsa_include
-with_alsa_lib
-with_pulse
-with_pulse_include
-with_pulse_lib
-enable_docs
-enable_nimbus
-enable_static_link_stdc__
-enable_hotspot_test_in_build
-with_cacerts_file
-'
-      ac_precious_vars='build_alias
-host_alias
-target_alias
-PKG_CONFIG
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-CXX
-CXXFLAGS
-CCC
-OBJC
-OBJCFLAGS
-CPP
-CXXCPP
-XMKMF
-FREETYPE2_CFLAGS
-FREETYPE2_LIBS
-ALSA_CFLAGS
-ALSA_LIBS
-LIBPULSE_CFLAGS
-LIBPULSE_LIBS'
-
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-ac_unrecognized_opts=
-ac_unrecognized_sep=
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval $ac_prev=\$ac_option
-    ac_prev=
-    continue
-  fi
-
-  case $ac_option in
-  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *=)   ac_optarg= ;;
-  *)    ac_optarg=yes ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case $ac_dashdash$ac_option in
-  --)
-    ac_dashdash=yes ;;
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir=$ac_optarg ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build_alias ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build_alias=$ac_optarg ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file=$ac_optarg ;;
-
-  --config-cache | -C)
-    cache_file=config.cache ;;
-
-  -datadir | --datadir | --datadi | --datad)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=*)
-    datadir=$ac_optarg ;;
-
-  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
-  | --dataroo | --dataro | --datar)
-    ac_prev=datarootdir ;;
-  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
-  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
-    datarootdir=$ac_optarg ;;
-
-  -disable-* | --disable-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid feature name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"enable_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval enable_$ac_useropt=no ;;
-
-  -docdir | --docdir | --docdi | --doc | --do)
-    ac_prev=docdir ;;
-  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
-    docdir=$ac_optarg ;;
-
-  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
-    ac_prev=dvidir ;;
-  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
-    dvidir=$ac_optarg ;;
-
-  -enable-* | --enable-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid feature name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"enable_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval enable_$ac_useropt=\$ac_optarg ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix=$ac_optarg ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he | -h)
-    ac_init_help=long ;;
-  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
-    ac_init_help=recursive ;;
-  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
-    ac_init_help=short ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host_alias ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host_alias=$ac_optarg ;;
-
-  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
-    ac_prev=htmldir ;;
-  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
-  | --ht=*)
-    htmldir=$ac_optarg ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir=$ac_optarg ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir=$ac_optarg ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir=$ac_optarg ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir=$ac_optarg ;;
-
-  -localedir | --localedir | --localedi | --localed | --locale)
-    ac_prev=localedir ;;
-  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
-    localedir=$ac_optarg ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst | --locals)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
-    localstatedir=$ac_optarg ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir=$ac_optarg ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c | -n)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir=$ac_optarg ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix=$ac_optarg ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix=$ac_optarg ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix=$ac_optarg ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name=$ac_optarg ;;
-
-  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
-    ac_prev=pdfdir ;;
-  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
-    pdfdir=$ac_optarg ;;
-
-  -psdir | --psdir | --psdi | --psd | --ps)
-    ac_prev=psdir ;;
-  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
-    psdir=$ac_optarg ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir=$ac_optarg ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir=$ac_optarg ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site=$ac_optarg ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir=$ac_optarg ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir=$ac_optarg ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target_alias ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target_alias=$ac_optarg ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers | -V)
-    ac_init_version=: ;;
-
-  -with-* | --with-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid package name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"with_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval with_$ac_useropt=\$ac_optarg ;;
-
-  -without-* | --without-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid package name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"with_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval with_$ac_useropt=no ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes=$ac_optarg ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries=$ac_optarg ;;
-
-  -*) as_fn_error $? "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information"
-    ;;
-
-  *=*)
-    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
-    # Reject names that are not valid shell variable names.
-    case $ac_envvar in #(
-      '' | [0-9]* | *[!_$as_cr_alnum]* )
-      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
-    esac
-    eval $ac_envvar=\$ac_optarg
-    export $ac_envvar ;;
-
-  *)
-    # FIXME: should be removed in autoconf 3.0.
-    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
-    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  as_fn_error $? "missing argument to $ac_option"
-fi
-
-if test -n "$ac_unrecognized_opts"; then
-  case $enable_option_checking in
-    no) ;;
-    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
-    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
-  esac
-fi
-
-# Check all directory arguments for consistency.
-for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
-		datadir sysconfdir sharedstatedir localstatedir includedir \
-		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir
-do
-  eval ac_val=\$$ac_var
-  # Remove trailing slashes.
-  case $ac_val in
-    */ )
-      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
-      eval $ac_var=\$ac_val;;
-  esac
-  # Be sure to have absolute directory names.
-  case $ac_val in
-    [\\/$]* | ?:[\\/]* )  continue;;
-    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
-  esac
-  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
-  if test "x$build_alias" = x; then
-    cross_compiling=maybe
-    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used" >&2
-  elif test "x$build_alias" != "x$host_alias"; then
-    cross_compiling=yes
-  fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  as_fn_error $? "working directory cannot be determined"
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  as_fn_error $? "pwd does not report name of working directory"
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then the parent directory.
-  ac_confdir=`$as_dirname -- "$as_myself" ||
-$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_myself" : 'X\(//\)[^/]' \| \
-	 X"$as_myself" : 'X\(//\)$' \| \
-	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-  srcdir=$ac_confdir
-  if test ! -r "$srcdir/$ac_unique_file"; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r "$srcdir/$ac_unique_file"; then
-  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
-	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
-	pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
-  srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
-  eval ac_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_env_${ac_var}_value=\$${ac_var}
-  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
-  # 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 version-0.1 to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE.  See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
-  -h, --help              display this help and exit
-      --help=short        display options specific to this package
-      --help=recursive    display the short help of all the included packages
-  -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking ...' messages
-      --cache-file=FILE   cache test results in FILE [disabled]
-  -C, --config-cache      alias for \`--cache-file=config.cache'
-  -n, --no-create         do not create output files
-      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
-
-Installation directories:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
-  --bindir=DIR            user executables [EPREFIX/bin]
-  --sbindir=DIR           system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR        program executables [EPREFIX/libexec]
-  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
-  --libdir=DIR            object code libraries [EPREFIX/lib]
-  --includedir=DIR        C header files [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
-  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
-  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
-  --infodir=DIR           info documentation [DATAROOTDIR/info]
-  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
-  --mandir=DIR            man documentation [DATAROOTDIR/man]
-  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
-  --htmldir=DIR           html documentation [DOCDIR]
-  --dvidir=DIR            dvi documentation [DOCDIR]
-  --pdfdir=DIR            pdf documentation [DOCDIR]
-  --psdir=DIR             ps documentation [DOCDIR]
-_ACEOF
-
-  cat <<\_ACEOF
-
-X features:
-  --x-includes=DIR    X include files are in DIR
-  --x-libraries=DIR   X library files are in DIR
-
-System types:
-  --build=BUILD     configure for building on BUILD [guessed]
-  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-  case $ac_init_help in
-     short | recursive ) echo "Configuration of openjdk version-0.1:";;
-   esac
-  cat <<\_ACEOF
-
-Optional Features:
-  --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-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]
-  --enable-debug          set the debug level to fastdebug (shorthand for
-                          --with-debug-level=fastdebug) [disabled]
-  --enable-list-builddeps list all build dependencies known to the configure
-                          script
-  --disable-ccache        use ccache to speed up recompilations [enabled]
-  --disable-precompiled-headers
-                          use precompiled headers when compiling C++ [enabled]
-  --enable-javac-server   enable the shared javac server during the build
-                          process [disabled]
-  --enable-javac-deps     enable the dependency tracking between Java packages
-                          [disabled]
-  --enable-javac-multi-core
-                          compile Java packages concurrently [disabled]
-  --disable-macosx-runtime-support
-                          disable the use of MacOSX Java runtime support
-                          framework [enabled]
-  --enable-docs           enable generation of Javadoc documentation
-                          [disabled]
-  --disable-nimbus        disable Nimbus L&F [enabled]
-  --disable-static-link-stdc++
-                          disable static linking of the C++ runtime on Linux
-                          [enabled]
-  --enable-hotspot-test-in-build
-                          enable running of Queens test after Hotspot build
-                          (not yet available) [disabled]
-
-Optional Packages:
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-data-model       build 32-bit or 64-bit binaries (for platforms that
-                          support it), e.g. --with-data-model=32 [guessed]
-  --with-num-cores        number of cores in the build system, e.g.
-                          --with-num-cores=8 [probed]
-  --with-memory-size      memory (in MB) available in the build system, e.g.
-                          --with-memory-size=1024 [probed]
-  --with-jdk-variant      JDK variant to build (normal, embedded) [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-msvcr100dll      copy this msvcr100.dll into the built JDK
-  --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-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-ccache-dir       where to store ccache files [~/.ccache]
-  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
-  --with-add-source-root  for each and every source directory, look in this
-                          additional source root for the same directory; if it
-                          exists and have files in it, include it in the build
-  --with-override-source-root
-                          for each and every source directory, look in this
-                          override source root for the same directory; if it
-                          exists, use that directory instead and ignore the
-                          directory in the original source root
-  --with-adds-and-overrides
-                          use the subdirs 'adds' and 'overrides' in the
-                          specified directory as add-source-root and
-                          override-source-root
-  --with-override-langtools
-                          use this langtools dir for the build
-  --with-override-corba   use this corba dir for the build
-  --with-override-jaxp    use this jaxp dir for the build
-  --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-boot-jdk-jvmargs specify JVM arguments to be passed to all
-                          invocations of the Boot JDK, overriding the default
-                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
-                          -enableassertions"
-  --with-server-java      use this java binary for running the javac
-                          background server and other long running java tasks
-                          in the build process, e.g.
-                          ---with-server-java="/opt/jrockit/bin/java -server"
-  --with-javac-server-cores
-                          use at most this number of concurrent threads on the
-                          javac server [probed]
-  --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)
-  --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)
-  --with-alsa             specify prefix directory for the alsa package
-                          (expecting the libraries under PATH/lib and the
-                          headers under PATH/include)
-  --with-alsa-include     specify directory for the alsa include files
-  --with-alsa-lib         specify directory for the alsa library
-  --with-pulse            specify prefix directory for the pulseaudio package
-                          (expecting the libraries under PATH/lib and the
-                          headers under PATH/include)
-  --with-pulse-include    specify directory for the pulseaudio include files
-  --with-pulse-lib        specify directory for the pulseaudio library
-  --with-cacerts-file     specify alternative cacerts file
-
-Some influential environment variables:
-  PKG_CONFIG  path to pkg-config utility
-  CC          C compiler command
-  CFLAGS      C compiler flags
-  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
-              nonstandard directory <lib dir>
-  LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
-              you have headers in a nonstandard directory <include dir>
-  CXX         C++ compiler command
-  CXXFLAGS    C++ compiler flags
-  OBJC        Objective C compiler command
-  OBJCFLAGS   Objective C compiler flags
-  CPP         C preprocessor
-  CXXCPP      C++ preprocessor
-  XMKMF       Path to xmkmf, Makefile generator for X Window System
-  FREETYPE2_CFLAGS
-              C compiler flags for FREETYPE2, overriding pkg-config
-  FREETYPE2_LIBS
-              linker flags for FREETYPE2, overriding pkg-config
-  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
-  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
-  LIBPULSE_CFLAGS
-              C compiler flags for LIBPULSE, overriding pkg-config
-  LIBPULSE_LIBS
-              linker flags for LIBPULSE, overriding pkg-config
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-Report bugs to <build-infra-dev@openjdk.java.net>.
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
-  # If there are subdirs, report their specific --help.
-  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-    test -d "$ac_dir" ||
-      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
-      continue
-    ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-    cd "$ac_dir" || { ac_status=$?; continue; }
-    # Check for guested configure.
-    if test -f "$ac_srcdir/configure.gnu"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
-    elif test -f "$ac_srcdir/configure"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure" --help=recursive
-    else
-      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi || ac_status=$?
-    cd "$ac_pwd" || { ac_status=$?; break; }
-  done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
-  cat <<\_ACEOF
-openjdk configure version-0.1
-generated by GNU Autoconf 2.67
-
-Copyright (C) 2010 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
-  exit
-fi
-
-## ------------------------ ##
-## Autoconf initialization. ##
-## ------------------------ ##
-
-# ac_fn_c_try_compile LINENO
-# --------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext
-  if { { ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_retval=1
-fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_compile
-
-# ac_fn_cxx_try_compile LINENO
-# ----------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext
-  if { { ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_retval=1
-fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_compile
-
-# ac_fn_objc_try_compile LINENO
-# -----------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_objc_try_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext
-  if { { ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-	 test -z "$ac_objc_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_retval=1
-fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  as_fn_set_status $ac_retval
-
-} # ac_fn_objc_try_compile
-
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } > conftest.i && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-    ac_retval=1
-fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
-# ac_fn_cxx_try_cpp LINENO
-# ------------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_cpp ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } > conftest.i && {
-	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-    ac_retval=1
-fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_cpp
-
-# ac_fn_cxx_try_link LINENO
-# -------------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_link ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext conftest$ac_exeext
-  if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_retval=1
-fi
-  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
-  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
-  # interfere with the next link command; also delete a directory that is
-  # left behind by Apple's compiler.  We do this before executing the actions.
-  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_link
-
-# ac_fn_cxx_try_run LINENO
-# ------------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_cxx_try_run ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
-  { { case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-       $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_retval=$ac_status
-fi
-  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_run
-
-# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
-# ----------------------------------------------
-# Tries to find the compile-time value of EXPR in a program that includes
-# INCLUDES, setting VAR accordingly. Returns whether the value could be
-# computed
-ac_fn_cxx_compute_int ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if test "$cross_compiling" = yes; then
-    # Depending upon the size, compute the lo and hi bounds.
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) >= 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_hi=$ac_mid; break
-else
-  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
-			if test $ac_lo -le $ac_mid; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) < 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) >= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_lo=$ac_mid; break
-else
-  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
-			if test $ac_mid -le $ac_hi; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  ac_lo= ac_hi=
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_hi=$ac_mid
-else
-  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in #((
-?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
-'') ac_retval=1 ;;
-esac
-  else
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-static long int longval () { return $2; }
-static unsigned long int ulongval () { return $2; }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (($2) < 0)
-    {
-      long int i = longval ();
-      if (i != ($2))
-	return 1;
-      fprintf (f, "%ld", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ($2))
-	return 1;
-      fprintf (f, "%lu", i);
-    }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
-  return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_run "$LINENO"; then :
-  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
-else
-  ac_retval=1
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-rm -f conftest.val
-
-  fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_compute_int
-
-# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
-# ---------------------------------------------------------
-# Tests whether HEADER exists and can be compiled using the include files in
-# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_cxx_check_header_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $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
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_cxx_check_header_compile
-
-# ac_fn_cxx_check_func LINENO FUNC VAR
-# ------------------------------------
-# Tests whether FUNC exists, setting the cache variable VAR accordingly
-ac_fn_cxx_check_func ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $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
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $2 innocuous_$2
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $2 (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $2
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $2 ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$2 || defined __stub___$2
-choke me
-#endif
-
-int
-main ()
-{
-return $2 ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_cxx_check_func
-
-# ac_fn_c_check_header_mongrel 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 ()
-{
-  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
-/* end confdefs.h.  */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_header_compiler=yes
-else
-  ac_header_compiler=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-infra-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_cxx_check_header_mongrel 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_cxx_check_header_mongrel ()
-{
-  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
-/* end confdefs.h.  */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_header_compiler=yes
-else
-  ac_header_compiler=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_cxx_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_cxx_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-infra-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_cxx_check_header_mongrel
-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 version-0.1, which was
-generated by GNU Autoconf 2.67.  Invocation command line was
-
-  $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
-
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    $as_echo "PATH: $as_dir"
-  done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
-  for ac_arg
-  do
-    case $ac_arg in
-    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-    | -silent | --silent | --silen | --sile | --sil)
-      continue ;;
-    *\'*)
-      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    case $ac_pass in
-    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
-    2)
-      as_fn_append ac_configure_args1 " '$ac_arg'"
-      if test $ac_must_keep_next = true; then
-	ac_must_keep_next=false # Got value, back to normal.
-      else
-	case $ac_arg in
-	  *=* | --config-cache | -C | -disable-* | --disable-* \
-	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
-	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
-	  | -with-* | --with-* | -without-* | --without-* | --x)
-	    case "$ac_configure_args0 " in
-	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
-	    esac
-	    ;;
-	  -* ) ac_must_keep_next=true ;;
-	esac
-      fi
-      as_fn_append ac_configure_args " '$ac_arg'"
-      ;;
-    esac
-  done
-done
-{ ac_configure_args0=; unset ac_configure_args0;}
-{ ac_configure_args1=; unset ac_configure_args1;}
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log.  We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
-  # Save into config.log some information that might help in debugging.
-  {
-    echo
-
-    $as_echo "## ---------------- ##
-## Cache variables. ##
-## ---------------- ##"
-    echo
-    # The following way of writing the cache mishandles newlines in values,
-(
-  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) { eval $ac_var=; unset $ac_var;} ;;
-      esac ;;
-    esac
-  done
-  (set) 2>&1 |
-    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      sed -n \
-	"s/'\''/'\''\\\\'\'''\''/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
-      ;; #(
-    *)
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-)
-    echo
-
-    $as_echo "## ----------------- ##
-## Output variables. ##
-## ----------------- ##"
-    echo
-    for ac_var in $ac_subst_vars
-    do
-      eval ac_val=\$$ac_var
-      case $ac_val in
-      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-      esac
-      $as_echo "$ac_var='\''$ac_val'\''"
-    done | sort
-    echo
-
-    if test -n "$ac_subst_files"; then
-      $as_echo "## ------------------- ##
-## File substitutions. ##
-## ------------------- ##"
-      echo
-      for ac_var in $ac_subst_files
-      do
-	eval ac_val=\$$ac_var
-	case $ac_val in
-	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-	esac
-	$as_echo "$ac_var='\''$ac_val'\''"
-      done | sort
-      echo
-    fi
-
-    if test -s confdefs.h; then
-      $as_echo "## ----------- ##
-## confdefs.h. ##
-## ----------- ##"
-      echo
-      cat confdefs.h
-      echo
-    fi
-    test "$ac_signal" != 0 &&
-      $as_echo "$as_me: caught signal $ac_signal"
-    $as_echo "$as_me: exit $exit_status"
-  } >&5
-  rm -f core *.core core.conftest.* &&
-    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
-    exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
-  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-$as_echo "/* confdefs.h */" > confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
-  # We do not want a PATH search for config.site.
-  case $CONFIG_SITE in #((
-    -*)  ac_site_file1=./$CONFIG_SITE;;
-    */*) ac_site_file1=$CONFIG_SITE;;
-    *)   ac_site_file1=./$CONFIG_SITE;;
-  esac
-elif test "x$prefix" != xNONE; then
-  ac_site_file1=$prefix/share/config.site
-  ac_site_file2=$prefix/etc/config.site
-else
-  ac_site_file1=$ac_default_prefix/share/config.site
-  ac_site_file2=$ac_default_prefix/etc/config.site
-fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
-  test "x$ac_site_file" = xNONE && continue
-  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
-    sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file" \
-      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5 ; }
+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 -r "$cache_file"; then
-  # Some versions of bash will fail to source /dev/null (special files
-  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
-  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
-    case $cache_file in
-      [\\/]* | ?:[\\/]* ) . "$cache_file";;
-      *)                      . "./$cache_file";;
-    esac
-  fi
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
-  >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
-  eval ac_old_set=\$ac_cv_env_${ac_var}_set
-  eval ac_new_set=\$ac_env_${ac_var}_set
-  eval ac_old_val=\$ac_cv_env_${ac_var}_value
-  eval ac_new_val=\$ac_env_${ac_var}_value
-  case $ac_old_set,$ac_new_set in
-    set,)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,set)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,);;
-    *)
-      if test "x$ac_old_val" != "x$ac_new_val"; then
-	# differences in whitespace do not lead to failure.
-	ac_old_val_w=`echo x $ac_old_val`
-	ac_new_val_w=`echo x $ac_new_val`
-	if test "$ac_old_val_w" != "$ac_new_val_w"; then
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-	  ac_cache_corrupted=:
-	else
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
-	  eval $ac_var=\$ac_old_val
-	fi
-	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
-$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
-	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
-$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
-      fi;;
-  esac
-  # Pass precious variables to config.status.
-  if test "$ac_new_set" = set; then
-    case $ac_new_val in
-    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
-    *) ac_arg=$ac_var=$ac_new_val ;;
-    esac
-    case " $ac_configure_args " in
-      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
-      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
-    esac
-  fi
-done
-if $ac_cache_corrupted; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
-fi
-## -------------------- ##
-## Main body of script. ##
-## -------------------- ##
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-ac_aux_dir=
-for ac_dir in build-aux "$srcdir"/build-aux; do
-  if test -f "$ac_dir/install-sh"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f "$ac_dir/install.sh"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  elif test -f "$ac_dir/shtool"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/shtool install -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
-
-
-
-# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
-#
-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program 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 for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-# PKG_PROG_PKG_CONFIG
-
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists.  Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-#
-# Similar to PKG_CHECK_MODULES, make sure that the first instance of
-# this or PKG_CHECK_MODULES is called, or make sure to call
-# PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-
-
-
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-# _PKG_CONFIG
-
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
-# _PKG_SHORT_ERRORS_SUPPORTED
-
-
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
-#
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-#
-# --------------------------------------------------------------
-# PKG_CHECK_MODULES
-
-#
-# 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.
-#
-
-
-
-
-
-
-
-
-
-#
-# 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.
-#
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Fixes paths on windows hosts to be mixed mode short.
-
-
-
-
-#
-# 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.
-#
-
-
-
-
-
-#
-# 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.
-#
-
-function prepare_help_system {
-    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
-
-}
-
-function help_on_build_dependency {
-    # Print a helpful message on how to acquire the necessary build dependency.
-    # $1 is the help tag: freetyp2, cups, pulse, alsa etc
-    MISSING_DEPENDENCY=$1
-    PKGHANDLER_COMMAND=
-
-    case $PKGHANDLER in
-	apt-get)
-                apt_help     $MISSING_DEPENDENCY ;;
-    yum)
-                yum_help     $MISSING_DEPENDENCY ;;
-	port)
-                port_help    $MISSING_DEPENDENCY ;;
-	pkgutil)
-                pkgutil_help $MISSING_DEPENDENCY ;;
-	pkgadd)
-                pkgadd_help  $MISSING_DEPENDENCY ;;
-    * )
-      break ;;
-    esac
-
-    if test "x$PKGHANDLER_COMMAND" != x; then
-        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+if $TEST -e $conf_closed_script_dir/generated-configure.sh; then
+  # If closed source configure is available, make sure it is up-to-date as well.
+  for file in configure.ac *.m4 $conf_closed_script_dir/*.m4; do
+    if $TEST $file -nt $conf_closed_script_dir/generated-configure.sh; then
+      print_error_not_up_to_date
+      exit 1
     fi
-}
-
-function apt_help {
-    case $1 in
-    devkit)
-        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
-    openjdk)
-        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
-    alsa)
-        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
-    cups)
-        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
-    freetype2)
-        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
-    pulse)
-        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
-    x11)
-        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
-    ccache)
-        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
-    * )
-       break ;;
-    esac
-}
-
-function yum_help {
-    case $1 in
-    devkit)
-        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
-    openjdk)
-        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
-    alsa)
-        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
-    cups)
-        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
-    freetype2)
-        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
-    pulse)
-        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
-    x11)
-        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
-    ccache)
-        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
-    * )
-       break ;;
-    esac
-}
-
-function port_help {
-    PKGHANDLER_COMMAND=""
-}
-
-function pkgutil_help {
-    PKGHANDLER_COMMAND=""
-}
-
-function pkgadd_help {
-    PKGHANDLER_COMMAND=""
-}
-
-
-# Save the command line. Do this very early, before it is lost by calling autoconf macros.
-CONFIGURE_COMMAND_LINE="$@"
-
-
-# Locate the directory of this script.
-SCRIPT="$0"
-
-    if test "x$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`
-
-# 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.
-for ac_prog in gawk mawk nawk awk
-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_AWK+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # 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_AWK="$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
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$AWK" && break
-done
-
-
-    # Test that variable AWK is not empty.
-    if test "" = "$AWK"; then as_fn_error $? "Could not find awk !" "$LINENO" 5 ; fi
-
-# Extract the first word of "cat", so it can be a program name with args.
-set dummy cat; 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_CAT+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $CAT in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_CAT="$CAT" # 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_CAT="$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
-CAT=$ac_cv_path_CAT
-if test -n "$CAT"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
-$as_echo "$CAT" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Test that variable CAT is not empty.
-    if test "" = "$CAT"; then as_fn_error $? "Could not find cat !" "$LINENO" 5 ; fi
-
-# Extract the first word of "chmod", so it can be a program name with args.
-set dummy chmod; 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_CHMOD+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $CHMOD in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_CHMOD="$CHMOD" # 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_CHMOD="$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
-CHMOD=$ac_cv_path_CHMOD
-if test -n "$CHMOD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
-$as_echo "$CHMOD" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Test that variable CHMOD is not empty.
-    if test "" = "$CHMOD"; then as_fn_error $? "Could not find chmod !" "$LINENO" 5 ; fi
-
-# Extract the first word of "cp", so it can be a program name with args.
-set dummy cp; 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_CP+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $CP in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_CP="$CP" # 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_CP="$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
-CP=$ac_cv_path_CP
-if test -n "$CP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
-$as_echo "$CP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Test that variable CP is not empty.
-    if test "" = "$CP"; then as_fn_error $? "Could not find cp !" "$LINENO" 5 ; fi
-
-# Extract the first word of "cpio", so it can be a program name with args.
-set dummy cpio; 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 that variable CPIO is not empty.
-    if test "" = "$CPIO"; then as_fn_error $? "Could not find cpio !" "$LINENO" 5 ; fi
-
-# Extract the first word of "cut", so it can be a program name with args.
-set dummy cut; 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_CUT+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $CUT in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_CUT="$CUT" # 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_CUT="$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
-CUT=$ac_cv_path_CUT
-if test -n "$CUT"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
-$as_echo "$CUT" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Test that variable CUT is not empty.
-    if test "" = "$CUT"; then as_fn_error $? "Could not find cut !" "$LINENO" 5 ; fi
-
-# Extract the first word of "date", so it can be a program name with args.
-set dummy date; 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_DATE+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $DATE in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_DATE="$DATE" # 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_DATE="$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
-DATE=$ac_cv_path_DATE
-if test -n "$DATE"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
-$as_echo "$DATE" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Test that variable DATE is not empty.
-    if test "" = "$DATE"; then as_fn_error $? "Could not find date !" "$LINENO" 5 ; 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
-
-
-
-    # Test that variable DF is not empty.
-    if test "" = "$DF"; then as_fn_error $? "Could not find df !" "$LINENO" 5 ; fi
-
-# Extract the first word of "diff", so it can be a program name with args.
-set dummy diff; 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_DIFF+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $DIFF in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_DIFF="$DIFF" # 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_DIFF="$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
-DIFF=$ac_cv_path_DIFF
-if test -n "$DIFF"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
-$as_echo "$DIFF" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Test that variable DIFF is not empty.
-    if test "" = "$DIFF"; then as_fn_error $? "Could not find diff !" "$LINENO" 5 ; fi
-
-# Warning echo is really, really unportable!!!!! Different
-# behaviour in bash and dash and in a lot of other shells!
-# Use printf for serious work!
-# Extract the first word of "echo", so it can be a program name with args.
-set dummy echo; 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_ECHO+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $ECHO in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ECHO="$ECHO" # 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_ECHO="$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
-ECHO=$ac_cv_path_ECHO
-if test -n "$ECHO"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
-$as_echo "$ECHO" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Test that variable ECHO is not empty.
-    if test "" = "$ECHO"; then as_fn_error $? "Could not find echo !" "$LINENO" 5 ; fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$GREP"; then
-  ac_path_GREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in grep ggrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-# Check for GNU ac_path_GREP and select it if it is found.
-  # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'GREP' >> "conftest.nl"
-    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_GREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_GREP="$ac_path_GREP"
-      ac_path_GREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_GREP_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_GREP"; then
-    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-  fi
-else
-  ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-   then ac_cv_path_EGREP="$GREP -E"
-   else
-     if test -z "$EGREP"; then
-  ac_path_EGREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in egrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
-  # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'EGREP' >> "conftest.nl"
-    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_EGREP="$ac_path_EGREP"
-      ac_path_EGREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_EGREP_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_EGREP"; then
-    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-  fi
-else
-  ac_cv_path_EGREP=$EGREP
-fi
-
-   fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-
-    # Test that variable EGREP is not empty.
-    if test "" = "$EGREP"; then as_fn_error $? "Could not find egrep !" "$LINENO" 5 ; fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
-$as_echo_n "checking for fgrep... " >&6; }
-if test "${ac_cv_path_FGREP+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
-   then ac_cv_path_FGREP="$GREP -F"
-   else
-     if test -z "$FGREP"; then
-  ac_path_FGREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in fgrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
-# Check for GNU ac_path_FGREP and select it if it is found.
-  # Check for GNU $ac_path_FGREP
-case `"$ac_path_FGREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'FGREP' >> "conftest.nl"
-    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_FGREP="$ac_path_FGREP"
-      ac_path_FGREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_FGREP_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_FGREP"; then
-    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-  fi
-else
-  ac_cv_path_FGREP=$FGREP
-fi
-
-   fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
-$as_echo "$ac_cv_path_FGREP" >&6; }
- FGREP="$ac_cv_path_FGREP"
-
-
-
-    # Test that variable FGREP is not empty.
-    if test "" = "$FGREP"; then as_fn_error $? "Could not find fgrep !" "$LINENO" 5 ; fi
-
-
-# Extract the first word of "find", so it can be a program name with args.
-set dummy find; 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_FIND+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $FIND in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_FIND="$FIND" # 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_FIND="$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
-FIND=$ac_cv_path_FIND
-if test -n "$FIND"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
-$as_echo "$FIND" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Test that variable FIND is not empty.
-    if test "" = "$FIND"; then as_fn_error $? "Could not find find !" "$LINENO" 5 ; fi
-
-
-    # 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
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$GREP"; then
-  ac_path_GREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in grep ggrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-# Check for GNU ac_path_GREP and select it if it is found.
-  # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'GREP' >> "conftest.nl"
-    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_GREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_GREP="$ac_path_GREP"
-      ac_path_GREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_GREP_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_GREP"; then
-    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-  fi
-else
-  ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-
-    # Test that variable GREP is not empty.
-    if test "" = "$GREP"; then as_fn_error $? "Could not find grep !" "$LINENO" 5 ; fi
 
-# Extract the first word of "head", so it can be a program name with args.
-set dummy head; 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_HEAD+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $HEAD in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_HEAD="$HEAD" # 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_HEAD="$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
-HEAD=$ac_cv_path_HEAD
-if test -n "$HEAD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
-$as_echo "$HEAD" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Test that variable HEAD is not empty.
-    if test "" = "$HEAD"; then as_fn_error $? "Could not find head !" "$LINENO" 5 ; fi
-
-# Extract the first word of "ln", so it can be a program name with args.
-set dummy ln; 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_LN+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $LN in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_LN="$LN" # 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_LN="$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
-LN=$ac_cv_path_LN
-if test -n "$LN"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
-$as_echo "$LN" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Test that variable LN is not empty.
-    if test "" = "$LN"; then as_fn_error $? "Could not find ln !" "$LINENO" 5 ; fi
-
-# Extract the first word of "ls", so it can be a program name with args.
-set dummy ls; 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_LS+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $LS in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_LS="$LS" # 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_LS="$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
-LS=$ac_cv_path_LS
-if test -n "$LS"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
-$as_echo "$LS" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Test that variable LS is not empty.
-    if test "" = "$LS"; then as_fn_error $? "Could not find ls !" "$LINENO" 5 ; fi
-
-for ac_prog in gmake 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_MAKE+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $MAKE in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_MAKE="$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_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
-MAKE=$ac_cv_path_MAKE
-if test -n "$MAKE"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
-$as_echo "$MAKE" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$MAKE" && break
-done
-
-
-    # Test that variable MAKE is not empty.
-    if test "" = "$MAKE"; then as_fn_error $? "Could not find make !" "$LINENO" 5 ; fi
-
-MAKE_VERSION=`$MAKE --version | head -n 1 | grep '3.8[12346789]'`
-if test "x$MAKE_VERSION" = x; then
-    as_fn_error $? "You must use GNU make 3.81 or newer! Please put it in the path." "$LINENO" 5
-fi
-# Extract the first word of "mkdir", so it can be a program name with args.
-set dummy mkdir; 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_MKDIR+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $MKDIR in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_MKDIR="$MKDIR" # 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_MKDIR="$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
-MKDIR=$ac_cv_path_MKDIR
-if test -n "$MKDIR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
-$as_echo "$MKDIR" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Test that variable MKDIR is not empty.
-    if test "" = "$MKDIR"; then as_fn_error $? "Could not find mkdir !" "$LINENO" 5 ; fi
-
-# Extract the first word of "mv", so it can be a program name with args.
-set dummy mv; 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_MV+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $MV in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_MV="$MV" # 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_MV="$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
-MV=$ac_cv_path_MV
-if test -n "$MV"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
-$as_echo "$MV" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Test that variable MV is not empty.
-    if test "" = "$MV"; then as_fn_error $? "Could not find mv !" "$LINENO" 5 ; fi
-
-for ac_prog in nawk gawk awk
-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_NAWK+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $NAWK in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_NAWK="$NAWK" # 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_NAWK="$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
-NAWK=$ac_cv_path_NAWK
-if test -n "$NAWK"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
-$as_echo "$NAWK" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$NAWK" && break
-done
-
-
-    # Test that variable NAWK is not empty.
-    if test "" = "$NAWK"; then as_fn_error $? "Could not find nawk !" "$LINENO" 5 ; fi
-
-# Extract the first word of "printf", so it can be a program name with args.
-set dummy printf; 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_PRINTF+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $PRINTF in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PRINTF="$PRINTF" # 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_PRINTF="$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
-PRINTF=$ac_cv_path_PRINTF
-if test -n "$PRINTF"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
-$as_echo "$PRINTF" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Test that variable PRINTF is not empty.
-    if test "" = "$PRINTF"; then as_fn_error $? "Could not find printf !" "$LINENO" 5 ; fi
-
-# 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 "rm", so it can be a program name with args.
-set dummy rm; 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 that variable RM is not empty.
-    if test "" = "$RM"; then as_fn_error $? "Could not find rm !" "$LINENO" 5 ; fi
-
-RM="$RM -f"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
-$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if test "${ac_cv_path_SED+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
-     for ac_i in 1 2 3 4 5 6 7; do
-       ac_script="$ac_script$as_nl$ac_script"
-     done
-     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
-     { ac_script=; unset ac_script;}
-     if test -z "$SED"; then
-  ac_path_SED_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  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_prog in sed gsed; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
-# Check for GNU ac_path_SED and select it if it is found.
-  # Check for GNU $ac_path_SED
-case `"$ac_path_SED" --version 2>&1` in
-*GNU*)
-  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo '' >> "conftest.nl"
-    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_SED_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_SED="$ac_path_SED"
-      ac_path_SED_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_SED_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_SED"; then
-    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
-  fi
-else
-  ac_cv_path_SED=$SED
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
- SED="$ac_cv_path_SED"
-  rm -f conftest.sed
-
-
-    # Test that variable SED is not empty.
-    if test "" = "$SED"; then as_fn_error $? "Could not find sed !" "$LINENO" 5 ; fi
-
-# Extract the first word of "sh", so it can be a program name with args.
-set dummy sh; 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_SH+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $SH in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_SH="$SH" # 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_SH="$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
-SH=$ac_cv_path_SH
-if test -n "$SH"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
-$as_echo "$SH" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Test that variable SH is not empty.
-    if test "" = "$SH"; then as_fn_error $? "Could not find sh !" "$LINENO" 5 ; fi
-
-# Extract the first word of "sort", so it can be a program name with args.
-set dummy sort; 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_SORT+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $SORT in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_SORT="$SORT" # 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_SORT="$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
-SORT=$ac_cv_path_SORT
-if test -n "$SORT"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
-$as_echo "$SORT" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Test that variable SORT is not empty.
-    if test "" = "$SORT"; then as_fn_error $? "Could not find sort !" "$LINENO" 5 ; fi
-
-# Extract the first word of "tar", so it can be a program name with args.
-set dummy tar; 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_TAR+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $TAR in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_TAR="$TAR" # 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_TAR="$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
+  # Test if open configure is newer than closed configure, if so, closed needs to
+  # be regenerated.
+  conf_open_configure_timestamp=`grep DATE_WHEN_GENERATED: $conf_script_dir/generated-configure.sh  | cut -d" " -f 3`
+  conf_closed_configure_timestamp=`grep DATE_WHEN_GENERATED: $conf_closed_script_dir/generated-configure.sh  | cut -d" " -f 3`
+  if $TEST $conf_open_configure_timestamp -gt $conf_closed_configure_timestamp; then
+    print_error_not_up_to_date
+    exit 1
   fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-TAR=$ac_cv_path_TAR
-if test -n "$TAR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
-$as_echo "$TAR" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Test that variable TAR is not empty.
-    if test "" = "$TAR"; then as_fn_error $? "Could not find tar !" "$LINENO" 5 ; fi
-
-# Extract the first word of "tail", so it can be a program name with args.
-set dummy tail; 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_TAIL+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $TAIL in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_TAIL="$TAIL" # 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_TAIL="$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
-TAIL=$ac_cv_path_TAIL
-if test -n "$TAIL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
-$as_echo "$TAIL" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Test that variable TAIL is not empty.
-    if test "" = "$TAIL"; then as_fn_error $? "Could not find tail !" "$LINENO" 5 ; fi
-
-# Extract the first word of "tee", so it can be a program name with args.
-set dummy tee; 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_TEE+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $TEE in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_TEE="$TEE" # 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_TEE="$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
-TEE=$ac_cv_path_TEE
-if test -n "$TEE"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
-$as_echo "$TEE" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Test that variable TEE is not empty.
-    if test "" = "$TEE"; then as_fn_error $? "Could not find tee !" "$LINENO" 5 ; fi
-
-# Extract the first word of "tr", so it can be a program name with args.
-set dummy tr; 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_TR+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $TR in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_TR="$TR" # 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_TR="$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
-TR=$ac_cv_path_TR
-if test -n "$TR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
-$as_echo "$TR" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Test that variable TR is not empty.
-    if test "" = "$TR"; then as_fn_error $? "Could not find tr !" "$LINENO" 5 ; fi
-
-# Extract the first word of "touch", so it can be a program name with args.
-set dummy touch; 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_TOUCH+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $TOUCH in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_TOUCH="$TOUCH" # 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_TOUCH="$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
-TOUCH=$ac_cv_path_TOUCH
-if test -n "$TOUCH"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
-$as_echo "$TOUCH" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Test that variable TOUCH is not empty.
-    if test "" = "$TOUCH"; then as_fn_error $? "Could not find touch !" "$LINENO" 5 ; fi
-
-# Extract the first word of "wc", so it can be a program name with args.
-set dummy wc; 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_WC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $WC in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_WC="$WC" # 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_WC="$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
-WC=$ac_cv_path_WC
-if test -n "$WC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
-$as_echo "$WC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Test that variable WC is not empty.
-    if test "" = "$WC"; then as_fn_error $? "Could not find wc !" "$LINENO" 5 ; fi
-
-# Extract the first word of "xargs", so it can be a program name with args.
-set dummy xargs; 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_XARGS+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $XARGS in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_XARGS="$XARGS" # 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_XARGS="$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
-XARGS=$ac_cv_path_XARGS
-if test -n "$XARGS"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
-$as_echo "$XARGS" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Test that variable XARGS is not empty.
-    if test "" = "$XARGS"; then as_fn_error $? "Could not find xargs !" "$LINENO" 5 ; fi
-
-# Extract the first word of "zip", so it can be a program name with args.
-set dummy zip; 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 that variable ZIP is not empty.
-    if test "" = "$ZIP"; then as_fn_error $? "Could not find zip !" "$LINENO" 5 ; fi
-
-# Extract the first word of "unzip", so it can be a program name with args.
-set dummy unzip; 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 that variable UNZIP is not empty.
-    if test "" = "$UNZIP"; then as_fn_error $? "Could not find unzip !" "$LINENO" 5 ; 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
-# Extract the first word of "readelf", so it can be a program name with args.
-set dummy readelf; 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
-
-
-# Extract the first word of "expr", so it can be a program name with args.
-set dummy expr; 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_EXPR+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $EXPR in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_EXPR="$EXPR" # 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_EXPR="$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
-EXPR=$ac_cv_path_EXPR
-if test -n "$EXPR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
-$as_echo "$EXPR" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Test that variable EXPR is not empty.
-    if test "" = "$EXPR"; then as_fn_error $? "Could not find expr !" "$LINENO" 5 ; fi
-
-# Extract the first word of "file", so it can be a program name with args.
-set dummy file; 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_FILE+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $FILE in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_FILE="$FILE" # 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_FILE="$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
-FILE=$ac_cv_path_FILE
-if test -n "$FILE"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
-$as_echo "$FILE" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Test that variable FILE is not empty.
-    if test "" = "$FILE"; then as_fn_error $? "Could not find file !" "$LINENO" 5 ; fi
-
-# 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
-
-
-
-# Figure out the build and host system.
-# 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
-
-
-
-
-# Check whether --with-data-model was given.
-if test "${with_data_model+set}" = set; then :
-  withval=$with_data_model;
+  
 fi
 
-
-if test "x$with_data_model" != x && \
-   test "x$with_data_model" != x32 && \
-   test "x$with_data_model" != x64 ; then
-    as_fn_error $? "The data model can only be 32 or 64!" "$LINENO" 5
-fi
-# Translate the standard cpu-vendor-kernel-os quadruplets into
-# the new HOST_.... and BUILD_... and the legacy names used by
-# the openjdk build.
-# It uses $host_os $host_cpu $build_os $build_cpu and $with_data_model
-
-    # Expects $host_os $host_cpu $build_os and $build_cpu
-    # and $with_data_model to have been setup!
-    #
-    # Translate the standard triplet(quadruplet) definition
-    # of the host/build system into
-    # HOST_OS=aix,bsd,hpux,linux,macosx,solaris,windows
-    # HOST_OS_FAMILY=bsd,gnu,sysv,win32,wince
-    # HOST_OS_API=posix,winapi
-    #
-    # HOST_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64
-    # HOST_CPU_ARCH=x86,sparc,pcc,arm
-    # HOST_CPU_BITS=32,64
-    # HOST_CPU_ENDIAN=big,little
-    #
-    # The same values are setup for BUILD_...
-    #
-    # And the legacy variables, for controlling the old makefiles.
-    # LEGACY_HOST_CPU1=i586,amd64/x86_64,sparc,sparcv9,arm,arm64...
-    # LEGACY_HOST_CPU2=i386,amd64,sparc,sparcv9,arm,arm64...
-    # LEGACY_HOST_CPU3=sparcv9,amd64 (but only on solaris)
-    # LEGACY_HOST_OS_API=solaris,windows
-    #
-    # We also copy the autoconf trip/quadruplet
-    # verbatim to HOST and BUILD
-    HOST=${host}
-
-    BUILD=${build}
-
-
-
-
-  case "$host_os" in
-    *linux*)
-      VAR_OS=linux
-      VAR_OS_API=posix
-      VAR_OS_FAMILY=gnu
-      ;;
-    *solaris*)
-      VAR_OS=solaris
-      VAR_OS_API=posix
-      VAR_OS_FAMILY=sysv
-      ;;
-    *darwin*)
-      VAR_OS=macosx
-      VAR_OS_API=posix
-      VAR_OS_FAMILY=bsd
-      ;;
-    *bsd*)
-      VAR_OS=bsd
-      VAR_OS_API=posix
-      VAR_OS_FAMILY=bsd
-      ;;
-    *cygwin*|*windows*)
-      VAR_OS=windows
-      VAR_OS_API=winapi
-      VAR_OS_FAMILY=windows
-      ;;
-    *)
-      as_fn_error $? "unsupported host operating system $host_os" "$LINENO" 5
-      ;;
-  esac
-
-    HOST_OS="$VAR_OS"
-    HOST_OS_FAMILY="$VAR_OS_FAMILY"
-    HOST_OS_API="$VAR_OS_API"
-
-
-
-
-
-    if test "x$HOST_OS_API" = xposix; then
-        LEGACY_HOST_OS_API="solaris"
-    fi
-    if test "x$HOST_OS_API" = xwinapi; then
-        LEGACY_HOST_OS_API="windows"
-    fi
-
-
-
-
-  # First argument is the cpu name from the trip/quad
-  case "$host_cpu" in
-    x86_64)
-      VAR_CPU=x64
-      VAR_CPU_ARCH=x86
-      VAR_CPU_BITS=64
-      VAR_CPU_ENDIAN=little
-      VAR_LEGACY_CPU=amd64
-      ;;
-    i?86)
-      VAR_CPU=ia32
-      VAR_CPU_ARCH=x86
-      VAR_CPU_BITS=32
-      VAR_CPU_ENDIAN=little
-      VAR_LEGACY_CPU=i586
-      ;;
-    alpha*)
-      VAR_CPU=alpha
-      VAR_CPU_ARCH=alpha
-      VAR_CPU_BITS=64
-      VAR_CPU_ENDIAN=big
-      VAR_LEGACY_CPU=alpha
-      ;;
-    arm*)
-      VAR_CPU=arm
-      VAR_CPU_ARCH=arm
-      VAR_CPU_BITS=3264
-      VAR_CPU_ENDIAN=big
-      VAR_LEGACY_CPU=arm
-      ;;
-    mips)
-      VAR_CPU=mips
-      VAR_CPU_ARCH=mips
-      VAR_CPU_BITS=woot
-      VAR_CPU_ENDIAN=woot
-      VAR_LEGACY_CPU=mips
-       ;;
-    mipsel)
-      VAR_CPU=mipsel
-      VAR_CPU_ARCH=mips
-      VAR_CPU_BITS=woot
-      VAR_CPU_ENDIAN=woot
-      VAR_LEGACY_CPU=mipsel
-       ;;
-    powerpc)
-      VAR_CPU=ppc
-      VAR_CPU_ARCH=ppc
-      VAR_CPU_BITS=32
-      VAR_CPU_ENDIAN=big
-      VAR_LEGACY_CPU=ppc
-       ;;
-    powerpc64)
-      VAR_CPU=ppc64
-      VAR_CPU_ARCH=ppc
-      VAR_CPU_BITS=64
-      VAR_CPU_ENDIAN=32
-      VAR_LEGACY_CPU=ppc64
-       ;;
-    sparc)
-      VAR_CPU=sparc
-      VAR_CPU_ARCH=sparc
-      VAR_CPU_BITS=32
-      VAR_CPU_ENDIAN=big
-      VAR_LEGACY_CPU=sparc
-       ;;
-    sparc64)
-      VAR_CPU=sparcv9
-      VAR_CPU_ARCH=sparc
-      VAR_CPU_BITS=64
-      VAR_CPU_ENDIAN=big
-      VAR_LEGACY_CPU=sparc_sparcv9
-       ;;
-    s390)
-      VAR_CPU=s390
-      VAR_CPU_ARCH=s390
-      VAR_CPU_BITS=32
-      VAR_CPU_ENDIAN=woot
-      VAR_LEGACY_CPU=s390
-      VAR_LEGACY_CPU=s390
-       ;;
-    s390x)
-      VAR_CPU=s390x
-      VAR_CPU_ARCH=s390
-      VAR_CPU_BITS=64
-      VAR_CPU_ENDIAN=woot
-      VAR_LEGACY_CPU=s390x
-       ;;
-    *)
-      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
-      ;;
-  esac
+###
+### Process command-line arguments
+###
+conf_processed_arguments=
+conf_openjdk_target=
+conf_extra_cflags=
+conf_extra_cxxflags=
 
-  # Workaround cygwin not knowing about 64 bit.
-  if test "x$VAR_OS" = "xwindows"; then
-      if test "x$PROCESSOR_IDENTIFIER" != "x"; then
-          PROC_ARCH=`echo $PROCESSOR_IDENTIFIER | $CUT -f1 -d' '`
-          case "$PROC_ARCH" in
-            intel64|Intel64|INTEL64|em64t|EM64T|amd64|AMD64|8664|x86_64)
-              VAR_CPU=x64
-              VAR_CPU_BITS=64
-              VAR_LEGACY_CPU=amd64
-              ;;
-          esac
-      fi
-  fi
-
-  if test "x$VAR_CPU_ARCH" = "xx86"; then
-      if test "x$with_data_model" = "x64"; then
-          VAR_CPU=x64
-          VAR_CPU_BITS=64
-          VAR_LEGACY_CPU=amd64
-      fi
-      if test "x$with_data_model" = "x32"; then
-          VAR_CPU=ia32
-          VAR_CPU_BITS=32
-          VAR_LEGACY_CPU=i586
-      fi
-  fi
-
-    HOST_CPU="$VAR_CPU"
-    HOST_CPU_ARCH="$VAR_CPU_ARCH"
-    HOST_CPU_BITS="$VAR_CPU_BITS"
-    HOST_CPU_ENDIAN="$VAR_CPU_ENDIAN"
-
-
-
-
-
-
-    # Also store the legacy naming of the cpu.
-    # Ie i586 and amd64 instead of ia32 and x64
-    LEGACY_HOST_CPU1="$VAR_LEGACY_CPU"
-
-
-    # And the second legacy naming of the cpu.
-    # Ie i386 and amd64 instead of ia32 and x64.
-    LEGACY_HOST_CPU2="$LEGACY_HOST_CPU1"
-    if test "x$LEGACY_HOST_CPU1" = xi586; then
-        LEGACY_HOST_CPU2=i386
-    fi
-
-
-    # And the third legacy naming of the cpu.
-    # Ie only amd64 or sparcv9, used for the ISA_DIR on Solaris.
-    LEGACY_HOST_CPU3=""
-    if test "x$HOST_CPU" = xx64; then
-        LEGACY_HOST_CPU3=amd64
-    fi
-    if test "x$HOST_CPU" = xsparcv9; then
-        LEGACY_HOST_CPU3=sparvc9
-    fi
-
-
-
-
-
-  case "$build_os" in
-    *linux*)
-      VAR_OS=linux
-      VAR_OS_API=posix
-      VAR_OS_FAMILY=gnu
-      ;;
-    *solaris*)
-      VAR_OS=solaris
-      VAR_OS_API=posix
-      VAR_OS_FAMILY=sysv
-      ;;
-    *darwin*)
-      VAR_OS=macosx
-      VAR_OS_API=posix
-      VAR_OS_FAMILY=bsd
-      ;;
-    *bsd*)
-      VAR_OS=bsd
-      VAR_OS_API=posix
-      VAR_OS_FAMILY=bsd
-      ;;
-    *cygwin*|*windows*)
-      VAR_OS=windows
-      VAR_OS_API=winapi
-      VAR_OS_FAMILY=windows
-      ;;
-    *)
-      as_fn_error $? "unsupported host operating system $build_os" "$LINENO" 5
-      ;;
-  esac
-
-    BUILD_OS="$VAR_OS"
-    BUILD_OS_FAMILY="$VAR_OS_FAMILY"
-    BUILD_OS_API="$VAR_OS_API"
-
-
-
-
-
-    if test "x$BUILD_OS_API" = xposix; then
-        LEGACY_BUILD_OS_API="solaris"
-    fi
-    if test "x$BUILD_OS_API" = xwinapi; then
-        LEGACY_BUILD_OS_API="windows"
-    fi
-
-
-
-
-  # First argument is the cpu name from the trip/quad
-  case "$build_cpu" in
-    x86_64)
-      VAR_CPU=x64
-      VAR_CPU_ARCH=x86
-      VAR_CPU_BITS=64
-      VAR_CPU_ENDIAN=little
-      VAR_LEGACY_CPU=amd64
-      ;;
-    i?86)
-      VAR_CPU=ia32
-      VAR_CPU_ARCH=x86
-      VAR_CPU_BITS=32
-      VAR_CPU_ENDIAN=little
-      VAR_LEGACY_CPU=i586
-      ;;
-    alpha*)
-      VAR_CPU=alpha
-      VAR_CPU_ARCH=alpha
-      VAR_CPU_BITS=64
-      VAR_CPU_ENDIAN=big
-      VAR_LEGACY_CPU=alpha
-      ;;
-    arm*)
-      VAR_CPU=arm
-      VAR_CPU_ARCH=arm
-      VAR_CPU_BITS=3264
-      VAR_CPU_ENDIAN=big
-      VAR_LEGACY_CPU=arm
-      ;;
-    mips)
-      VAR_CPU=mips
-      VAR_CPU_ARCH=mips
-      VAR_CPU_BITS=woot
-      VAR_CPU_ENDIAN=woot
-      VAR_LEGACY_CPU=mips
-       ;;
-    mipsel)
-      VAR_CPU=mipsel
-      VAR_CPU_ARCH=mips
-      VAR_CPU_BITS=woot
-      VAR_CPU_ENDIAN=woot
-      VAR_LEGACY_CPU=mipsel
-       ;;
-    powerpc)
-      VAR_CPU=ppc
-      VAR_CPU_ARCH=ppc
-      VAR_CPU_BITS=32
-      VAR_CPU_ENDIAN=big
-      VAR_LEGACY_CPU=ppc
-       ;;
-    powerpc64)
-      VAR_CPU=ppc64
-      VAR_CPU_ARCH=ppc
-      VAR_CPU_BITS=64
-      VAR_CPU_ENDIAN=32
-      VAR_LEGACY_CPU=ppc64
-       ;;
-    sparc)
-      VAR_CPU=sparc
-      VAR_CPU_ARCH=sparc
-      VAR_CPU_BITS=32
-      VAR_CPU_ENDIAN=big
-      VAR_LEGACY_CPU=sparc
-       ;;
-    sparc64)
-      VAR_CPU=sparcv9
-      VAR_CPU_ARCH=sparc
-      VAR_CPU_BITS=64
-      VAR_CPU_ENDIAN=big
-      VAR_LEGACY_CPU=sparc_sparcv9
-       ;;
-    s390)
-      VAR_CPU=s390
-      VAR_CPU_ARCH=s390
-      VAR_CPU_BITS=32
-      VAR_CPU_ENDIAN=woot
-      VAR_LEGACY_CPU=s390
-      VAR_LEGACY_CPU=s390
-       ;;
-    s390x)
-      VAR_CPU=s390x
-      VAR_CPU_ARCH=s390
-      VAR_CPU_BITS=64
-      VAR_CPU_ENDIAN=woot
-      VAR_LEGACY_CPU=s390x
-       ;;
-    *)
-      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
-      ;;
+for conf_option
+do
+  case $conf_option in
+  --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 ;;
+  *)
+    conf_processed_arguments="$conf_processed_arguments $conf_option" ;;
   esac
 
-  # Workaround cygwin not knowing about 64 bit.
-  if test "x$VAR_OS" = "xwindows"; then
-      if test "x$PROCESSOR_IDENTIFIER" != "x"; then
-          PROC_ARCH=`echo $PROCESSOR_IDENTIFIER | $CUT -f1 -d' '`
-          case "$PROC_ARCH" in
-            intel64|Intel64|INTEL64|em64t|EM64T|amd64|AMD64|8664|x86_64)
-              VAR_CPU=x64
-              VAR_CPU_BITS=64
-              VAR_LEGACY_CPU=amd64
-              ;;
-          esac
-      fi
-  fi
-
-  if test "x$VAR_CPU_ARCH" = "xx86"; then
-      if test "x$with_data_model" = "x64"; then
-          VAR_CPU=x64
-          VAR_CPU_BITS=64
-          VAR_LEGACY_CPU=amd64
-      fi
-      if test "x$with_data_model" = "x32"; then
-          VAR_CPU=ia32
-          VAR_CPU_BITS=32
-          VAR_LEGACY_CPU=i586
-      fi
-  fi
-
-    BUILD_CPU="$VAR_CPU"
-    BUILD_CPU_ARCH="$VAR_CPU_ARCH"
-    BUILD_CPU_BITS="$VAR_CPU_BITS"
-    BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
-
-
-
-
-
-
-    # Also store the legacy naming of the cpu.
-    # Ie i586 and amd64 instead of ia32 and x64
-    LEGACY_BUILD_CPU1="$VAR_LEGACY_CPU"
-
-
-    # And the second legacy naming of the cpu.
-    # Ie i386 and amd64 instead of ia32 and x64.
-    LEGACY_BUILD_CPU2="$LEGACY_BUILD_CPU1"
-    if test "x$LEGACY_BUILD_CPU1" = xi586; then
-        LEGACY_BUILD_CPU2=i386
-    fi
-
-
-    # And the third legacy naming of the cpu.
-    # Ie only amd64 or sparcv9, used for the ISA_DIR on Solaris.
-    LEGACY_BUILD_CPU3=""
-    if test "x$BUILD_CPU" = xx64; then
-        LEGACY_BUILD_CPU3=amd64
-    fi
-    if test "x$BUILD_CPU" = xsparcv9; then
-        LEGACY_BUILD_CPU3=sparvc9
-    fi
-
-
-
-    if test "x$HOST_OS" != xsolaris; then
-        LEGACY_HOST_CPU3=""
-        LEGACY_BUILD_CPU3=""
-    fi
-
-    # On MacOSX and MacOSX only, we have a different name for the x64 CPU in ARCH (LEGACY_HOST_CPU1) ...
-    if test "x$HOST_OS" = xmacosx && test "x$HOST_CPU" = xx64; then
-        LEGACY_HOST_CPU1="x86_64"
-    fi
-
-
-    if test "x$HOST_OS" = "xsolaris"; then
-       REQUIRED_OS_NAME=SunOS
-       REQUIRED_OS_VERSION=5.10
-    fi
-    if test "x$HOST_OS" = "xlinux"; then
-       REQUIRED_OS_NAME=Linux
-       REQUIRED_OS_VERSION=2.6
-    fi
-    if test "x$HOST_OS" = "xwindows"; then
-        REQUIRED_OS_NAME=Windows
-        REQUIRED_OS_VERSION=5.1
-    fi
-    if test "x$HOST_OS" = "xmacosx"; then
-        REQUIRED_OS_NAME=Darwin
-        REQUIRED_OS_VERSION=11.2
-    fi
-
-
-
-
-
-# Now the following vars are defined.
-# HOST_OS=aix,bsd,hpux,linux,macosx,solaris,windows
-# HOST_OS_FAMILY=bsd,gnu,sysv,win32,wince
-# HOST_OS_API=posix,winapi
-#
-# HOST_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64
-# HOST_CPU_ARCH=x86,sparc,pcc,arm
-# HOST_CPU_BITS=32,64
-# HOST_CPU_ENDIAN=big,little
-#
-# There is also a:
-# LEGACY_HOST_CPU1=i586,amd64,....  # used to set the old var ARCH
-# LEGACY_HOST_CPU2=i386,amd64,.... # used to set the old var LIBARCH
-# LEGACY_HOST_CPU3=only sparcv9,amd64 # used to set the ISA_DIR on Solaris
-# There was also a BUILDARCH that had i486,amd64,... but we do not use that
-# in the new build.
-# LEGACY_HOST_OS_API=solaris,windows # used to select source roots
-
-DATE_WHEN_CONFIGURED=`LANG=C date`
-
-
-# How many cores do we have on this build system?
-
-# Check whether --with-num-cores was given.
-if test "${with_num_cores+set}" = set; then :
-  withval=$with_num_cores;
-fi
-
-if test "x$with_num_cores" = x; then
-    # The number of cores were not specified, try to probe them.
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
-$as_echo_n "checking for number of cores... " >&6; }
-    NUM_CORES=1
-    FOUND_CORES=no
-
-    if test -f /proc/cpuinfo; then
-        # Looks like a Linux system
-        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
-        FOUND_CORES=yes
-    fi
-
-    if test -x /usr/sbin/psrinfo; then
-        # Looks like a Solaris system
-        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
-        FOUND_CORES=yes
-    fi
-
-    if test -x /usr/sbin/system_profiler; then
-        # Looks like a MacOSX system
-        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
-        FOUND_CORES=yes
-    fi
-
-    if test "x$build_os" = xwindows; then
-        NUM_CORES=4
-    fi
-
-    # For c/c++ code we run twice as many concurrent build
-    # jobs than we have cores, otherwise we will stall on io.
-    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
-
-    if test "x$FOUND_CORES" = xyes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
-$as_echo "$NUM_CORES" >&6; }
-    else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1!" >&5
-$as_echo "could not detect number of cores, defaulting to 1!" >&6; }
-    fi
-
-
-else
-    NUM_CORES=$with_num_cores
-    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
-fi
-
-
-
-# How many cores do we have on this build system?
-
-# Check whether --with-memory-size was given.
-if test "${with_memory_size+set}" = set; then :
-  withval=$with_memory_size;
-fi
-
-if test "x$with_memory_size" = x; then
-    # The memory size was not specified, try to probe it.
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
-$as_echo_n "checking for memory size... " >&6; }
-    # Default to 1024MB
-    MEMORY_SIZE=1024
-    FOUND_MEM=no
-
-    if test -f /proc/cpuinfo; then
-        # Looks like a Linux system
-        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
-        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
-        FOUND_MEM=yes
-    fi
-
-    if test -x /usr/sbin/prtconf; then
-        # Looks like a Solaris system
-        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
-        FOUND_MEM=yes
-    fi
-
-    if test -x /usr/sbin/system_profiler; then
-        # Looks like a MacOSX system
-        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
-        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
-        FOUND_MEM=yes
-    fi
-
-    if test "x$build_os" = xwindows; then
-        MEMORY_SIZE=`systeminfo | grep 'Total Physical Memory:' | awk '{ print $4 }' | sed 's/,//'`
-        FOUND_MEM=yes
-    fi
-
-    if test "x$FOUND_MEM" = xyes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
-$as_echo "$MEMORY_SIZE MB" >&6; }
-    else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size defaulting to 1024MB!" >&5
-$as_echo "could not detect memory size defaulting to 1024MB!" >&6; }
-    fi
-
-else
-    MEMORY_SIZE=$with_memory_size
-fi
-
-
-# Where is the source? It is located two levels above the configure script.
-CURDIR="$PWD"
-cd "$AUTOCONF_DIR/../.."
-SRC_ROOT="`pwd`"
-
-cd "$CURDIR"
-
-# 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$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
-
-
-
-    # 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$BUILD_OS" = "xwindows"; then
-            SRC_ROOT=`$CYGPATH -s -m -a "$SRC_ROOT"`
-            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$BUILD_OS" = "xwindows"; then
-            CURDIR=`$CYGPATH -s -m -a "$CURDIR"`
-            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$BUILD_OS" = "xsolaris"; then
-    # Also search in /usr/ccs/bin for utilities like ar and as.
-    PATH="/usr/ccs/bin:$PATH"
-fi
-
-###############################################################################
-#
-# OpenJDK or closed
-#
-# Check whether --enable-openjdk-only was given.
-if test "${enable_openjdk_only+set}" = set; then :
-  enableval=$enable_openjdk_only;
-fi
-
-
-if test "x$enable_openjdk_only" = "xyes"; then
-    OPENJDK=true
-elif test "x$enable_openjdk_only" = "xno"; then
-    OPENJDK=false
-elif test -d "$SRC_ROOT/jdk/src/closed"; then
-    OPENJDK=false
-else
-    OPENJDK=true
-fi
-
-if test "x$OPENJDK" = "xtrue"; then
-    SET_OPENJDK=OPENJDK=true
-fi
-
-
-
-###############################################################################
-#
-# JIGSAW or not.  The JIGSAW variable is used during the intermediate
-# stage when we are building both the old style JDK and the new style modularized JDK.
-# When the modularized JDK is finalized, this option will go away.
-#
-# Check whether --enable-jigsaw was given.
-if test "${enable_jigsaw+set}" = set; then :
-  enableval=$enable_jigsaw;
-fi
-
-
-if test "x$enable_jigsaw" = "xyes"; then
-    JIGSAW=true
-else
-    JIGSAW=false
-fi
-
-
-###############################################################################
-#
-# Check which variant of the JDK that we want to build.
-# Currently we have:
-#    normal:   standard edition
-#    embedded: cut down to a smaller footprint
-#
-# Effectively the JDK variant gives a name to a specific set of
-# modules to compile into the JDK. In the future, these modules
-# might even be Jigsaw modules.
-#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
-$as_echo_n "checking which variant of the JDK to build... " >&6; }
-
-# Check whether --with-jdk-variant was given.
-if test "${with_jdk_variant+set}" = set; then :
-  withval=$with_jdk_variant;
-fi
-
-
-if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
-    JAVASE_EMBEDDED=""
-    MINIMIZE_RAM_USAGE=""
-    JDK_VARIANT="normal"
-elif test "x$with_jdk_variant" = xembedded; then
-    JAVASE_EMBEDDED="JAVASE_EMBEDDED:=true"
-    MINIMIZE_RAM_USAGE="MINIMIZE_RAM_USAGE:=true"
-    JDK_VARIANT="embedded"
-else
-    as_fn_error $? "The available JDK variants are: normal, embedded" "$LINENO" 5
-fi
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
-$as_echo "$JDK_VARIANT" >&6; }
-
-###############################################################################
-#
-# Should we build a JDK/JVM with head support (ie a graphical ui)?
-# We always build headless support.
-#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
-$as_echo_n "checking headful support... " >&6; }
-# Check whether --enable-headful was given.
-if test "${enable_headful+set}" = set; then :
-  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
-else
-  SUPPORT_HEADFUL=yes
-fi
-
-
-SUPPORT_HEADLESS=yes
-BUILD_HEADLESS="BUILD_HEADLESS:=true"
-
-if test "x$SUPPORT_HEADFUL" = xyes; then
-    # We are building both headful and headless.
-    BUILD_HEADLESS_ONLY=""
-    headful_msg="inlude support for both headful and headless"
-fi
-
-if test "x$SUPPORT_HEADFUL" = xno; then
-    # Thus we are building headless only.
-    BUILD_HEADLESS="BUILD_HEADLESS:=true"
-    BUILD_HEADLESS_ONLY="BUILD_HEADLESS_ONLY:=true"
-    headful_msg="headless only"
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
-$as_echo "$headful_msg" >&6; }
-
-
-
-
-
-
-###############################################################################
-#
-# Check which variants of the JVM that we want to build.
-# Currently we have:
-#    server: normal interpreter and a tiered C1/C2 compiler
-#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
-#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
-#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
-#    zero: no machine code interpreter, no compiler
-#    zeroshark: zero interpreter and shark/llvm compiler backend
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM that should be built" >&5
-$as_echo_n "checking which variants of the JVM that should be built... " >&6; }
-
-# Check whether --with-jvm-variants was given.
-if test "${with_jvm_variants+set}" = set; then :
-  withval=$with_jvm_variants;
-fi
-
-
-if test "x$with_jvm_variants" = x; then
-    if test "x$JDK_VARIANT" = xembedded; then
-        with_jvm_variants="kernel"
-    elif test "x$HOST_CPU_BITS" = x64; then
-        with_jvm_variants="server"
-    else
-        # Yes, on 32-bit machines, the same source (almost) is compiled twice
-        # to generate two libjvm.so files. Fun, fun.
-        with_jvm_variants="client,server"
-    fi
-fi
-
-JVM_VARIANTS=",$with_jvm_variants,"
-TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
-
-if test "x$TEST_VARIANTS" != "x,"; then
-   as_fn_error $? "The available JVM variants are: server, client, kernel, zero, zeroshark" "$LINENO" 5
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
-$as_echo "$with_jvm_variants" >&6; }
-
-JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
-JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
-JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
-JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
-JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
-
-if test "x$JVM_VARIANT_CLIENT" = xtrue; then
-    if test "x$HOST_CPU_BITS" = x64; then
-        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
-    fi
-fi
-if test "x$JVM_VARIANT_KERNEL" = xtrue; then
-    if test "x$HOST_CPU_BITS" = x64; then
-        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
-    fi
-fi
-
-COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
-# Replace the commas with AND for use in the build directory name.
-ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
-if test "x$COUNT_VARIANTS" != "x,1"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: NOTE! Longer build time since we are building more than one version of the libjvm! $with_jvm_variants" >&5
-$as_echo "$as_me: NOTE! Longer build time since we are building more than one version of the libjvm! $with_jvm_variants" >&6;}
-fi
-
-
-
-
-
-
-
-
-###############################################################################
-#
-# Set the debug level
-#    release: no debug information, all optimizations, no asserts.
-#    fastdebug: debug information (-g), all optimizations, all asserts
-#    slowdebug: debug information (-g), no optimizations, all asserts
-#
-DEBUG_LEVEL="release"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
-$as_echo_n "checking which debug level to use... " >&6; }
-# Check whether --enable-debug was given.
-if test "${enable_debug+set}" = set; then :
-  enableval=$enable_debug;
-        ENABLE_DEBUG="${enableval}"
-        DEBUG_LEVEL="fastdebug"
-
-else
-  ENABLE_DEBUG="no"
-fi
-
-
-
-# Check whether --with-debug-level was given.
-if test "${with_debug_level+set}" = set; then :
-  withval=$with_debug_level;
-        DEBUG_LEVEL="${withval}"
-        if test "x$ENABLE_DEBUG" = xyes; then
-			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
-        fi
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
-$as_echo "$DEBUG_LEVEL" >&6; }
-
-if test "x$DEBUG_LEVEL" != xrelease && \
-   test "x$DEBUG_LEVEL" != xfastdebug && \
-   test "x$DEBUG_LEVEL" != xslowdebug; then
-   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
-fi
-
-case $DEBUG_LEVEL in
-      release )
-          VARIANT="OPT"
-          FASTDEBUG="false"
-          DEBUG_CLASSFILES="false"
-          BUILD_VARIANT_RELEASE=""
-           ;;
-      fastdebug )
-          VARIANT="DBG"
-          FASTDEBUG="true"
-          DEBUG_CLASSFILES="true"
-          BUILD_VARIANT_RELEASE="-fastdebug"
-           ;;
-      slowdebug )
-          VARIANT="DBG"
-          FASTDEBUG="false"
-          DEBUG_CLASSFILES="true"
-          BUILD_VARIANT_RELEASE="-debug"
-           ;;
-esac
-
-
-
-
-
-
-
-# Source the version numbers
-. $AUTOCONF_DIR/version.numbers
-if test "x$OPENJDK" = "xfalse"; then
-    . $AUTOCONF_DIR/closed.version.numbers
-fi
-# Now set the JDK version, milestone, build number etc.
-
-
-
-
-
-
-
-
-
-
-
-
-COPYRIGHT_YEAR=`date +'%Y'`
-
-
-RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
-
-
-if test "x$JDK_UPDATE_VERSION" != x; then
-    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
-else
-    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
-fi
-
-
-if test "x$MILESTONE" != x; then
-    RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
-else
-    RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
-fi
-
-
-if test "x$JDK_BUILD_NUMBER" != x; then
-    FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
-else
-    JDK_BUILD_NUMBER=b00
-    BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
-    # Avoid [:alnum:] since it depends on the locale.
-    CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
-    USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
-    FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
-fi
-
-COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
-
-
-# Test from where we are running configure, in or outside of src root.
-if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
-    # We are running configure from the src root.
-    # Create a default ./build/host-variant-debuglevel output root.
-    CONF_NAME="${HOST_OS}-${HOST_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
-    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
-    mkdir -p "$OUTPUT_ROOT"
-    if test ! -d "$OUTPUT_ROOT"; then
-        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
-    fi
-else
-    # We are running configure from outside of the src dir.
-    # Then use the current directory as output dir!
-    # If configuration is situated in normal build directory, just use the build
-    # directory name as configuration name, otherwise use the complete path.
-    CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
-    OUTPUT_ROOT="$CURDIR"
-fi
-
-
-    # Fail with message the path to the output root if var OUTPUT_ROOT contains a path with no spaces in it.
-    # Unless on Windows, where we can rewrite the path.
-    HAS_SPACE=`echo "$OUTPUT_ROOT" | grep " "`
-    if test "x$HAS_SPACE" != x; then
-        if test "x$BUILD_OS" = "xwindows"; then
-            OUTPUT_ROOT=`$CYGPATH -s -m -a "$OUTPUT_ROOT"`
-            OUTPUT_ROOT=`$CYGPATH -u "$OUTPUT_ROOT"`
-        else
-            as_fn_error $? "You cannot have spaces in the path to the output root! \"$OUTPUT_ROOT\"" "$LINENO" 5
-        fi
-    fi
-
-
-# Save the arguments given to us
-echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
-
-# 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.
-SETUPDEVENV="# No special vars"
-if test "x$BUILD_OS" = "xwindows"; then
-    # If vcvarsall.bat has been run, then VCINSTALLDIR is set.
-    if test "x$VCINSTALLDIR" != x; then
-        # No further setup is needed. The build will happen from this kind
-        # of shell.
-        SETUPDEVENV="# This spec file expects that you are running bash from within a VS command prompt."
-        # Make sure to remind you, if you forget to run make from a cygwin bash shell
-        # that is spawned "bash -l" from a VS command prompt.
-        CHECK_FOR_VCINSTALLDIR=yes
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if you are running from within a VS command prompt" >&5
-$as_echo_n "checking if you are running from within a VS command prompt... " >&6; }
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-    else
-        # Ah, we have not yet run vcvarsall.bat/vsvars32.bat/vsvars64.bat. Lets do that. First find it.
-        if test "x$VS100COMNTOOLS" != x; then
-            VARSBAT=`find "$VS100COMNTOOLS/../.." -name vcvarsall.bat`
-	    SEARCH_ROOT="$VS100COMNTOOLS"
-        else
-            VARSBAT=`find "$PROGRAMFILES" -name vcvarsall.bat`
-	    SEARCH_ROOT="$PROGRAMFILES"
-        fi
-        VCPATH=`dirname "$VARSBAT"`
-        VCPATH=`cygpath -w "$VCPATH"`
-	if test "x$VARSBAT" = x || test ! -d "$VCPATH"; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can find the VS installation" >&5
-$as_echo_n "checking if we can find the VS installation... " >&6; }
-            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-            as_fn_error $? "Tried to find a VS installation using both $SEARCH_ROOT but failed. Please run \"c:\\cygwin\\bin\\bash.exe -l\" from a VS command prompt and then run configure/make from there." "$LINENO" 5
-        fi
-        case "$LEGACY_HOST_CPU1" in
-          i?86)
-            VARSBAT_ARCH=x86
-            ;;
-          *)
-            VARSBAT_ARCH=$LEGACY_HOST_CPU1
-            ;;
-        esac
-        # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
-        cd $OUTPUT_ROOT
-        bash $SRC_ROOT/common/bin/extractvcvars.sh "$VARSBAT" "$VARSBAT_ARCH"
-	cd $CURDIR
-	if test ! -s $OUTPUT_ROOT/localdevenv.sh || test ! -s $OUTPUT_ROOT/localdevenv.gmk; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can extract the needed env variables" >&5
-$as_echo_n "checking if we can extract the needed env variables... " >&6; }
-            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-            as_fn_error $? "Could not succesfully extract the env variables needed for the VS setup. Please run \"c:\\cygwin\\bin\\bash.exe -l\" from a VS command prompt and then run configure/make from there." "$LINENO" 5
-        fi
-        # Now set all paths and other env variables. This will allow the rest of
-        # the configure script to find and run the compiler in the proper way.
-        . $OUTPUT_ROOT/localdevenv.sh
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can find the VS installation" >&5
-$as_echo_n "checking if we can find the VS installation... " >&6; }
-	if test "x$VCINSTALLDIR" != x; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VCINSTALLDIR" >&5
-$as_echo "$VCINSTALLDIR" >&6; }
-        else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-            as_fn_error $? "Could not find VS installation. Please install. If you are sure you have installed VS, then please run \"c:\\cygwin\\bin\\bash.exe -l\" from a VS command prompt and then run configure/make from there." "$LINENO" 5
-        fi
-        CHECK_FOR_VCINSTALLDIR=no
-	SETUPDEVENV="include $OUTPUT_ROOT/localdevenv.gmk"
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
-$as_echo_n "checking for msvcr100.dll... " >&6; }
-
-# Check whether --with-msvcr100dll was given.
-if test "${with_msvcr100dll+set}" = set; then :
-  withval=$with_msvcr100dll;
-fi
-
-        if test "x$with_msvcr100dll" != x; then
-            MSVCR100DLL="$with_msvcr100dll"
-        else
-            if test "x$HOST_CPU_BITS" = x64; then
-                MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x64 | head --lines 1`
-            else
-                MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
-                if test "x$MSVCR100DLL" = x; then
-                    MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | head --lines 1`
-                fi
-            fi
-        fi
-	if test "x$MSVCR100DLL" = x; then
-           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	   as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR100DLL" >&5
-$as_echo "$MSVCR100DLL" >&6; }
-
-    # Fail with message the path to msvcr100.dll if var MSVCR100DLL contains a path with no spaces in it.
-    # Unless on Windows, where we can rewrite the path.
-    HAS_SPACE=`echo "$MSVCR100DLL" | grep " "`
-    if test "x$HAS_SPACE" != x; then
-        if test "x$BUILD_OS" = "xwindows"; then
-            MSVCR100DLL=`$CYGPATH -s -m -a "$MSVCR100DLL"`
-            MSVCR100DLL=`$CYGPATH -u "$MSVCR100DLL"`
-        else
-            as_fn_error $? "You cannot have spaces in the path to msvcr100.dll! \"$MSVCR100DLL\"" "$LINENO" 5
-        fi
-    fi
-
-    fi
-fi
-
-
-
-
-# Most of the probed defines are put into config.h
-ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
-
-# The spec.gmk file contains all variables for the make system.
-ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
-
-# The generated Makefile knows where the spec.gmk is and where the source is.
-# You can run make from the OUTPUT_ROOT. If you have only
-# one configured host, then you can also run make from the SRC_ROOT,
-# since it will go look for a single spec.gmk file. Or perhaps it
-# should instead make all configured hosts it can find?
-ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
-
-
-SPEC=$OUTPUT_ROOT/spec.gmk
-
-CONF_NAME=$CONF_NAME
-
-OUTPUT_ROOT=$OUTPUT_ROOT
-
-
-# Where are the sources. Any of these can be overridden
-# using --with-override-corba and the likes.
-LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
-CORBA_TOPDIR="$SRC_ROOT/corba"
-JAXP_TOPDIR="$SRC_ROOT/jaxp"
-JAXWS_TOPDIR="$SRC_ROOT/jaxws"
-HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
-JDK_TOPDIR="$SRC_ROOT/jdk"
-
-
-
-
-
-
-
-# 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
-
-
-# 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 $SRC_ROOT/configure.ac | grep BDEPS_CHECK_MODUL | grep -v configure.ac | cut -f 2 -d ',' | tr -d ' ' | sort
-    echo
-    exit 1
-fi
-
-# If builddeps server or conf file is given. Setup buildeps usage.
-
-
-    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 host names that use _ instead of "-" and ".".
-        # This is necessary to use them in variable names.
-        build_var=`echo ${build} | tr '-' '_' | tr '.' '_'`
-        host_var=`echo ${host} | tr '-' '_' | tr '.' '_'`
-        # Extract rewrite information for build and host
-        eval rewritten_build=\${REWRITE_${build_var}}
-        if test "x$rewritten_build" = x; then
-            rewritten_build=${build}
-            echo Build stays the same $rewritten_build
-        else
-            echo Rewriting build for builddeps into $rewritten_build
-        fi
-        eval rewritten_host=\${REWRITE_${host_var}}
-        if test "x$rewritten_host" = x; then
-            rewritten_host=${host}
-            echo Host stays the same $rewritten_host
-        else
-            echo Rewriting host for builddeps into $rewritten_host
-        fi
-        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
-        rewritten_host_var=`echo ${rewritten_host} | 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
+  case $conf_option in
+  -build | --build | --buil | --bui | --bu |-build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
+  -target | --target | --targe | --targ | --tar | --ta | --t | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
+  -host | --host | --hos | --ho | -host=* | --host=* | --hos=* | --ho=*)
+    conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
+  esac
 done
 
-
-
-###############################################################################
-#
-# Configure the development tool paths and potential sysroot.
-#
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-DEVKIT=
-SYS_ROOT=/
-
-
-# The option used to specify the target .o,.a or .so file.
-# When compiling, how to specify the to be created object file.
-CC_OUT_OPTION='-o$(SPACE)'
-# When linking, how to specify the to be created executable.
-EXE_OUT_OPTION='-o$(SPACE)'
-# When linking, how to specify the to be created dynamically linkable library.
-LD_OUT_OPTION='-o$(SPACE)'
-# When archiving, how to specify the to be create static archive for object files.
-AR_OUT_OPTION='rcs$(SPACE)'
-
-
-
-
-
-# If --build AND --host is set, then the configure script will find any
-# cross compilation tools in the PATH. Cross compilation tools
-# follows the cross compilation standard where they are prefixed with ${host}.
-# For example the binary i686-sun-solaris2.10-gcc
-# will cross compile for i686-sun-solaris2.10
-# If neither of build and host is not set, then build=host and the
-# default compiler found in the path will be used.
-# Setting only --host, does not seem to be really supported.
-# Please set both --build and --host if you want to cross compile.
-
-DEFINE_CROSS_COMPILE_ARCH=""
-HOSTCC=""
-HOSTCXX=""
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if this is a cross compile" >&5
-$as_echo_n "checking if this is a cross compile... " >&6; }
-if test "x$build_var" != "x$host_var"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, from $build_var to $host_var" >&5
-$as_echo "yes, from $build_var to $host_var" >&6; }
-    # We have detected a cross compile!
-    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$LEGACY_HOST_CPU1"
-    # Now we to find a C/C++ compiler that can build executables for the build
-    # platform. We can't use the AC_PROG_CC macro, since it can only be used
-    # once.
-    for ac_prog in cl cc gcc
-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_HOSTCC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $HOSTCC in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_HOSTCC="$HOSTCC" # 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_HOSTCC="$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
-HOSTCC=$ac_cv_path_HOSTCC
-if test -n "$HOSTCC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HOSTCC" >&5
-$as_echo "$HOSTCC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$HOSTCC" && break
-done
-
-
-    # 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="$HOSTCC"
-    car="${tmp%% *}"
-    tmp="$HOSTCC EOL"
-    cdr="${tmp#* }"
-    # On windows we want paths without spaces.
-    if test "x$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$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
-        HOSTCC="$car ${cdr% *}"
-    else
-        HOSTCC="$car"
-    fi
-
-    for ac_prog in cl CC g++
-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_HOSTCXX+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $HOSTCXX in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_HOSTCXX="$HOSTCXX" # 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_HOSTCXX="$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
-HOSTCXX=$ac_cv_path_HOSTCXX
-if test -n "$HOSTCXX"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HOSTCXX" >&5
-$as_echo "$HOSTCXX" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$HOSTCXX" && break
-done
-
-
-    # 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="$HOSTCXX"
-    car="${tmp%% *}"
-    tmp="$HOSTCXX EOL"
-    cdr="${tmp#* }"
-    # On windows we want paths without spaces.
-    if test "x$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$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
-        HOSTCXX="$car ${cdr% *}"
-    else
-        HOSTCXX="$car"
-    fi
-
-    # Building for the build platform should be easy. Therefore
-    # we do not need any linkers or assemblers etc.
-else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-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
-fi
-
-# If a devkit is found on the builddeps server, then prepend its path to the
-# PATH variable. If there are cross compilers available in the devkit, these
-# will be found by AC_PROG_CC et al.
-
-
-    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
-        # Source the builddeps file again, to make sure it uses the latest variables!
-        . $builddepsfile
-        # Look for a host and build machine specific resource!
-        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_HOST_${rewritten_host_var}}
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a host specific resource
-            eval resource=\${builddep_devkit_HOST_${rewritten_host_var}}
-        fi
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a build specific resource
-            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
-        fi
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a generic resource
-            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
-            resource=${builddep_devkit}
-        fi
-        if test "x$resource" != x; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
-$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
-	    # If the resource in the builddeps.conf file is an existing directory,
-	    # for example /java/linux/cups
-	    if test -d ${resource}; then
-	       depdir=${resource}
-	    else
-
-# devkit is for example mymodule
-# $resource is for example libs/general/libmymod_1_2_3.zip
-# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
-# $with_builddeps_dir is for example /localhome/builddeps
-# depdir is the name of the variable into which we store the depdir, eg MYMOD
-# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
-# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
-    filename=`basename $resource`
-    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
-    filebase=${filename%%.*}
-    extension=${filename#*.}
-    installdir=$with_builddeps_dir/$filebase
-    if test ! -f $installdir/$filename.unpacked; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
-$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
-        if test ! -d $installdir; then
-            mkdir -p $installdir
-        fi
-        if test ! -d $installdir; then
-            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
-        fi
-        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
-        touch $tmpfile
-        if test ! -f $tmpfile; then
-            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
-        fi
-
-    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
-    # $tmpfile is the local file name for the downloaded file.
-    VALID_TOOL=no
-    if test "x$BDEPS_FTP" = xwget; then
-       VALID_TOOL=yes
-       wget -O $tmpfile $with_builddeps_server/$resource
-    fi
-    if test "x$BDEPS_FTP" = xlftp; then
-       VALID_TOOL=yes
-       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
-    fi
-    if test "x$BDEPS_FTP" = xftp; then
-        VALID_TOOL=yes
-        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
-        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
-        FTPUSERPWD=${FTPSERVER%%@*}
-        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
-            FTPUSER=${userpwd%%:*}
-            FTPPWD=${userpwd#*@}
-            FTPSERVER=${FTPSERVER#*@}
-        else
-            FTPUSER=ftp
-            FTPPWD=ftp
-        fi
-        # the "pass" command does not work on some
-        # ftp clients (read ftp.exe) but if it works,
-        # passive mode is better!
-        (\
-            echo "user $FTPUSER $FTPPWD"        ;\
-            echo "pass"                         ;\
-            echo "bin"                          ;\
-            echo "get $FTPPATH $tmpfile"              ;\
-        ) | ftp -in $FTPSERVER
-    fi
-    if test "x$VALID_TOOL" != xyes; then
-       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
-    fi
-
-        mv $tmpfile $installdir/$filename
-        if test ! -s $installdir/$filename; then
-            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
-        fi
-        case "$extension" in
-            zip)  echo "Unzipping $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
-            ;;
-            tar.gz) echo "Untaring $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-            ;;
-            tgz) echo "Untaring $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-            ;;
-            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
-            ;;
-        esac
-    fi
-    if test -f $installdir/$filename.unpacked; then
-        depdir=$installdir
-    fi
-
-	    fi
-            # Source the builddeps file again, because in the previous command, the depdir
-            # was updated to point at the current build dependency install directory.
-            . $builddepsfile
-            # Now extract variables from the builddeps.conf files.
-            theroot=${builddep_devkit_ROOT}
-            thecflags=${builddep_devkit_CFLAGS}
-            thelibs=${builddep_devkit_LIBS}
-            if test "x$depdir" = x; then
-                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
-            fi
-            DEVKIT=$depdir
-            if test "x$theroot" != x; then
-               DEVKIT="$theroot"
-            fi
-            if test "x$thecflags" != x; then
-               DEVKIT_CFLAGS="$thecflags"
-            fi
-            if test "x$thelibs" != x; then
-               DEVKIT_LIBS="$thelibs"
-            fi
-            # Found devkit
-                     PATH="$DEVKIT/bin:$PATH"
-                     SYS_ROOT="$DEVKIT/${rewritten_host}/sys-root"
-                     if test "x$x_includes" = "xNONE"; then
-                         x_includes="$SYS_ROOT/usr/include/X11"
-                     fi
-                     if test "x$x_libraries" = "xNONE"; then
-                         x_libraries="$SYS_ROOT/usr/lib"
-                     fi
-
-
-        fi
-
-    fi
-
-
-if test "x$SYS_ROOT" != "x/" ; then
-    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
-    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
-    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
-    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
-    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
-    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
-fi
-
-# Store the CFLAGS etal passed to the configure script.
-ORG_CFLAGS="$CFLAGS"
-ORG_CXXFLAGS="$CXXFLAGS"
-ORG_OBJCFLAGS="$OBJCFLAGS"
-
-prepare_help_system
-
-# gcc is almost always present, but on Windows we
-# prefer cl.exe and on Solaris we prefer CC.
-# Thus test for them in this order.
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl cc gcc
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$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_CC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # 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_CC="$ac_tool_prefix$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
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl cc gcc
-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_ac_ct_CC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # 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_ac_ct_CC="$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
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CC" && break
-done
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
+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."
+    echo "The recommended use is just --openjdk-target."
+    exit 1
   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
-    CC=$ac_ct_CC
-  fi
-fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5 ; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
-  { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    sed '10a\
-... rest of stderr output deleted ...
-         10q' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-  fi
-  rm -f conftest.er1 conftest.err
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-done
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
-ac_rmfiles=
-for ac_file in $ac_files
-do
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
-  esac
-done
-rm -f $ac_rmfiles
-
-if { { ac_try="$ac_link_default"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link_default") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile.  We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
-	;;
-    [ab].out )
-	# We found the default executable, but exeext='' is most
-	# certainly right.
-	break;;
-    *.* )
-	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
-	then :; else
-	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	fi
-	# We set ac_cv_exeext here because the later test for it is not
-	# safe: cross compilers may not add the suffix if given an `-o'
-	# argument, so we may need to know it at that point already.
-	# Even if this section looks crufty: it has the advantage of
-	# actually working.
-	break;;
-    * )
-	break;;
-  esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-else
-  ac_file=''
-fi
-if test -z "$ac_file"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5 ; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-ac_exeext=$ac_cv_exeext
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	  break;;
-    * ) break;;
-  esac
-done
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5 ; }
-fi
-rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdio.h>
-int
-main ()
-{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files="$ac_clean_files conftest.out"
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-if test "$cross_compiling" != yes; then
-  { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-  if { ac_try='./conftest$ac_cv_exeext'
-  { { case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
-    cross_compiling=no
-  else
-    if test "$cross_compiling" = maybe; then
-	cross_compiling=yes
-    else
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5 ; }
-    fi
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { { ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  for ac_file in conftest.o conftest.obj conftest.*; do
-  test -f "$ac_file" || continue;
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
-    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-       break;;
-  esac
-done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5 ; }
-fi
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_compiler_gnu=yes
-else
-  ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_save_c_werror_flag=$ac_c_werror_flag
-   ac_c_werror_flag=yes
-   ac_cv_prog_cc_g=no
-   CFLAGS="-g"
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-else
-  CFLAGS=""
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
-  ac_c_werror_flag=$ac_save_c_werror_flag
-	 CFLAGS="-g"
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
-   function prototypes and stuff, but not '\xHH' hex character constants.
-   These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std is added to get
-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
-   array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std.  */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
-   inside strings and character constants.  */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_c89=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
-  test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
-  x)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
-
-fi
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-if test "x$CC" = x; then
-    help_on_build_dependency devkit
-    as_fn_error $? "Could not find a compiler. $HELP_MSG" "$LINENO" 5
-fi
-if test "x$CC" = xcc && test "x$BUILD_OS" = xmacosx; then
-    # Do not use cc on MacOSX use gcc instead.
-    CC="gcc"
-fi
-
-    # 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="$CC"
-    car="${tmp%% *}"
-    tmp="$CC EOL"
-    cdr="${tmp#* }"
-    # On windows we want paths without spaces.
-    if test "x$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$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
-        CC="$car ${cdr% *}"
-    else
-        CC="$car"
-    fi
-
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -z "$CXX"; then
-  if test -n "$CCC"; then
-    CXX=$CCC
-  else
-    if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl CC g++
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$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_CXX+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CXX"; then
-  ac_cv_prog_CXX="$CXX" # 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_CXX="$ac_tool_prefix$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
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
-$as_echo "$CXX" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$CXX" && break
-  done
-fi
-if test -z "$CXX"; then
-  ac_ct_CXX=$CXX
-  for ac_prog in cl CC g++
-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_ac_ct_CXX+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CXX"; then
-  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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_ac_ct_CXX="$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
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
-$as_echo "$ac_ct_CXX" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CXX" && break
-done
-
-  if test "x$ac_ct_CXX" = x; then
-    CXX="g++"
-  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
-    CXX=$ac_ct_CXX
+    echo "Warning: You are using legacy autoconf cross-compilation flags."
+    echo "It is recommended that you use --openjdk-target instead."
+    echo ""
   fi
 fi
 
-  fi
-fi
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
-  { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    sed '10a\
-... rest of stderr output deleted ...
-         10q' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-  fi
-  rm -f conftest.er1 conftest.err
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
-$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_compiler_gnu=yes
-else
-  ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
-$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
-  GXX=yes
-else
-  GXX=
-fi
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
-$as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
-   ac_cxx_werror_flag=yes
-   ac_cv_prog_cxx_g=no
-   CXXFLAGS="-g"
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_cv_prog_cxx_g=yes
-else
-  CXXFLAGS=""
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-
-else
-  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-	 CXXFLAGS="-g"
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_cv_prog_cxx_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
-$as_echo "$ac_cv_prog_cxx_g" >&6; }
-if test "$ac_test_CXXFLAGS" = set; then
-  CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
-  if test "$GXX" = yes; then
-    CXXFLAGS="-g -O2"
-  else
-    CXXFLAGS="-g"
-  fi
-else
-  if test "$GXX" = yes; then
-    CXXFLAGS="-O2"
-  else
-    CXXFLAGS=
-  fi
-fi
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-if test "x$CXX" = xCC && test "x$BUILD_OS" = xmacosx; then
-    # The found CC, even though it seems to be a g++ derivate, cannot compile
-    # c++ code. Override.
-    CXX="g++"
-fi
-
-    # 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="$CXX"
-    car="${tmp%% *}"
-    tmp="$CXX EOL"
-    cdr="${tmp#* }"
-    # On windows we want paths without spaces.
-    if test "x$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$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
-        CXX="$car ${cdr% *}"
-    else
-        CXX="$car"
-    fi
-
-
-if test "x$CXX" = x || test "x$CC" = x; then
-    help_on_build_dependency devkit
-    as_fn_error $? "Could not find the needed compilers! $HELP_MSG " "$LINENO" 5
-fi
-
-if test "x$BUILD_OS" != xwindows; then
-    ac_ext=m
-ac_cpp='$OBJCPP $CPPFLAGS'
-ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_objc_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  for ac_prog in gcc objcc objc cc CC
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$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_OBJC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$OBJC"; then
-  ac_cv_prog_OBJC="$OBJC" # 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_OBJC="$ac_tool_prefix$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
-OBJC=$ac_cv_prog_OBJC
-if test -n "$OBJC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
-$as_echo "$OBJC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$OBJC" && break
-  done
-fi
-if test -z "$OBJC"; then
-  ac_ct_OBJC=$OBJC
-  for ac_prog in gcc objcc objc cc CC
-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_ac_ct_OBJC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_OBJC"; then
-  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # 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_ac_ct_OBJC="$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
-ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
-if test -n "$ac_ct_OBJC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
-$as_echo "$ac_ct_OBJC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_OBJC" && break
-done
-
-  if test "x$ac_ct_OBJC" = x; then
-    OBJC="gcc"
-  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
-    OBJC=$ac_ct_OBJC
-  fi
-fi
-
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
-  { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    sed '10a\
-... rest of stderr output deleted ...
-         10q' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-  fi
-  rm -f conftest.er1 conftest.err
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
-$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
-if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_objc_try_compile "$LINENO"; then :
-  ac_compiler_gnu=yes
-else
-  ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_objc_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
-$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
-  GOBJC=yes
-else
-  GOBJC=
-fi
-ac_test_OBJCFLAGS=${OBJCFLAGS+set}
-ac_save_OBJCFLAGS=$OBJCFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
-$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
-if test "${ac_cv_prog_objc_g+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_save_objc_werror_flag=$ac_objc_werror_flag
-   ac_objc_werror_flag=yes
-   ac_cv_prog_objc_g=no
-   OBJCFLAGS="-g"
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_objc_try_compile "$LINENO"; then :
-  ac_cv_prog_objc_g=yes
-else
-  OBJCFLAGS=""
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_objc_try_compile "$LINENO"; then :
-
-else
-  ac_objc_werror_flag=$ac_save_objc_werror_flag
-	 OBJCFLAGS="-g"
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_objc_try_compile "$LINENO"; then :
-  ac_cv_prog_objc_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_objc_werror_flag=$ac_save_objc_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
-$as_echo "$ac_cv_prog_objc_g" >&6; }
-if test "$ac_test_OBJCFLAGS" = set; then
-  OBJCFLAGS=$ac_save_OBJCFLAGS
-elif test $ac_cv_prog_objc_g = yes; then
-  if test "$GOBJC" = yes; then
-    OBJCFLAGS="-g -O2"
-  else
-    OBJCFLAGS="-g"
-  fi
-else
-  if test "$GOBJC" = yes; then
-    OBJCFLAGS="-O2"
-  else
-    OBJCFLAGS=
-  fi
-fi
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-    # 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="$OBJC"
-    car="${tmp%% *}"
-    tmp="$OBJC EOL"
-    cdr="${tmp#* }"
-    # On windows we want paths without spaces.
-    if test "x$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$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
-        OBJC="$car ${cdr% *}"
-    else
-        OBJC="$car"
-    fi
-
-else
-    OBJC=
-fi
-
-# Restore the flags to the user specified values.
-# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
-CFLAGS="$ORG_CFLAGS"
-CXXFLAGS="$ORG_CXXFLAGS"
-OBJCFLAGS="$ORG_OBJCFLAGS"
-
-# If we are not cross compiling, use the same compilers for
-# building the build platform executables.
-if test "x$DEFINE_CROSS_COMPILE_ARCH" = x; then
-    HOSTCC="$CC"
-    HOSTCXX="$CXX"
-fi
-
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ld; 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_LD+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$LD"; then
-  ac_cv_prog_LD="$LD" # 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_LD="${ac_tool_prefix}ld"
-    $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
-LD=$ac_cv_prog_LD
-if test -n "$LD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_LD"; then
-  ac_ct_LD=$LD
-  # Extract the first word of "ld", so it can be a program name with args.
-set dummy ld; 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_ac_ct_LD+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_LD"; then
-  ac_cv_prog_ac_ct_LD="$ac_ct_LD" # 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_ac_ct_LD="ld"
-    $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
-ac_ct_LD=$ac_cv_prog_ac_ct_LD
-if test -n "$ac_ct_LD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LD" >&5
-$as_echo "$ac_ct_LD" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_LD" = x; then
-    LD=""
-  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
-    LD=$ac_ct_LD
-  fi
-else
-  LD="$ac_cv_prog_LD"
-fi
-
-
-    # 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="$LD"
-    car="${tmp%% *}"
-    tmp="$LD EOL"
-    cdr="${tmp#* }"
-    # On windows we want paths without spaces.
-    if test "x$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$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
-        LD="$car ${cdr% *}"
-    else
-        LD="$car"
-    fi
-
-LD="$CC"
-LDEXE="$CC"
-LDCXX="$CXX"
-LDEXECXX="$CXX"
-# LDEXE is the linker to use, when creating executables.
-
-# Linking C++ libraries.
-
-# Linking C++ executables.
-
-
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; 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_AR+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # 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_AR="${ac_tool_prefix}ar"
-    $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
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_AR"; then
-  ac_ct_AR=$AR
-  # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; 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_ac_ct_AR+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_AR"; then
-  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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_ac_ct_AR="ar"
-    $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
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_AR" = x; then
-    AR=""
-  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
-    AR=$ac_ct_AR
-  fi
-else
-  AR="$ac_cv_prog_AR"
-fi
-
-
-    # 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="$AR"
-    car="${tmp%% *}"
-    tmp="$AR EOL"
-    cdr="${tmp#* }"
-    # On windows we want paths without spaces.
-    if test "x$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$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
-        AR="$car ${cdr% *}"
-    else
-        AR="$car"
-    fi
-
-if test "x$BUILD_OS" = xmacosx; then
-    ARFLAGS="-r"
-else
-    ARFLAGS=""
-fi
-
-
-COMPILER_NAME=gcc
-COMPILER_TYPE=CC
-if test "x$BUILD_OS" = xwindows; then :
-
-    # For now, assume that we are always compiling using cl.exe.
-    CC_OUT_OPTION=-Fo
-    EXE_OUT_OPTION=-out:
-    LD_OUT_OPTION=-out:
-    AR_OUT_OPTION=-out:
-    # On Windows, reject /usr/bin/link, which is a cygwin
-    # program for something completely different.
-    # Extract the first word of "link", so it can be a program name with args.
-set dummy link; 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_WINLD+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$WINLD"; then
-  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
-else
-  ac_prog_rejected=no
-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
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/link"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_WINLD="link"
-    $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
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_WINLD
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set WINLD to just the basename; use the full file name.
-    shift
-    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-fi
-fi
-WINLD=$ac_cv_prog_WINLD
-if test -n "$WINLD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
-$as_echo "$WINLD" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    # Since we must ignore the first found link, WINLD will contain
-    # the full path to the link.exe program.
-
-    # Translate long cygdrive or C:\sdfsf path
-    # into a short mixed mode path that has no
-    # spaces in it.
-    tmp="$WINLD"
-    if test "x$BUILD_OS" = "xwindows"; then
-        tmp=`$CYGPATH -u "$WINLD"`
-        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
-    WINLD="$tmp"
-
-    LD="$WINLD"
-    LDEXE="$WINLD"
-    LDCXX="$WINLD"
-    LDEXECXX="$WINLD"
-
-    # Extract the first word of "mt", so it can be a program name with args.
-set dummy mt; 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_MT+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$MT"; then
-  ac_cv_prog_MT="$MT" # Let the user override the test.
-else
-  ac_prog_rejected=no
-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
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_MT="mt"
-    $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
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_MT
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set MT to just the basename; use the full file name.
-    shift
-    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-fi
-fi
-MT=$ac_cv_prog_MT
-if test -n "$MT"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
-$as_echo "$MT" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Translate long cygdrive or C:\sdfsf path
-    # into a short mixed mode path that has no
-    # spaces in it.
-    tmp="$MT"
-    if test "x$BUILD_OS" = "xwindows"; then
-        tmp=`$CYGPATH -u "$MT"`
-        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
-    MT="$tmp"
-
-    # The resource compiler
-    # Extract the first word of "rc", so it can be a program name with args.
-set dummy rc; 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_RC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$RC"; then
-  ac_cv_prog_RC="$RC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-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
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_RC="rc"
-    $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
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_RC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set RC to just the basename; use the full file name.
-    shift
-    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-fi
-fi
-RC=$ac_cv_prog_RC
-if test -n "$RC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
-$as_echo "$RC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Translate long cygdrive or C:\sdfsf path
-    # into a short mixed mode path that has no
-    # spaces in it.
-    tmp="$RC"
-    if test "x$BUILD_OS" = "xwindows"; then
-        tmp=`$CYGPATH -u "$RC"`
-        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
-    RC="$tmp"
-
-
-    RC_FLAGS="-nologo /l 0x409 /r"
-    if test "x$VARIANT" = xOPT; then :
-
-        RC_FLAGS="$RC_FLAGS -d NDEBUG"
-
-fi
-    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
-    if test "x$JDK_UPDATE_VERSION" = x; then :
-
-        JDK_UPDATE_VERSION_NOTNULL=0
-
-fi
-    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
-    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
-    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
-    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
-    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
-    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
-    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
-
-    # lib.exe is used to create static libraries.
-    # Extract the first word of "lib", so it can be a program name with args.
-set dummy lib; 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_WINAR+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$WINAR"; then
-  ac_cv_prog_WINAR="$WINAR" # 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_WINAR="lib"
-    $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
-WINAR=$ac_cv_prog_WINAR
-if test -n "$WINAR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
-$as_echo "$WINAR" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Translate long cygdrive or C:\sdfsf path
-    # into a short mixed mode path that has no
-    # spaces in it.
-    tmp="$WINAR"
-    if test "x$BUILD_OS" = "xwindows"; then
-        tmp=`$CYGPATH -u "$WINAR"`
-        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
-    WINAR="$tmp"
-
-    AR="$WINAR"
-    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
-
-    # Extract the first word of "dumpbin", so it can be a program name with args.
-set dummy dumpbin; 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_DUMPBIN+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$DUMPBIN"; then
-  ac_cv_prog_DUMPBIN="$DUMPBIN" # 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_DUMPBIN="dumpbin"
-    $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
-DUMPBIN=$ac_cv_prog_DUMPBIN
-if test -n "$DUMPBIN"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
-$as_echo "$DUMPBIN" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # Translate long cygdrive or C:\sdfsf path
-    # into a short mixed mode path that has no
-    # spaces in it.
-    tmp="$DUMPBIN"
-    if test "x$BUILD_OS" = "xwindows"; then
-        tmp=`$CYGPATH -u "$DUMPBIN"`
-        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
-    DUMPBIN="$tmp"
-
-
-    COMPILER_TYPE=CL
-    CCXXFLAGS="$CCXXFLAGS -nologo"
-    LDFLAGS="$LDFLAGS -nologo -opt:ref -incremental:no"
-    if test "x$LEGACY_HOST_CPU1" = xi586; then
-        LDFLAGS="$LDFLAGS -safeseh"
-    fi
-    # TODO: make -debug optional "--disable-full-debug-symbols"
-    LDFLAGS="$LDFLAGS -debug"
-
-fi
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-  break
-fi
-
-    done
-    ac_cv_prog_CPP=$CPP
-
-fi
-  CPP=$ac_cv_prog_CPP
-else
-  ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5 ; }
-fi
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-    # 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="$CPP"
-    car="${tmp%% *}"
-    tmp="$CPP EOL"
-    cdr="${tmp#* }"
-    # On windows we want paths without spaces.
-    if test "x$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$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
-        CPP="$car ${cdr% *}"
-    else
-        CPP="$car"
-    fi
-
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
-$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
-if test -z "$CXXCPP"; then
-  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-      # Double quotes because CXXCPP needs to be expanded
-    for CXXCPP in "$CXX -E" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
-
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-  break
-fi
-
-    done
-    ac_cv_prog_CXXCPP=$CXXCPP
-
-fi
-  CXXCPP=$ac_cv_prog_CXXCPP
-else
-  ac_cv_prog_CXXCPP=$CXXCPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
-$as_echo "$CXXCPP" >&6; }
-ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
-
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5 ; }
-fi
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-    # 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="$CXXCPP"
-    car="${tmp%% *}"
-    tmp="$CXXCPP EOL"
-    cdr="${tmp#* }"
-    # On windows we want paths without spaces.
-    if test "x$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$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
-        CXXCPP="$car ${cdr% *}"
-    else
-        CXXCPP="$car"
-    fi
-
-
-# Find the right assembler.
-if test "x$BUILD_OS" = xsolaris; then
-    # Extract the first word of "as", so it can be a program name with args.
-set dummy as; 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_AS+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $AS in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_AS="$AS" # 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_AS="$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
-AS=$ac_cv_path_AS
-if test -n "$AS"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
-$as_echo "$AS" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # 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="$AS"
-    car="${tmp%% *}"
-    tmp="$AS EOL"
-    cdr="${tmp#* }"
-    # On windows we want paths without spaces.
-    if test "x$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$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
-        AS="$car ${cdr% *}"
-    else
-        AS="$car"
-    fi
-
-    ASFLAGS=" "
-else
-    AS="$CC -c"
-    ASFLAGS=" "
-fi
-
-
-
-if test "x$HOST_CPU_BITS" = x32 && test "x$HOST_OS" = xmacosx; then
-    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
-    # While waiting for a better solution, the current workaround is to use -mstackrealign.
-    CFLAGS="$CFLAGS -mstackrealign"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
-$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int main() { return 0; }
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; 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; }
-	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-
-if test "x$BUILD_OS" = xsolaris; then
-    # Extract the first word of "nm", so it can be a program name with args.
-set dummy nm; 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_NM+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $NM in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_NM="$NM" # 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_NM="$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
-NM=$ac_cv_path_NM
-if test -n "$NM"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
-$as_echo "$NM" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # 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="$NM"
-    car="${tmp%% *}"
-    tmp="$NM EOL"
-    cdr="${tmp#* }"
-    # On windows we want paths without spaces.
-    if test "x$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$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
-        NM="$car ${cdr% *}"
-    else
-        NM="$car"
-    fi
-
-    # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; 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_STRIP+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $STRIP in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_STRIP="$STRIP" # 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_STRIP="$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
-STRIP=$ac_cv_path_STRIP
-if test -n "$STRIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # 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="$STRIP"
-    car="${tmp%% *}"
-    tmp="$STRIP EOL"
-    cdr="${tmp#* }"
-    # On windows we want paths without spaces.
-    if test "x$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$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
-        STRIP="$car ${cdr% *}"
-    else
-        STRIP="$car"
-    fi
-
-    # Extract the first word of "mcs", so it can be a program name with args.
-set dummy mcs; 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_MCS+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $MCS in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_MCS="$MCS" # 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_MCS="$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
-MCS=$ac_cv_path_MCS
-if test -n "$MCS"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
-$as_echo "$MCS" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-    # 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="$MCS"
-    car="${tmp%% *}"
-    tmp="$MCS EOL"
-    cdr="${tmp#* }"
-    # On windows we want paths without spaces.
-    if test "x$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$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
-        MCS="$car ${cdr% *}"
-    else
-        MCS="$car"
-    fi
-
-else
-    if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
-set dummy ${ac_tool_prefix}nm; 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_NM+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$NM"; then
-  ac_cv_prog_NM="$NM" # 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_NM="${ac_tool_prefix}nm"
-    $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
-NM=$ac_cv_prog_NM
-if test -n "$NM"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
-$as_echo "$NM" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_NM"; then
-  ac_ct_NM=$NM
-  # Extract the first word of "nm", so it can be a program name with args.
-set dummy nm; 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_ac_ct_NM+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_NM"; then
-  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # 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_ac_ct_NM="nm"
-    $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
-ac_ct_NM=$ac_cv_prog_ac_ct_NM
-if test -n "$ac_ct_NM"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
-$as_echo "$ac_ct_NM" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_NM" = x; then
-    NM=""
-  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
-    NM=$ac_ct_NM
-  fi
-else
-  NM="$ac_cv_prog_NM"
-fi
-
-
-    # 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="$NM"
-    car="${tmp%% *}"
-    tmp="$NM EOL"
-    cdr="${tmp#* }"
-    # On windows we want paths without spaces.
-    if test "x$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$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
-        NM="$car ${cdr% *}"
-    else
-        NM="$car"
-    fi
-
-    if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; 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_STRIP+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip"
-    $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
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; 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_ac_ct_STRIP+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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_ac_ct_STRIP="strip"
-    $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
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=""
-  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
-    STRIP=$ac_ct_STRIP
-  fi
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
-
-
-    # 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="$STRIP"
-    car="${tmp%% *}"
-    tmp="$STRIP EOL"
-    cdr="${tmp#* }"
-    # On windows we want paths without spaces.
-    if test "x$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$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
-        STRIP="$car ${cdr% *}"
-    else
-        STRIP="$car"
-    fi
-
-fi
-
-# 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$BUILD_OS" = xwindows; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if uncygdrive can be created" >&5
-$as_echo_n "checking if uncygdrive can be created... " >&6; }
-    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
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-        cat $OUTPUT_ROOT/uncygdrive1.log
-        as_fn_error $? "Could not create $OUTPUT_ROOT/uncygdrive.exe" "$LINENO" 5
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNCYGDRIVE" >&5
-$as_echo "$UNCYGDRIVE" >&6; }
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if uncygdrive.exe works" >&5
-$as_echo_n "checking if uncygdrive.exe works... " >&6; }
-    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
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-        cat $OUTPUT_ROOT/uncygdrive2.log
-        as_fn_error $? "Uncygdrive did not work!" "$LINENO" 5
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-    rm -f $OUTPUT_ROOT/uncygdrive?.??? $OUTPUT_ROOT/uncygdrive.obj
-fi
-
-
-
-
-    # Check whether --enable-ccache was given.
-if test "${enable_ccache+set}" = set; then :
-  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
-else
-  ENABLE_CCACHE=yes
-fi
-
-    if test "x$ENABLE_CCACHE" = xyes; then
-        # Extract the first word of "ccache", so it can be a program name with args.
-set dummy ccache; 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_CCACHE+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $CCACHE in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_CCACHE="$CCACHE" # 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_CCACHE="$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
-CCACHE=$ac_cv_path_CCACHE
-if test -n "$CCACHE"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
-$as_echo "$CCACHE" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
-$as_echo_n "checking for ccache... " >&6; }
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
-$as_echo "explicitly disabled" >&6; }
-        CCACHE=
-    fi
-
-
-
-# Check whether --with-ccache-dir was given.
-if test "${with_ccache_dir+set}" = set; then :
-  withval=$with_ccache_dir;
-fi
-
-
-    if test "x$with_ccache_dir" != x; then
-        # When using a non home ccache directory, assume the use is to share ccache files
-        # with other users. Thus change the umask.
-        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
-    fi
-    CCACHE_FOUND=""
-    if test "x$CCACHE" != x; then
-
-    if test "x$CCACHE" != x; then
-        CCACHE_FOUND="true"
-        # Only use ccache if it is 3.1.4 or later, which supports
-        # precompiled headers.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
-$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
-        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
-        if test "x$HAS_GOOD_CCACHE" = x; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
-$as_echo "no, disabling ccache" >&6; }
-            CCACHE=
-        else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
-$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
-            PUSHED_FLAGS="$CXXFLAGS"
-            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
-            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  CC_KNOWS_CCACHE_TRICK=yes
-else
-  CC_KNOWS_CCACHE_TRICK=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-            CXXFLAGS="$PUSHED_FLAGS"
-            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; 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, disabling ccaching of precompiled headers" >&5
-$as_echo "no, disabling ccaching of precompiled headers" >&6; }
-                CCACHE=
-            fi
-        fi
-    fi
-
-    if test "x$CCACHE" != x; then
-        CCACHE_SLOPPINESS=time_macros
-        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
-        CCACHE_FLAGS=-fpch-preprocess
-
-        if test "x$SET_CCACHE_DIR" != x; then
-            mkdir -p $CCACHE_DIR > /dev/null 2>&1
-	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
-        fi
-    fi
-
-    fi
-
-
-# Used on GNU/Linux systems, can be empty...
-#AC_PATH_PROG(ELFDUMP, elfdump)
-
-# Setup default logging of stdout and stderr to build.log in the output root.
-BUILD_LOG='$(OUTPUT_ROOT)/build.log'
-BUILD_LOG_WRAPPER='$(SH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
-
-
-
-###############################################################################
-#
-# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
-# (The JVM can use 32 or 64 bit Java pointers but that decision
-# is made at runtime.)
-#
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-OLD_CXXFLAGS="$CXXFLAGS"
-if test "x$HOST_OS" = xsolaris && test "x$with_data_model" != x; then
-	CXXFLAGS="-m{$with_data_model} $CXXFLAGS"
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_cv_header_stdc=yes
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then :
-  :
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-	|| toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_run "$LINENO"; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-		  inttypes.h stdint.h unistd.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
-$as_echo_n "checking size of int *... " >&6; }
-if test "${ac_cv_sizeof_int_p+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_int_p" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (int *)
-See \`config.log' for more details" "$LINENO" 5 ; }
-   else
-     ac_cv_sizeof_int_p=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
-$as_echo "$ac_cv_sizeof_int_p" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT_P $ac_cv_sizeof_int_p
-_ACEOF
-
-
-CXXFLAGS="$OLD_CXXFLAGS"
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-if test "x$ac_cv_sizeof_int_p" = x0; then
-    # The test failed, lets pick the assumed value.
-    ARCH_DATA_MODEL=$HOST_CPU_BITS
-else
-    ARCH_DATA_MODEL=`expr 8 \* $ac_cv_sizeof_int_p`
-fi
-
-if test "x$ARCH_DATA_MODEL" = x64; then
-    A_LP64="LP64:="
-    ADD_LP64="-D_LP64=1"
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for host address size" >&5
-$as_echo_n "checking for host address size... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARCH_DATA_MODEL bits" >&5
-$as_echo "$ARCH_DATA_MODEL bits" >&6; }
-LP64=$A_LP64
-
-
-
-if test "x$ARCH_DATA_MODEL" != "x$HOST_CPU_BITS"; then
-    as_fn_error $? "The tested number of bits in the host ($ARCH_DATA_MODEL) differs from the number of bits expected to be found in the host ($HOST_CPU_BITS)" "$LINENO" 5
-fi
-
-###############################################################################
-#
-# Can the C/C++ compiler use precompiled headers?
-#
-# Check whether --enable-precompiled-headers was given.
-if test "${enable_precompiled_headers+set}" = set; then :
-  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled-headers}
-else
-  ENABLE_PRECOMPH=yes
-fi
-
-
-USE_PRECOMPILED_HEADER=1
-if test "x$ENABLE_PRECOMPH" = xno; then
-    USE_PRECOMPILED_HEADER=0
-fi
-
-if test "x$ENABLE_PRECOMPH" = xyes; then
-    # Check that the compiler actually supports precomp headers.
-    if test "x$GCC" = xyes; then
-         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
-$as_echo_n "checking that precompiled headers work... " >&6; }
-         echo "int alfa();" > conftest.h
-         $CXX -x c++-header conftest.h -o conftest.hpp.gch
-         if test ! -f conftest.hpp.gch; then
-             echo Precompiled header is not working!
-             USE_PRECOMPILED_HEADER=0
-             { $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
-         rm -f conftest.h
-    fi
-fi
-
-
-
-###############################################################################
-#
-# How to compile shared libraries.
-#
-
-if test "x$GCC" = xyes; then
-    COMPILER_NAME=gcc
-    PICFLAG="-fPIC"
-    LIBRARY_PREFIX=lib
-    SHARED_LIBRARY='lib$1.so'
-    STATIC_LIBRARY='lib$1.a'
-    SHARED_LIBRARY_FLAGS="-shared"
-    SHARED_LIBRARY_SUFFIX='.so'
-    STATIC_LIBRARY_SUFFIX='.a'
-    OBJ_SUFFIX='.o'
-    EXE_SUFFIX=''
-    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
-    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
-    C_FLAG_REORDER=''
-    CXX_FLAG_REORDER=''
-    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN/$1'
-    LD="$CC"
-    LDEXE="$CC"
-    LDCXX="$CXX"
-    LDEXECXX="$CXX"
-    # TODO: for embedded set --strip-unneeded
-    POST_STRIP_CMD="$STRIP -g"
-
-    # Linking is different on MacOSX
-    if test "x$BUILD_OS" = xmacosx; then
-        # Might change in the future to clang.
-        COMPILER_NAME=gcc
-        SHARED_LIBRARY='lib$1.dylib'
-        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
-        SHARED_LIBRARY_SUFFIX='.dylib'
-        EXE_SUFFIX=''
-        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
-        SET_SHARED_LIBRARY_MAPFILE=''
-        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
-        POST_STRIP_CMD="$STRIP -S"
-    fi
-else
-    if test "x$BUILD_OS" = xsolaris; then
-        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
-        COMPILER_NAME=ossc
-        PICFLAG="-KPIC"
-        LIBRARY_PREFIX=lib
-        SHARED_LIBRARY='lib$1.so'
-        STATIC_LIBRARY='lib$1.a'
-        SHARED_LIBRARY_FLAGS="-G"
-        SHARED_LIBRARY_SUFFIX='.so'
-        STATIC_LIBRARY_SUFFIX='.a'
-        OBJ_SUFFIX='.o'
-        EXE_SUFFIX=''
-        SET_SHARED_LIBRARY_NAME=''
-        SET_SHARED_LIBRARY_MAPFILE='-M $1'
-	C_FLAG_REORDER='-xF'
-	CXX_FLAG_REORDER='-xF'
-        SET_SHARED_LIBRARY_ORIGIN='-R \$$$$ORIGIN/$1'
-        CFLAGS_JDKLIB_EXTRA='-xstrconst -D__solaris__'
-        POST_STRIP_CMD="$STRIP -x"
-        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
-    fi
-    if test "x$BUILD_OS" = xwindows; then
-        # If it is not gcc, then assume it is the MS Visual Studio compiler
-        COMPILER_NAME=cl
-        PICFLAG=""
-        LIBRARY_PREFIX=
-        SHARED_LIBRARY='$1.dll'
-        STATIC_LIBRARY='$1.lib'
-        SHARED_LIBRARY_FLAGS="-LD"
-        SHARED_LIBRARY_SUFFIX='.dll'
-        STATIC_LIBRARY_SUFFIX='.lib'
-        OBJ_SUFFIX='.obj'
-        EXE_SUFFIX='.exe'
-        SET_SHARED_LIBRARY_NAME=''
-        SET_SHARED_LIBRARY_MAPFILE=''
-        SET_SHARED_LIBRARY_ORIGIN=''
-    fi
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# The (cross) compiler is now configured, we can now test capabilities
-# of the host platform.
-
-###############################################################################
-#
-# Is the host little of big endian?
-#
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
-$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
-if test "${ac_cv_c_bigendian+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_c_bigendian=unknown
-    # See if we're dealing with a universal compiler.
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifndef __APPLE_CC__
-	       not a universal capable compiler
-	     #endif
-	     typedef int dummy;
-
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-
-	# Check for potential -arch flags.  It is not universal unless
-	# there are at least two -arch flags with different values.
-	ac_arch=
-	ac_prev=
-	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
-	 if test -n "$ac_prev"; then
-	   case $ac_word in
-	     i?86 | x86_64 | ppc | ppc64)
-	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
-		 ac_arch=$ac_word
-	       else
-		 ac_cv_c_bigendian=universal
-		 break
-	       fi
-	       ;;
-	   esac
-	   ac_prev=
-	 elif test "x$ac_word" = "x-arch"; then
-	   ac_prev=arch
-	 fi
-       done
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    if test $ac_cv_c_bigendian = unknown; then
-      # See if sys/param.h defines the BYTE_ORDER macro.
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-	     #include <sys/param.h>
-
-int
-main ()
-{
-#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
-		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
-		     && LITTLE_ENDIAN)
-	      bogus endian macros
-	     #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  # It does; now see whether it defined to BIG_ENDIAN or not.
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-		#include <sys/param.h>
-
-int
-main ()
-{
-#if BYTE_ORDER != BIG_ENDIAN
-		 not big endian
-		#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_cv_c_bigendian=yes
-else
-  ac_cv_c_bigendian=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    if test $ac_cv_c_bigendian = unknown; then
-      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <limits.h>
-
-int
-main ()
-{
-#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
-	      bogus endian macros
-	     #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  # It does; now see whether it defined to _BIG_ENDIAN or not.
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <limits.h>
-
-int
-main ()
-{
-#ifndef _BIG_ENDIAN
-		 not big endian
-		#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_cv_c_bigendian=yes
-else
-  ac_cv_c_bigendian=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    if test $ac_cv_c_bigendian = unknown; then
-      # Compile a test program.
-      if test "$cross_compiling" = yes; then :
-  # Try to guess by grepping values from an object file.
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-short int ascii_mm[] =
-		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-		short int ascii_ii[] =
-		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
-		int use_ascii (int i) {
-		  return ascii_mm[i] + ascii_ii[i];
-		}
-		short int ebcdic_ii[] =
-		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
-		short int ebcdic_mm[] =
-		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
-		int use_ebcdic (int i) {
-		  return ebcdic_mm[i] + ebcdic_ii[i];
-		}
-		extern int foo;
-
-int
-main ()
-{
-return use_ascii (foo) == use_ebcdic (foo);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
-	      ac_cv_c_bigendian=yes
-	    fi
-	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
-	      if test "$ac_cv_c_bigendian" = unknown; then
-		ac_cv_c_bigendian=no
-	      else
-		# finding both strings is unlikely to happen, but who knows?
-		ac_cv_c_bigendian=unknown
-	      fi
-	    fi
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-
-	     /* Are we little or big endian?  From Harbison&Steele.  */
-	     union
-	     {
-	       long int l;
-	       char c[sizeof (long int)];
-	     } u;
-	     u.l = 1;
-	     return u.c[sizeof (long int) - 1] == 1;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_run "$LINENO"; then :
-  ac_cv_c_bigendian=no
-else
-  ac_cv_c_bigendian=yes
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-    fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
-$as_echo "$ac_cv_c_bigendian" >&6; }
- case $ac_cv_c_bigendian in #(
-   yes)
-     ENDIAN="big";; #(
-   no)
-     ENDIAN="little" ;; #(
-   universal)
-     ENDIAN="universal"
-     ;; #(
-   *)
-     ENDIAN="unknown" ;;
- esac
-
-
-if test "x$ENDIAN" = xuniversal; then
-    as_fn_error $? "It seems like someone needs to decide how we are to deal with universal binaries on the MacOSX?" "$LINENO" 5
-fi
-if test "x$ENDIAN" = xunknown; then
-    ENDIAN="$HOST_CPU_ENDIAN"
-fi
-if test "x$ENDIAN" != "x$HOST_CPU_ENDIAN"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The tested endian in the host ($ENDIAN) differs from the endian expected to be found in the host ($HOST_CPU_ENDIAN)" >&5
-$as_echo "$as_me: WARNING: The tested endian in the host ($ENDIAN) differs from the endian expected to be found in the host ($HOST_CPU_ENDIAN)" >&2;}
-    ENDIAN="$HOST_CPU_ENDIAN"
-fi
-
-
-###############################################################################
-#
-# We need a Boot JDK to bootstrap the build.
-#
-BOOT_JDK_FOUND=no
-
-# Check whether --with-boot-jdk was given.
-if test "${with_boot_jdk+set}" = set; then :
-  withval=$with_boot_jdk;
-fi
-
-
-if test "x$with_boot_jdk" != x; then
-    BOOT_JDK=$with_boot_jdk
-    BOOT_JDK_FOUND=yes
-fi
-if test "x$BOOT_JDK_FOUND" = xno; then
-
-
-    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
-        # Source the builddeps file again, to make sure it uses the latest variables!
-        . $builddepsfile
-        # Look for a host and build machine specific resource!
-        eval resource=\${builddep_boot-jdk_BUILD_${rewritten_build_var}_HOST_${rewritten_host_var}}
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a host specific resource
-            eval resource=\${builddep_boot-jdk_HOST_${rewritten_host_var}}
-        fi
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a build specific resource
-            eval resource=\${builddep_boot-jdk_BUILD_${rewritten_build_var}}
-        fi
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a generic resource
-            # (The boot-jdk comes from M4 and not the shell, thus no need for eval here.)
-            resource=${builddep_boot-jdk}
-        fi
-        if test "x$resource" != x; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for boot-jdk" >&5
-$as_echo "$as_me: Using builddeps $resource for boot-jdk" >&6;}
-	    # If the resource in the builddeps.conf file is an existing directory,
-	    # for example /java/linux/cups
-	    if test -d ${resource}; then
-	       depdir=${resource}
-	    else
-
-# boot-jdk is for example mymodule
-# $resource is for example libs/general/libmymod_1_2_3.zip
-# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
-# $with_builddeps_dir is for example /localhome/builddeps
-# depdir is the name of the variable into which we store the depdir, eg MYMOD
-# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
-# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
-    filename=`basename $resource`
-    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
-    filebase=${filename%%.*}
-    extension=${filename#*.}
-    installdir=$with_builddeps_dir/$filebase
-    if test ! -f $installdir/$filename.unpacked; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency boot-jdk from $with_builddeps_server/$resource and installing into $installdir" >&5
-$as_echo "$as_me: Downloading build dependency boot-jdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
-        if test ! -d $installdir; then
-            mkdir -p $installdir
-        fi
-        if test ! -d $installdir; then
-            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
-        fi
-        tmpfile=`mktemp $installdir/boot-jdk.XXXXXXXXX`
-        touch $tmpfile
-        if test ! -f $tmpfile; then
-            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
-        fi
-
-    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
-    # $tmpfile is the local file name for the downloaded file.
-    VALID_TOOL=no
-    if test "x$BDEPS_FTP" = xwget; then
-       VALID_TOOL=yes
-       wget -O $tmpfile $with_builddeps_server/$resource
-    fi
-    if test "x$BDEPS_FTP" = xlftp; then
-       VALID_TOOL=yes
-       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
-    fi
-    if test "x$BDEPS_FTP" = xftp; then
-        VALID_TOOL=yes
-        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
-        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
-        FTPUSERPWD=${FTPSERVER%%@*}
-        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
-            FTPUSER=${userpwd%%:*}
-            FTPPWD=${userpwd#*@}
-            FTPSERVER=${FTPSERVER#*@}
-        else
-            FTPUSER=ftp
-            FTPPWD=ftp
-        fi
-        # the "pass" command does not work on some
-        # ftp clients (read ftp.exe) but if it works,
-        # passive mode is better!
-        (\
-            echo "user $FTPUSER $FTPPWD"        ;\
-            echo "pass"                         ;\
-            echo "bin"                          ;\
-            echo "get $FTPPATH $tmpfile"              ;\
-        ) | ftp -in $FTPSERVER
-    fi
-    if test "x$VALID_TOOL" != xyes; then
-       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
-    fi
-
-        mv $tmpfile $installdir/$filename
-        if test ! -s $installdir/$filename; then
-            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
-        fi
-        case "$extension" in
-            zip)  echo "Unzipping $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
-            ;;
-            tar.gz) echo "Untaring $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-            ;;
-            tgz) echo "Untaring $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-            ;;
-            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
-            ;;
-        esac
-    fi
-    if test -f $installdir/$filename.unpacked; then
-        depdir=$installdir
-    fi
-
-	    fi
-            # Source the builddeps file again, because in the previous command, the depdir
-            # was updated to point at the current build dependency install directory.
-            . $builddepsfile
-            # Now extract variables from the builddeps.conf files.
-            theroot=${builddep_boot-jdk_ROOT}
-            thecflags=${builddep_boot-jdk_CFLAGS}
-            thelibs=${builddep_boot-jdk_LIBS}
-            if test "x$depdir" = x; then
-                as_fn_error $? "Could not download build dependency boot-jdk" "$LINENO" 5
-            fi
-            BOOT_JDK=$depdir
-            if test "x$theroot" != x; then
-               BOOT_JDK="$theroot"
-            fi
-            if test "x$thecflags" != x; then
-               BOOT_JDK_CFLAGS="$thecflags"
-            fi
-            if test "x$thelibs" != x; then
-               BOOT_JDK_LIBS="$thelibs"
-            fi
-            BOOT_JDK_FOUND=yes
-            else BOOT_JDK_FOUND=no
-
-        fi
-        else BOOT_JDK_FOUND=no
-
-    fi
-
-fi
-
-if test "x$BOOT_JDK_FOUND" = xno; then
-    if test "x$JAVA_HOME" != x; then
-        if test ! -d "$JAVA_HOME"; then
-            as_fn_error $? "Your JAVA_HOME points to a non-existing directory!" "$LINENO" 5
-        fi
-        # Aha, the user has set a JAVA_HOME
-        # let us use that as the Boot JDK.
-        BOOT_JDK="$JAVA_HOME"
-        BOOT_JDK_FOUND=yes
-        # To be on the safe side, lets check that it is a JDK.
-        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
-            JAVAC="$BOOT_JDK/bin/javac"
-            JAVA="$BOOT_JDK/bin/java"
-            BOOT_JDK_FOUND=yes
-        else
-            as_fn_error $? "Your JAVA_HOME points to a JRE! The build needs a JDK! Please point JAVA_HOME to a JDK. JAVA_HOME=$JAVA_HOME" "$LINENO" 5
-        fi
-    fi
-fi
-
-if test "x$BOOT_JDK_FOUND" = xno; then
-    # Extract the first word of "javac", so it can be a program name with args.
-set dummy javac; 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_JAVAC_CHECK+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $JAVAC_CHECK in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # 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_JAVAC_CHECK="$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
-JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
-if test -n "$JAVAC_CHECK"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
-$as_echo "$JAVAC_CHECK" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    # Extract the first word of "java", so it can be a program name with args.
-set dummy java; 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_JAVA_CHECK+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $JAVA_CHECK in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # 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_JAVA_CHECK="$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
-JAVA_CHECK=$ac_cv_path_JAVA_CHECK
-if test -n "$JAVA_CHECK"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
-$as_echo "$JAVA_CHECK" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    BINARY="$JAVAC_CHECK"
-    if test "x$JAVAC_CHECK" = x; then
-        BINARY="$JAVA_CHECK"
-    fi
-    if test "x$BINARY" != x; then
-        # So there is a java(c) binary, it might be part of a JDK.
-        # 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.
-
-    # Translate long cygdrive or C:\sdfsf path
-    # into a short mixed mode path that has no
-    # spaces in it.
-    tmp="$BINARY"
-    if test "x$BUILD_OS" = "xwindows"; then
-        tmp=`$CYGPATH -u "$BINARY"`
-        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
-    BINARY="$tmp"
-
-
-    if test "x$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
-            BINARY=`$READLINK -f $BINARY`
-        else
-            STARTDIR=$PWD
-            COUNTER=0
-            DIR=`dirname $BINARY`
-            FIL=`basename $BINARY`
-            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
-            BINARY=$DIR/$FIL
-        fi
-    fi
-
-        BOOT_JDK=`dirname $BINARY`
-        BOOT_JDK=`cd $BOOT_JDK/..; pwd`
-        if test -x $BOOT_JDK/bin/javac && test -x $BOOT_JDK/bin/java; then
-            JAVAC=$BOOT_JDK/bin/javac
-            JAVA=$BOOT_JDK/bin/java
-            BOOT_JDK_FOUND=yes
-        fi
-    fi
-fi
-
-if test "x$BOOT_JDK_FOUND" = xno; then
-    # Try the MacOSX way.
-    if test -x /usr/libexec/java_home; then
-        BOOT_JDK=`/usr/libexec/java_home`
-        if test -x $BOOT_JDK/bin/javac && test -x $BOOT_JDK/bin/java; then
-            JAVAC=$BOOT_JDK/bin/javac
-            JAVA=$BOOT_JDK/bin/java
-            BOOT_JDK_FOUND=yes
-        fi
-    fi
-fi
-
-if test "x$BOOT_JDK_FOUND" = xno; then
-    # Extract the first word of "java", so it can be a program name with args.
-set dummy java; 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_JAVA_CHECK+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $JAVA_CHECK in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # 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_JAVA_CHECK="$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
-JAVA_CHECK=$ac_cv_path_JAVA_CHECK
-if test -n "$JAVA_CHECK"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
-$as_echo "$JAVA_CHECK" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    if test "x$JAVA_CHECK" != x; then
-        # There is a java in the path. But apparently we have not found a javac
-        # in the path, since that would have been tested earlier.
-        if test "x$HOST_OS" = xwindows; then
-            # Now if this is a windows platform. The default installation of a JDK
-            # actually puts the JRE in the path and keeps the JDK out of the path!
-            # Go look in the default installation location.
-            BOOT_JDK=/cygdrive/c/Program\ Files/Java/`ls /cygdrive/c/Program\ Files/Java | grep jdk | sort -r | head --lines 1`
-            if test -d "$BOOT_JDK"; then
-                BOOT_JDK_FOUND=yes
-            fi
-        fi
-        if test "x$BOOT_JDK_FOUND" = xno; then
-            help_on_build_dependency openjdk
-            as_fn_error $? "Found a JRE, not not a JDK! Please remove the JRE from your path and put a JDK there instead. $HELP_MSG" "$LINENO" 5
-        fi
-    else
-        help_on_build_dependency openjdk
-        as_fn_error $? "Could not find a JDK. $HELP_MSG" "$LINENO" 5
-    fi
-fi
-
-
-    if test "x$BUILD_OS" = "xwindows"; then
-        # 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
-
-
-        tmp="$BOOT_JDK"
-        # Convert to C:/ mixed style path without spaces.
-        tmp=`$CYGPATH -s -m "$tmp"`
-        BOOT_JDK="$tmp"
-    fi
-
-
-# Now see if we can find the rt.jar, or its nearest equivalent.
-BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
-
-    # Fail with message the path to the Boot JDK rt.jar (or nearest equivalent) if var BOOT_RTJAR contains a path with no spaces in it.
-    # Unless on Windows, where we can rewrite the path.
-    HAS_SPACE=`echo "$BOOT_RTJAR" | grep " "`
-    if test "x$HAS_SPACE" != x; then
-        if test "x$BUILD_OS" = "xwindows"; then
-            BOOT_RTJAR=`$CYGPATH -s -m -a "$BOOT_RTJAR"`
-            BOOT_RTJAR=`$CYGPATH -u "$BOOT_RTJAR"`
-        else
-            as_fn_error $? "You cannot have spaces in the path to the Boot JDK rt.jar (or nearest equivalent)! \"$BOOT_RTJAR\"" "$LINENO" 5
-        fi
-    fi
-
-
-BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
-
-    # Fail with message the path to the Boot JDK tools.jar (or nearest equivalent) if var BOOT_TOOLSJAR contains a path with no spaces in it.
-    # Unless on Windows, where we can rewrite the path.
-    HAS_SPACE=`echo "$BOOT_TOOLSJAR" | grep " "`
-    if test "x$HAS_SPACE" != x; then
-        if test "x$BUILD_OS" = "xwindows"; then
-            BOOT_TOOLSJAR=`$CYGPATH -s -m -a "$BOOT_TOOLSJAR"`
-            BOOT_TOOLSJAR=`$CYGPATH -u "$BOOT_TOOLSJAR"`
-        else
-            as_fn_error $? "You cannot have spaces in the path to the Boot JDK tools.jar (or nearest equivalent)! \"$BOOT_TOOLSJAR\"" "$LINENO" 5
-        fi
-    fi
-
-
-if test ! -f $BOOT_RTJAR; then
-    # On MacOSX it is called classes.jar
-    BOOT_RTJAR=$BOOT_JDK/../Classes/classes.jar
-    if test ! -f $BOOT_RTJAR; then
-        as_fn_error $? "Cannot find the rt.jar or its equivalent!" "$LINENO" 5
-    fi
-    # Remove the ..
-    BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
-    # The tools.jar is part of classes.jar
-    BOOT_TOOLSJAR="$BOOT_RTJAR"
-fi
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
-$as_echo_n "checking for Boot JDK... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
-$as_echo "$BOOT_JDK" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot rt.jar" >&5
-$as_echo_n "checking for Boot rt.jar... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_RTJAR" >&5
-$as_echo "$BOOT_RTJAR" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot tools.jar" >&5
-$as_echo_n "checking for Boot tools.jar... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_TOOLSJAR" >&5
-$as_echo "$BOOT_TOOLSJAR" >&6; }
-
-# Use the java tool from the Boot JDK.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
-$as_echo_n "checking for java in Boot JDK... " >&6; }
-JAVA=$BOOT_JDK/bin/java
-if test ! -x $JAVA; then
-    as_fn_error $? "Could not find a working java" "$LINENO" 5
-fi
-BOOT_JDK_VERSION=`$JAVA -version 2>&1 | head -n 1`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes $BOOT_JDK_VERSION" >&5
-$as_echo "yes $BOOT_JDK_VERSION" >&6; }
-
-
-# Extra M4 quote needed to protect [] in grep expression.
-FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
-if test "x$FOUND_VERSION_78" = x; then
-    help_on_build_dependency openjdk
-    as_fn_error $? "Your boot-jdk must be version 7 or 8. $HELP_MSG" "$LINENO" 5
-fi
-
-# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
-BOOT_JDK_SOURCETARGET="-source 7 -target 7"
-
-
-# Use the javac tool from the Boot JDK.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
-$as_echo_n "checking for javac in Boot JDK... " >&6; }
-JAVAC=$BOOT_JDK/bin/javac
-if test ! -x $JAVAC; then
-    as_fn_error $? "Could not find a working javac" "$LINENO" 5
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-
-
-# Use the javah tool from the Boot JDK.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
-$as_echo_n "checking for javah in Boot JDK... " >&6; }
-JAVAH=$BOOT_JDK/bin/javah
-if test ! -x $JAVAH; then
-    as_fn_error $? "Could not find a working javah" "$LINENO" 5
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-
-# Use the jar tool from the Boot JDK.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
-$as_echo_n "checking for jar in Boot JDK... " >&6; }
-JAR=$BOOT_JDK/bin/jar
-if test ! -x $JAR; then
-    as_fn_error $? "Could not find a working jar" "$LINENO" 5
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-# Use the rmic tool from the Boot JDK.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
-$as_echo_n "checking for rmic in Boot JDK... " >&6; }
-RMIC=$BOOT_JDK/bin/rmic
-if test ! -x $RMIC; then
-    as_fn_error $? "Could not find a working rmic" "$LINENO" 5
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-# Use the native2ascii tool from the Boot JDK.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
-$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
-NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
-if test ! -x $NATIVE2ASCII; then
-    as_fn_error $? "Could not find a working native2ascii" "$LINENO" 5
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-
-###############################################################################
-#
-# Pickup additional source for a component from outside of the source root
-# or override source for a component.
-#
-
-# Check whether --with-add-source-root was given.
-if test "${with_add_source_root+set}" = set; then :
-  withval=$with_add_source_root;
-fi
-
-
-
-# Check whether --with-override-source-root was given.
-if test "${with_override_source_root+set}" = set; then :
-  withval=$with_override_source_root;
-fi
-
-
-
-# Check whether --with-adds-and-overrides was given.
-if test "${with_adds_and_overrides+set}" = set; then :
-  withval=$with_adds_and_overrides;
-fi
-
-
-if test "x$with_adds_and_overrides" != x; then
-    with_add_source_root="$with_adds_and_overrides/adds"
-    with_override_source_root="$with_adds_and_overrides/overrides"
-fi
-
-if test "x$with_add_source_root" != x; then
-    if ! test -d $with_add_source_root; then
-       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
-    fi
-    CURDIR="$PWD"
-    cd "$with_add_source_root"
-    ADD_SRC_ROOT="`pwd`"
-    cd "$CURDIR"
-    # Verify that the addon source root does not have any root makefiles.
-    # If it does, then it is usually an error, prevent this.
-    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
-       test -f $with_add_source_root/langtools/make/Makefile; then
-        as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
-    fi
-    if test -f $with_add_source_root/corba/makefiles/Makefile || \
-       test -f $with_add_source_root/corba/make/Makefile; then
-        as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
-    fi
-    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
-       test -f $with_add_source_root/jaxp/make/Makefile; then
-        as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
-    fi
-    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
-       test -f $with_add_source_root/jaxws/make/Makefile; then
-        as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
-    fi
-    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
-       test -f $with_add_source_root/hotspot/make/Makefile; then
-        as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
-    fi
-    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
-       test -f $with_add_source_root/jdk/make/Makefile; then
-        as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
-    fi
-fi
-
-
-if test "x$with_override_source_root" != x; then
-    if ! test -d $with_override_source_root; then
-       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
-    fi
-    CURDIR="$PWD"
-    cd "$with_override_source_root"
-    OVERRIDE_SRC_ROOT="`pwd`"
-    cd "$CURDIR"
-    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
-       test -f $with_override_source_root/langtools/make/Makefile; then
-        as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
-    fi
-    if test -f $with_override_source_root/corba/makefiles/Makefile || \
-       test -f $with_override_source_root/corba/make/Makefile; then
-        as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
-    fi
-    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
-       test -f $with_override_source_root/jaxp/make/Makefile; then
-        as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
-    fi
-    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
-       test -f $with_override_source_root/jaxws/make/Makefile; then
-        as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
-    fi
-    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
-       test -f $with_override_source_root/hotspot/make/Makefile; then
-        as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
-    fi
-    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
-       test -f $with_override_source_root/jdk/make/Makefile; then
-        as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
-    fi
-fi
-
-
-###############################################################################
-#
-# Override a repo completely, this is used for example when you have 3 small
-# development sandboxes of the langtools sources and want to avoid having 3 full
-# OpenJDK sources checked out on disk.
-#
-# Assuming that the 3 langtools sandboxes are located here:
-# /home/fredrik/sandbox1/langtools
-# /home/fredrik/sandbox2/langtools
-# /home/fredrik/sandbox3/langtools
-#
-# From the source root you create build subdirs manually:
-#     mkdir -p build1 build2 build3
-# in each build directory run:
-#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
-#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
-#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
-#
-
-
-# Check whether --with-override-langtools was given.
-if test "${with_override_langtools+set}" = set; then :
-  withval=$with_override_langtools;
-fi
-
-
-
-# Check whether --with-override-corba was given.
-if test "${with_override_corba+set}" = set; then :
-  withval=$with_override_corba;
-fi
-
-
-
-# Check whether --with-override-jaxp was given.
-if test "${with_override_jaxp+set}" = set; then :
-  withval=$with_override_jaxp;
-fi
-
-
-
-# Check whether --with-override-jaxws was given.
-if test "${with_override_jaxws+set}" = set; then :
-  withval=$with_override_jaxws;
-fi
-
-
-
-# Check whether --with-override-hotspot was given.
-if test "${with_override_hotspot+set}" = set; then :
-  withval=$with_override_hotspot;
-fi
-
-
-
-# Check whether --with-override-jdk was given.
-if test "${with_override_jdk+set}" = set; then :
-  withval=$with_override_jdk;
-fi
-
-
-if test "x$with_override_langtools" != x; then
-    CURDIR="$PWD"
-    cd "$with_override_langtools"
-    LANGTOOLS_TOPDIR="`pwd`"
-    cd "$CURDIR"
-    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
-        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
-$as_echo_n "checking if langtools should be overridden... " >&6; }
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
-$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
-fi
-if test "x$with_override_corba" != x; then
-    CURDIR="$PWD"
-    cd "$with_override_corba"
-    CORBA_TOPDIR="`pwd`"
-    cd "$CURDIR"
-    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
-        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
-$as_echo_n "checking if corba should be overridden... " >&6; }
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
-$as_echo "yes with $CORBA_TOPDIR" >&6; }
-fi
-if test "x$with_override_jaxp" != x; then
-    CURDIR="$PWD"
-    cd "$with_override_jaxp"
-    JAXP_TOPDIR="`pwd`"
-    cd "$CURDIR"
-    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
-        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
-$as_echo_n "checking if jaxp should be overridden... " >&6; }
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
-$as_echo "yes with $JAXP_TOPDIR" >&6; }
-fi
-if test "x$with_override_jaxws" != x; then
-    CURDIR="$PWD"
-    cd "$with_override_jaxws"
-    JAXWS_TOPDIR="`pwd`"
-    cd "$CURDIR"
-    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
-        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
-$as_echo_n "checking if jaxws should be overridden... " >&6; }
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
-$as_echo "yes with $JAXWS_TOPDIR" >&6; }
-fi
-if test "x$with_override_hotspot" != x; then
-    CURDIR="$PWD"
-    cd "$with_override_hotspot"
-    HOTSPOT_TOPDIR="`pwd`"
-    cd "$CURDIR"
-    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
-       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
-        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
-$as_echo_n "checking if hotspot should be overridden... " >&6; }
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
-$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
-fi
-if test "x$with_override_jdk" != x; then
-    CURDIR="$PWD"
-    cd "$with_override_jdk"
-    JDK_TOPDIR="`pwd`"
-    cd "$CURDIR"
-    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
-        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
-$as_echo_n "checking if JDK should be overridden... " >&6; }
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
-$as_echo "yes with $JDK_TOPDIR" >&6; }
-fi
-
-###############################################################################
-#
-# Specify options for anything that is run with the Boot JDK.
-#
-
-# Check whether --with-boot-jdk-jvmargs was given.
-if test "${with_boot_jdk_jvmargs+set}" = set; then :
-  withval=$with_boot_jdk_jvmargs;
-fi
-
-
-if test "x$with_boot_jdk_jvmargs" = x; then
-    # Not all JVM:s accept the same arguments on the command line.
-    # OpenJDK specific increase in thread stack for JDK build,
-    # well more specifically, when running javac.
-    if test "x$BUILD_NUM_BITS" = x32; then
-       STACK_SIZE=768
-    else
-       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
-       # since 64-bit pointers are pushed on the stach. Apparently, we need
-       # to increase the stack space when javacing the JDK....
-       STACK_SIZE=1536
-    fi
-
-    # Minimum amount of heap memory.
-
-    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
-    # If so, then append -Xms64M to boot_jdk_jvmargs
-    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
-    fi
-
-    if test "x$HOST_OS" = "xmacosx"; then
-        # Why does macosx need more heap? Its the huge JDK batch.
-
-    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
-    # If so, then append -Xmx1600M to boot_jdk_jvmargs
-    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
-    fi
-
-    else
-
-    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
-    # If so, then append -Xmx1100M to boot_jdk_jvmargs
-    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
-    fi
-
-    fi
-    # When is adding -client something that speeds up the JVM?
-    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
-
-    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
-    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
-    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
-    fi
-
-
-    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
-    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
-    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
-    fi
-
-
-    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
-    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
-    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
-    fi
-
-    # Disable special log output when a debug build is used as Boot JDK...
-
-    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
-    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
-    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
-    fi
-
-fi
-
-BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
-
-
-
-# Check whether --with-server-java was given.
-if test "${with_server_java+set}" = set; then :
-  withval=$with_server_java;
-fi
-
-
-if test "x$with_server_java" != x; then
-    SERVER_JAVA="$with_server_java"
-    FOUND_VERSION=`$SERVER_JAVA -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" = x; then
-        as_fn_error $? "Could not execute server java: $SERVER_JAVA" "$LINENO" 5
-    fi
-else
-    SERVER_JAVA=""
-    # Hotspot specific options.
-
-    # Test if -XX:+UseParallelOldGC is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
-    # If so, then append -XX:+UseParallelOldGC to SERVER_JAVA
-    FOUND_WARN=`$JAVA -XX:+UseParallelOldGC -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$JAVA -XX:+UseParallelOldGC -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SERVER_JAVA="$SERVER_JAVA -XX:+UseParallelOldGC"
-    fi
-
-
-    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
-    # If so, then append -verbosegc to SERVER_JAVA
-    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SERVER_JAVA="$SERVER_JAVA -verbosegc"
-    fi
-
-    # JRockit specific options.
-
-    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
-    # If so, then append -Xverbose:gc to SERVER_JAVA
-    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SERVER_JAVA="$SERVER_JAVA -Xverbose:gc"
-    fi
-
-    SERVER_JAVA="$JAVA $SERVER_JAVA"
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use shared server for javac" >&5
-$as_echo_n "checking whether to use shared server for javac... " >&6; }
-# Check whether --enable-javac-server was given.
-if test "${enable_javac_server+set}" = set; then :
-  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
-else
-  ENABLE_JAVAC_SERVER='no'
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
-$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
-if test "x$ENABLE_JAVAC_SERVER" = xyes; then
-    JAVAC_USE_REMOTE=true
-    JAVAC_SERVERS="$OUTPUT_ROOT/javacservers"
-else
-    JAVAC_USE_REMOTE=false
-    JAVAC_SERVERS=
-fi
-
-
-
-
-# Check whether --with-javac-server-cores was given.
-if test "${with_javac_server_cores+set}" = set; then :
-  withval=$with_javac_server_cores;
-fi
-
-if test "x$with_javac_server_cores" != x; then
-    JAVAC_SERVER_CORES="$with_javac_server_cores"
-else
-    if test "$NUM_CORES" -gt 16; then
-        # We set this arbitrary limit because we want to limit the heap
-        # size of the javac server.
-        # In the future we will make the javac compilers in the server
-        # share more and more state, thus enabling us to use more and
-        # more concurrent threads in the server.
-        JAVAC_SERVER_CORES="16"
-    else
-        JAVAC_SERVER_CORES="$NUM_CORES"
-    fi
-
-    if test "$MEMORY_SIZE" -gt "17000"; then
-        MAX_HEAP_MEM=10000
-
-    # Test if -d64 is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
-    # If so, then append -d64 to SERVER_JAVA
-    FOUND_WARN=`$SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SERVER_JAVA="$SERVER_JAVA -d64"
-    fi
-
-
-    # Test if -Xms10G -Xmx10G is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
-    # If so, then append -Xms10G -Xmx10G to SERVER_JAVA
-    FOUND_WARN=`$SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SERVER_JAVA="$SERVER_JAVA -Xms10G -Xmx10G"
-    fi
-
-
-    # Test if -Xmn2G is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
-    # If so, then append -Xmn2G to SERVER_JAVA
-    FOUND_WARN=`$SERVER_JAVA -Xmn2G -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$SERVER_JAVA -Xmn2G -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SERVER_JAVA="$SERVER_JAVA -Xmn2G"
-    fi
-
-    elif test "$MEMORY_SIZE" -gt "10000"; then
-        MAX_HEAP_MEM=6000
-
-    # Test if -d64 is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
-    # If so, then append -d64 to SERVER_JAVA
-    FOUND_WARN=`$SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SERVER_JAVA="$SERVER_JAVA -d64"
-    fi
-
-
-    # Test if -Xms6G -Xmx6G is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
-    # If so, then append -Xms6G -Xmx6G to SERVER_JAVA
-    FOUND_WARN=`$SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SERVER_JAVA="$SERVER_JAVA -Xms6G -Xmx6G"
-    fi
-
-
-    # Test if -Xmn1G is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
-    # If so, then append -Xmn1G to SERVER_JAVA
-    FOUND_WARN=`$SERVER_JAVA -Xmn1G -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$SERVER_JAVA -Xmn1G -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SERVER_JAVA="$SERVER_JAVA -Xmn1G"
-    fi
-
-    elif test "$MEMORY_SIZE" -gt "5000"; then
-        MAX_HEAP_MEM=3000
-
-    # Test if -d64 is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
-    # If so, then append -d64 to SERVER_JAVA
-    FOUND_WARN=`$SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SERVER_JAVA="$SERVER_JAVA -d64"
-    fi
-
-
-    # Test if -Xms1G -Xmx3G is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
-    # If so, then append -Xms1G -Xmx3G to SERVER_JAVA
-    FOUND_WARN=`$SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SERVER_JAVA="$SERVER_JAVA -Xms1G -Xmx3G"
-    fi
-
-
-    # Test if -Xmn256M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
-    # If so, then append -Xmn256M to SERVER_JAVA
-    FOUND_WARN=`$SERVER_JAVA -Xmn256M -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$SERVER_JAVA -Xmn256M -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SERVER_JAVA="$SERVER_JAVA -Xmn256M"
-    fi
-
-    elif test "$MEMORY_SIZE" -gt "3800"; then
-        MAX_HEAP_MEM=2500
-
-    # Test if -Xms1G -Xmx2500M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
-    # If so, then append -Xms1G -Xmx2500M to SERVER_JAVA
-    FOUND_WARN=`$SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SERVER_JAVA="$SERVER_JAVA -Xms1G -Xmx2500M"
-    fi
-
-
-    # Test if -Xmn256M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
-    # If so, then append -Xmn256M to SERVER_JAVA
-    FOUND_WARN=`$SERVER_JAVA -Xmn256M -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$SERVER_JAVA -Xmn256M -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SERVER_JAVA="$SERVER_JAVA -Xmn256M"
-    fi
-
-    elif test "$MEMORY_SIZE" -gt "1900"; then
-        MAX_HEAP_MEM=1200
-
-    # Test if -Xms700M -Xmx1200M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
-    # If so, then append -Xms700M -Xmx1200M to SERVER_JAVA
-    FOUND_WARN=`$SERVER_JAVA -Xms700M -Xmx1200M -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$SERVER_JAVA -Xms700M -Xmx1200M -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SERVER_JAVA="$SERVER_JAVA -Xms700M -Xmx1200M"
-    fi
-
-
-    # Test if -Xmn256M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
-    # If so, then append -Xmn256M to SERVER_JAVA
-    FOUND_WARN=`$SERVER_JAVA -Xmn256M -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$SERVER_JAVA -Xmn256M -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SERVER_JAVA="$SERVER_JAVA -Xmn256M"
-    fi
-
-    elif test "$MEMORY_SIZE" -gt "1000"; then
-        MAX_HEAP_MEM=900
-
-    # Test if -Xms400M -Xmx900M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
-    # If so, then append -Xms400M -Xmx900M to SERVER_JAVA
-    FOUND_WARN=`$SERVER_JAVA -Xms400M -Xmx900M -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$SERVER_JAVA -Xms400M -Xmx900M -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SERVER_JAVA="$SERVER_JAVA -Xms400M -Xmx900M"
-    fi
-
-
-    # Test if -Xmn128M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
-    # If so, then append -Xmn128M to SERVER_JAVA
-    FOUND_WARN=`$SERVER_JAVA -Xmn128M -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$SERVER_JAVA -Xmn128M -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SERVER_JAVA="$SERVER_JAVA -Xmn128M"
-    fi
-
-    else
-        MAX_HEAP_MEM=512
-
-    # Test if -Xms256M -Xmx512M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
-    # If so, then append -Xms256M -Xmx512M to SERVER_JAVA
-    FOUND_WARN=`$SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SERVER_JAVA="$SERVER_JAVA -Xms256M -Xmx512M"
-    fi
-
-
-    # Test if -Xmn128M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
-    # If so, then append -Xmn128M to SERVER_JAVA
-    FOUND_WARN=`$SERVER_JAVA -Xmn128M -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$SERVER_JAVA -Xmn128M -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        SERVER_JAVA="$SERVER_JAVA -Xmn128M"
-    fi
-
-    fi
-
-    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
-    if test "$JAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
-$as_echo_n "checking if number of server cores must be reduced... " >&6; }
-        JAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $JAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
-$as_echo "yes, to $JAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
-    fi
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to track dependencies between Java packages" >&5
-$as_echo_n "checking whether to track dependencies between Java packages... " >&6; }
-# Check whether --enable-javac-deps was given.
-if test "${enable_javac_deps+set}" = set; then :
-  enableval=$enable_javac_deps; ENABLE_JAVAC_DEPS="${enableval}"
-else
-  ENABLE_JAVAC_DEPS='no'
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_DEPS" >&5
-$as_echo "$ENABLE_JAVAC_DEPS" >&6; }
-if test "x$ENABLE_JAVAC_DEPS" = xyes; then
-    JAVAC_USE_DEPS=true
-else
-    JAVAC_USE_DEPS=false
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use multiple cores for javac compilation" >&5
-$as_echo_n "checking whether to use multiple cores for javac compilation... " >&6; }
-# Check whether --enable-javac-multi-core was given.
-if test "${enable_javac_multi_core+set}" = set; then :
-  enableval=$enable_javac_multi_core; ENABLE_JAVAC_MULTICORE="${enableval}"
-else
-  ENABLE_JAVAC_MULTICORE='no'
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_MULTICORE" >&5
-$as_echo "$ENABLE_JAVAC_MULTICORE" >&6; }
-if test "x$ENABLE_JAVAC_MULTICORE" = xyes; then
-    JAVAC_USE_MODE=MULTI_CORE_CONCURRENT
-else
-    JAVAC_USE_MODE=SINGLE_THREADED_BATCH
-    if test "x$ENABLE_JAVAC_DEPS" = xyes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Dependency tracking is not supported with single threaded batch compiles of Java source roots. Please add --disable-javac-deps to your configure options." >&5
-$as_echo "$as_me: WARNING: Dependency tracking is not supported with single threaded batch compiles of Java source roots. Please add --disable-javac-deps to your configure options." >&2;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling dependency tracking for you now." >&5
-$as_echo "$as_me: WARNING: Disabling dependency tracking for you now." >&2;}
-        JAVAC_USE_DEPS=false
-    fi
-    if test "x$ENABLE_JAVAC_SERVER" = xyes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The javac server will not be used since single threaded batch compiles are run within their own JVM. Please add --disable-javac-server to your configure options." >&5
-$as_echo "$as_me: WARNING: The javac server will not be used since single threaded batch compiles are run within their own JVM. Please add --disable-javac-server to your configure options." >&2;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling javac server for you now." >&5
-$as_echo "$as_me: WARNING: Disabling javac server for you now." >&2;}
-        JAVAC_USE_REMOTE=false
-    fi
+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"
 fi
 
-
-###############################################################################
-#
-# OS specific settings that we never will need to probe.
-#
-if test "x$HOST_OS" = xlinux; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
-$as_echo_n "checking what is not needed on Linux?... " >&6; }
-    PULSE_NOT_NEEDED=yes
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
-$as_echo "pulse" >&6; }
-fi
-
-if test "x$HOST_OS" = xsolaris; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
-$as_echo_n "checking what is not needed on Solaris?... " >&6; }
-    ALSA_NOT_NEEDED=yes
-    PULSE_NOT_NEEDED=yes
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
-$as_echo "alsa pulse" >&6; }
-fi
-
-if test "x$HOST_OS" = xwindows; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
-$as_echo_n "checking what is not needed on Windows?... " >&6; }
-    CUPS_NOT_NEEDED=yes
-    ALSA_NOT_NEEDED=yes
-    PULSE_NOT_NEEDED=yes
-    X11_NOT_NEEDED=yes
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
-$as_echo "alsa cups pulse x11" >&6; }
-fi
-
-if test "x$HOST_OS" = xmacosx; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
-$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
-    ALSA_NOT_NEEDED=yes
-    PULSE_NOT_NEEDED=yes
-    X11_NOT_NEEDED=yes
-    FREETYPE2_NOT_NEEDED=yes
-    # If the java runtime framework is disabled, then we need X11.
-    # This will be adjusted below.
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
-$as_echo "alsa pulse x11" >&6; }
-fi
-
-if test "x$HOST_OS" = xbsd; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
-$as_echo_n "checking what is not needed on bsd?... " >&6; }
-    ALSA_NOT_NEEDED=yes
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
-$as_echo "alsa" >&6; }
-fi
-
-###############################################################################
-#
-# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
-# that uses this API.
-#
-# Check whether --enable-macosx-runtime-support was given.
-if test "${enable_macosx_runtime_support+set}" = set; then :
-  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
-else
-  MACOSX_RUNTIME_SUPPORT="no"
-fi
-
-
-USE_MACOSX_RUNTIME_SUPPORT=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
-$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
-if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
-    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
-        MACOSX_RUNTIME_SUPPORT=yes
-        USE_MACOSX_RUNTIME_SUPPORT=yes
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
-$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
-    else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
-$as_echo "yes, but explicitly disabled." >&6; }
-    fi
-else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-if test "x$HOST_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
-$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
-    X11_NOT_NEEDED=
-    FREETYPE2_NOT_NEEDED=
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
-$as_echo "alsa pulse" >&6; }
-fi
-
-###############################################################################
-#
-# Check for X Windows
-#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
-$as_echo_n "checking for X... " >&6; }
-
-
-# Check whether --with-x was given.
-if test "${with_x+set}" = set; then :
-  withval=$with_x;
-fi
-
-# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
-if test "x$with_x" = xno; then
-  # The user explicitly disabled X.
-  have_x=disabled
-else
-  case $x_includes,$x_libraries in #(
-    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
-    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  # One or both of the vars are not set, and there is no cached value.
-ac_x_includes=no ac_x_libraries=no
-rm -f -r conftest.dir
-if mkdir conftest.dir; then
-  cd conftest.dir
-  cat >Imakefile <<'_ACEOF'
-incroot:
-	@echo incroot='${INCROOT}'
-usrlibdir:
-	@echo usrlibdir='${USRLIBDIR}'
-libdir:
-	@echo libdir='${LIBDIR}'
-_ACEOF
-  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
-    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
-    for ac_var in incroot usrlibdir libdir; do
-      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
-    done
-    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
-    for ac_extension in a so sl dylib la dll; do
-      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
-	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
-	ac_im_usrlibdir=$ac_im_libdir; break
-      fi
-    done
-    # Screen out bogus values from the imake configuration.  They are
-    # bogus both because they are the default anyway, and because
-    # using them would break gcc on systems where it needs fixed includes.
-    case $ac_im_incroot in
-	/usr/include) ac_x_includes= ;;
-	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
-    esac
-    case $ac_im_usrlibdir in
-	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
-	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
-    esac
-  fi
-  cd ..
-  rm -f -r conftest.dir
-fi
-
-# Standard set of common directories for X headers.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-ac_x_header_dirs='
-/usr/X11/include
-/usr/X11R7/include
-/usr/X11R6/include
-/usr/X11R5/include
-/usr/X11R4/include
-
-/usr/include/X11
-/usr/include/X11R7
-/usr/include/X11R6
-/usr/include/X11R5
-/usr/include/X11R4
-
-/usr/local/X11/include
-/usr/local/X11R7/include
-/usr/local/X11R6/include
-/usr/local/X11R5/include
-/usr/local/X11R4/include
-
-/usr/local/include/X11
-/usr/local/include/X11R7
-/usr/local/include/X11R6
-/usr/local/include/X11R5
-/usr/local/include/X11R4
-
-/usr/X386/include
-/usr/x386/include
-/usr/XFree86/include/X11
-
-/usr/include
-/usr/local/include
-/usr/unsupported/include
-/usr/athena/include
-/usr/local/x11r5/include
-/usr/lpp/Xamples/include
-
-/usr/openwin/include
-/usr/openwin/share/include'
-
-if test "$ac_x_includes" = no; then
-  # Guess where to find include files, by looking for Xlib.h.
-  # First, try using that file with no special directory specified.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <X11/Xlib.h>
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
-  # We can compile using X headers with no special include directory.
-ac_x_includes=
-else
-  for ac_dir in $ac_x_header_dirs; do
-  if test -r "$ac_dir/X11/Xlib.h"; then
-    ac_x_includes=$ac_dir
-    break
-  fi
-done
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-fi # $ac_x_includes = no
-
-if test "$ac_x_libraries" = no; then
-  # Check for the libraries.
-  # See if we find them without any special options.
-  # Don't add to $LIBS permanently.
-  ac_save_LIBS=$LIBS
-  LIBS="-lX11 $LIBS"
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <X11/Xlib.h>
-int
-main ()
-{
-XrmInitialize ()
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  LIBS=$ac_save_LIBS
-# We can link X programs with no special library path.
-ac_x_libraries=
-else
-  LIBS=$ac_save_LIBS
-for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
-do
-  # Don't even attempt the hair of trying to link an X program!
-  for ac_extension in a so sl dylib la dll; do
-    if test -r "$ac_dir/libX11.$ac_extension"; then
-      ac_x_libraries=$ac_dir
-      break 2
-    fi
-  done
-done
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi # $ac_x_libraries = no
-
-case $ac_x_includes,$ac_x_libraries in #(
-  no,* | *,no | *\'*)
-    # Didn't find X, or a directory has "'" in its name.
-    ac_cv_have_x="have_x=no";; #(
-  *)
-    # Record where we found X for the cache.
-    ac_cv_have_x="have_x=yes\
-	ac_x_includes='$ac_x_includes'\
-	ac_x_libraries='$ac_x_libraries'"
-esac
-fi
-;; #(
-    *) have_x=yes;;
-  esac
-  eval "$ac_cv_have_x"
-fi # $with_x != no
-
-if test "$have_x" != yes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
-$as_echo "$have_x" >&6; }
-  no_x=yes
-else
-  # If each of the values was on the command line, it overrides each guess.
-  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
-  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
-  # Update the cache value to reflect the command line values.
-  ac_cv_have_x="have_x=yes\
-	ac_x_includes='$x_includes'\
-	ac_x_libraries='$x_libraries'"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
-$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
-fi
-
-if test "$no_x" = yes; then
-  # Not all programs may use this symbol, but it does not hurt to define it.
-
-$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
-
-  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
-else
-  if test -n "$x_includes"; then
-    X_CFLAGS="$X_CFLAGS -I$x_includes"
-  fi
-
-  # It would also be nice to do this for all -L options, not just this one.
-  if test -n "$x_libraries"; then
-    X_LIBS="$X_LIBS -L$x_libraries"
-    # For Solaris; some versions of Sun CC require a space after -R and
-    # others require no space.  Words are not sufficient . . . .
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
-$as_echo_n "checking whether -R must be followed by a space... " >&6; }
-    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
-    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
-    ac_cxx_werror_flag=yes
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-       X_LIBS="$X_LIBS -R$x_libraries"
-else
-  LIBS="$ac_xsave_LIBS -R $x_libraries"
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	  X_LIBS="$X_LIBS -R $x_libraries"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
-$as_echo "neither works" >&6; }
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
-    LIBS=$ac_xsave_LIBS
-  fi
-
-  # Check for system-dependent libraries X programs must link with.
-  # Do this before checking for the system-independent R6 libraries
-  # (-lICE), since we may need -lsocket or whatever for X linking.
-
-  if test "$ISC" = yes; then
-    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
-  else
-    # Martyn Johnson says this is needed for Ultrix, if the X
-    # libraries were built with DECnet support.  And Karl Berry says
-    # the Alpha needs dnet_stub (dnet does not exist).
-    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XOpenDisplay ();
-int
-main ()
-{
-return XOpenDisplay ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
-$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
-if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldnet  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dnet_ntoa ();
-int
-main ()
-{
-return dnet_ntoa ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_cv_lib_dnet_dnet_ntoa=yes
-else
-  ac_cv_lib_dnet_dnet_ntoa=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
-$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
-if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
-  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
-fi
-
-    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
-$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
-if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldnet_stub  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dnet_ntoa ();
-int
-main ()
-{
-return dnet_ntoa ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_cv_lib_dnet_stub_dnet_ntoa=yes
-else
-  ac_cv_lib_dnet_stub_dnet_ntoa=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
-$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
-if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
-  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
-fi
-
-    fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    LIBS="$ac_xsave_LIBS"
-
-    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
-    # to get the SysV transport functions.
-    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
-    # needs -lnsl.
-    # The nsl library prevents programs from opening the X display
-    # on Irix 5.2, according to T.E. Dickey.
-    # The functions gethostbyname, getservbyname, and inet_addr are
-    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
-    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
-if test "x$ac_cv_func_gethostbyname" = x""yes; then :
-
-fi
-
-    if test $ac_cv_func_gethostbyname = no; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
-$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
-if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnsl  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyname ();
-int
-main ()
-{
-return gethostbyname ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_cv_lib_nsl_gethostbyname=yes
-else
-  ac_cv_lib_nsl_gethostbyname=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
-$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
-if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
-  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
-fi
-
-      if test $ac_cv_lib_nsl_gethostbyname = no; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
-$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
-if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbsd  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyname ();
-int
-main ()
-{
-return gethostbyname ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_cv_lib_bsd_gethostbyname=yes
-else
-  ac_cv_lib_bsd_gethostbyname=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
-$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
-if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
-  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
-fi
-
-      fi
-    fi
-
-    # lieder@skyler.mavd.honeywell.com says without -lsocket,
-    # socket/setsockopt and other routines are undefined under SCO ODT
-    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
-    # on later versions), says Simon Leinen: it contains gethostby*
-    # variants that don't use the name server (or something).  -lsocket
-    # must be given before -lnsl if both are needed.  We assume that
-    # if connect needs -lnsl, so does gethostbyname.
-    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
-if test "x$ac_cv_func_connect" = x""yes; then :
-
-fi
-
-    if test $ac_cv_func_connect = no; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
-$as_echo_n "checking for connect in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_connect+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char connect ();
-int
-main ()
-{
-return connect ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_cv_lib_socket_connect=yes
-else
-  ac_cv_lib_socket_connect=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
-$as_echo "$ac_cv_lib_socket_connect" >&6; }
-if test "x$ac_cv_lib_socket_connect" = x""yes; then :
-  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
-fi
-
-    fi
-
-    # Guillermo Gomez says -lposix is necessary on A/UX.
-    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
-if test "x$ac_cv_func_remove" = x""yes; then :
-
-fi
-
-    if test $ac_cv_func_remove = no; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
-$as_echo_n "checking for remove in -lposix... " >&6; }
-if test "${ac_cv_lib_posix_remove+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lposix  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char remove ();
-int
-main ()
-{
-return remove ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_cv_lib_posix_remove=yes
-else
-  ac_cv_lib_posix_remove=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
-$as_echo "$ac_cv_lib_posix_remove" >&6; }
-if test "x$ac_cv_lib_posix_remove" = x""yes; then :
-  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
-fi
-
-    fi
-
-    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
-    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
-if test "x$ac_cv_func_shmat" = x""yes; then :
-
-fi
-
-    if test $ac_cv_func_shmat = no; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
-$as_echo_n "checking for shmat in -lipc... " >&6; }
-if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lipc  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shmat ();
-int
-main ()
-{
-return shmat ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_cv_lib_ipc_shmat=yes
-else
-  ac_cv_lib_ipc_shmat=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
-$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
-if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
-  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
-fi
-
-    fi
-  fi
-
-  # Check for libraries that X11R6 Xt/Xaw programs need.
-  ac_save_LDFLAGS=$LDFLAGS
-  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
-  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
-  # check for ICE first), but we must link in the order -lSM -lICE or
-  # we get undefined symbols.  So assume we have SM if we have ICE.
-  # These have to be linked with before -lX11, unlike the other
-  # libraries we check for below, so use a different variable.
-  # John Interrante, Karl Berry
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
-$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
-if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lICE $X_EXTRA_LIBS $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char IceConnectionNumber ();
-int
-main ()
-{
-return IceConnectionNumber ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_cv_lib_ICE_IceConnectionNumber=yes
-else
-  ac_cv_lib_ICE_IceConnectionNumber=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
-$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
-if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
-  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
-fi
-
-  LDFLAGS=$ac_save_LDFLAGS
-
-fi
-
-
-if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
-    help_on_build_dependency x11
-    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
-fi
-
-# Some of the old makefiles require a setting of OPENWIN_HOME
-# Since the X11R6 directory has disappeared on later Linuxes,
-# we need to probe for it.
-if test "x$HOST_OS" = xlinux; then
-    if test -d "$SYS_ROOT/usr/X11R6"; then
-        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
-    fi
-    if test -d "$SYS_ROOT/usr/include/X11"; then
-        OPENWIN_HOME="$SYS_ROOT/usr"
-    fi
-fi
-if test "x$HOST_OS" = xsolaris; then
-    OPENWIN_HOME="/usr/openwin"
-fi
-
-
-
-#
-# Weird Sol10 something check...TODO change to try compile
-#
-if test "x${HOST_OS}" = xsolaris; then
-  if test "`uname -r`" = "5.10"; then
-     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
-     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
-     fi
-  fi
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-OLD_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $X_CFLAGS"
-
-
-for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- X11_A_OK=yes
-else
-  X11_A_OK=no
-fi
-
-done
-
-CFLAGS="$OLD_CFLAGS"
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
-    help_on_build_dependency x11
-    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
-fi
-
-
-
-
-###############################################################################
-#
-# The common unix printing system cups is used to print from java.
-#
-
-# Check whether --with-cups was given.
-if test "${with_cups+set}" = set; then :
-  withval=$with_cups;
-fi
-
-
-# Check whether --with-cups-include was given.
-if test "${with_cups_include+set}" = set; then :
-  withval=$with_cups_include;
-fi
-
-
-# Check whether --with-cups-lib was given.
-if test "${with_cups_lib+set}" = set; then :
-  withval=$with_cups_lib;
-fi
-
-
-if test "x$CUPS_NOT_NEEDED" = xyes; then
-	if test "x${with_cups}" != x || test "x${with_cups_include}" != x || test "x${with_cups_lib}" != x; then
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
-$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
-	fi
-	CUPS_CFLAGS=
-	CUPS_LIBS=
-else
-	CUPS_FOUND=no
-
-	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno || test "x${with_cups_lib}" = xno; then
-	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
-	fi
-
-	if test "x${with_cups}" != x; then
-	    CUPS_LIBS="-L${with_cups}/lib -lcups"
-	    CUPS_CFLAGS="-I${with_cups}/include"
-	    CUPS_FOUND=yes
-	fi
-	if test "x${with_cups_include}" != x; then
-	    CUPS_CFLAGS="-I${with_cups_include}"
-	    CUPS_FOUND=yes
-	fi
-	if test "x${with_cups_lib}" != x; then
-	    CUPS_LIBS="-L${with_cups_lib} -lcups"
-	    CUPS_FOUND=yes
-	fi
-	if test "x$CUPS_FOUND" = xno; then
-
-
-    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
-        # Source the builddeps file again, to make sure it uses the latest variables!
-        . $builddepsfile
-        # Look for a host and build machine specific resource!
-        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_HOST_${rewritten_host_var}}
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a host specific resource
-            eval resource=\${builddep_cups_HOST_${rewritten_host_var}}
-        fi
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a build specific resource
-            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
-        fi
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a generic resource
-            # (The cups comes from M4 and not the shell, thus no need for eval here.)
-            resource=${builddep_cups}
-        fi
-        if test "x$resource" != x; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
-$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
-	    # If the resource in the builddeps.conf file is an existing directory,
-	    # for example /java/linux/cups
-	    if test -d ${resource}; then
-	       depdir=${resource}
-	    else
-
-# cups is for example mymodule
-# $resource is for example libs/general/libmymod_1_2_3.zip
-# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
-# $with_builddeps_dir is for example /localhome/builddeps
-# depdir is the name of the variable into which we store the depdir, eg MYMOD
-# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
-# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
-    filename=`basename $resource`
-    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
-    filebase=${filename%%.*}
-    extension=${filename#*.}
-    installdir=$with_builddeps_dir/$filebase
-    if test ! -f $installdir/$filename.unpacked; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
-$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
-        if test ! -d $installdir; then
-            mkdir -p $installdir
-        fi
-        if test ! -d $installdir; then
-            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
-        fi
-        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
-        touch $tmpfile
-        if test ! -f $tmpfile; then
-            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
-        fi
-
-    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
-    # $tmpfile is the local file name for the downloaded file.
-    VALID_TOOL=no
-    if test "x$BDEPS_FTP" = xwget; then
-       VALID_TOOL=yes
-       wget -O $tmpfile $with_builddeps_server/$resource
-    fi
-    if test "x$BDEPS_FTP" = xlftp; then
-       VALID_TOOL=yes
-       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
-    fi
-    if test "x$BDEPS_FTP" = xftp; then
-        VALID_TOOL=yes
-        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
-        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
-        FTPUSERPWD=${FTPSERVER%%@*}
-        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
-            FTPUSER=${userpwd%%:*}
-            FTPPWD=${userpwd#*@}
-            FTPSERVER=${FTPSERVER#*@}
-        else
-            FTPUSER=ftp
-            FTPPWD=ftp
-        fi
-        # the "pass" command does not work on some
-        # ftp clients (read ftp.exe) but if it works,
-        # passive mode is better!
-        (\
-            echo "user $FTPUSER $FTPPWD"        ;\
-            echo "pass"                         ;\
-            echo "bin"                          ;\
-            echo "get $FTPPATH $tmpfile"              ;\
-        ) | ftp -in $FTPSERVER
-    fi
-    if test "x$VALID_TOOL" != xyes; then
-       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
-    fi
-
-        mv $tmpfile $installdir/$filename
-        if test ! -s $installdir/$filename; then
-            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
-        fi
-        case "$extension" in
-            zip)  echo "Unzipping $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
-            ;;
-            tar.gz) echo "Untaring $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-            ;;
-            tgz) echo "Untaring $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-            ;;
-            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
-            ;;
-        esac
-    fi
-    if test -f $installdir/$filename.unpacked; then
-        depdir=$installdir
-    fi
-
-	    fi
-            # Source the builddeps file again, because in the previous command, the depdir
-            # was updated to point at the current build dependency install directory.
-            . $builddepsfile
-            # Now extract variables from the builddeps.conf files.
-            theroot=${builddep_cups_ROOT}
-            thecflags=${builddep_cups_CFLAGS}
-            thelibs=${builddep_cups_LIBS}
-            if test "x$depdir" = x; then
-                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
-            fi
-            CUPS=$depdir
-            if test "x$theroot" != x; then
-               CUPS="$theroot"
-            fi
-            if test "x$thecflags" != x; then
-               CUPS_CFLAGS="$thecflags"
-            fi
-            if test "x$thelibs" != x; then
-               CUPS_LIBS="$thelibs"
-            fi
-            CUPS_FOUND=yes
-
-        fi
-
-    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"
 
-	fi
-	if test "x$CUPS_FOUND" = xno; then
-	    # Are the cups headers installed in the default /usr/include location?
-	    for ac_header in cups/cups.h cups/ppd.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- CUPS_FOUND=yes
-	                      CUPS_CFLAGS=
-	                      CUPS_LIBS="-lcups"
-	                      DEFAULT_CUPS=yes
-fi
-
-done
-
-	fi
-	if test "x$CUPS_FOUND" = xno; then
-	    # Getting nervous now? Lets poke around for standard Solaris third-party
-	    # package installation locations.
-	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers and libs" >&5
-$as_echo_n "checking for cups headers and libs... " >&6; }
-	    if test -s /opt/sfw/cups/include/cups/cups.h; then
-	       # An SFW package seems to be installed!
-	       CUPS_FOUND=yes
-	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
-	       CUPS_LIBS="-L/opt/sfw/cups/lib -lcups"
-	    elif test -s /opt/csw/include/cups/cups.h; then
-	       # A CSW package seems to be installed!
-	       CUPS_FOUND=yes
-	       CUPS_CFLAGS="-I/opt/csw/include"
-	       CUPS_LIBS="-L/opt/csw/lib -lcups"
-	    fi
-	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
-$as_echo "$CUPS_FOUND" >&6; }
-	fi
-	if test "x$CUPS_FOUND" = xno; then
-	    help_on_build_dependency cups
-	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
-	fi
-fi
-
-
-
-
-###############################################################################
-#
-# The ubiquitous freetype2 library is used to render fonts.
-#
-
-# Check whether --with-freetype was given.
-if test "${with_freetype+set}" = set; then :
-  withval=$with_freetype;
-fi
-
-
-# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
-USING_SYSTEM_FT_LIB=false
-
-if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
-	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
-$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
-	fi
-	FREETYPE2_CFLAGS=
-	FREETYPE2_LIBS=
-        FREETYPE2_LIB_PATH=
-else
-	FREETYPE2_FOUND=no
-
-	if test "x$with_freetype" != x; then
-
-    # Fail with message the path to freetype if var with_freetype contains a path with no spaces in it.
-    # Unless on Windows, where we can rewrite the path.
-    HAS_SPACE=`echo "$with_freetype" | grep " "`
-    if test "x$HAS_SPACE" != x; then
-        if test "x$BUILD_OS" = "xwindows"; then
-            with_freetype=`$CYGPATH -s -m -a "$with_freetype"`
-            with_freetype=`$CYGPATH -u "$with_freetype"`
-        else
-            as_fn_error $? "You cannot have spaces in the path to freetype! \"$with_freetype\"" "$LINENO" 5
-        fi
-    fi
-
-	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
-            if test "x$HOST_OS" = xwindows; then
-                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
-            fi
-            FREETYPE2_LIB_PATH="$with_freetype/lib"
-	    FREETYPE2_CFLAGS="-I$with_freetype/include"
-            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
-                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
-            fi
-	    FREETYPE2_FOUND=yes
-   	    if test "x$FREETYPE2_FOUND" = xyes; then
-	        # Verify that the directories exist
-                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
-		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
-		fi
-	        # List the contents of the lib.
-		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
-                if test "x$FREETYPELIB" = x; then
-		   as_fn_error $? "Could not find libfreetype.se nor freetype.dll in $with_freetype/lib" "$LINENO" 5
-		fi
-	        # Check one h-file
-                if ! test -s "$with_freetype/include/ft2build.h"; then
-		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
-		fi
-            fi
-        fi
-	if test "x$FREETYPE2_FOUND" = xno; then
-
-
-    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
-        # Source the builddeps file again, to make sure it uses the latest variables!
-        . $builddepsfile
-        # Look for a host and build machine specific resource!
-        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_HOST_${rewritten_host_var}}
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a host specific resource
-            eval resource=\${builddep_freetype2_HOST_${rewritten_host_var}}
-        fi
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a build specific resource
-            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
-        fi
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a generic resource
-            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
-            resource=${builddep_freetype2}
-        fi
-        if test "x$resource" != x; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
-$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
-	    # If the resource in the builddeps.conf file is an existing directory,
-	    # for example /java/linux/cups
-	    if test -d ${resource}; then
-	       depdir=${resource}
-	    else
-
-# freetype2 is for example mymodule
-# $resource is for example libs/general/libmymod_1_2_3.zip
-# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
-# $with_builddeps_dir is for example /localhome/builddeps
-# depdir is the name of the variable into which we store the depdir, eg MYMOD
-# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
-# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
-    filename=`basename $resource`
-    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
-    filebase=${filename%%.*}
-    extension=${filename#*.}
-    installdir=$with_builddeps_dir/$filebase
-    if test ! -f $installdir/$filename.unpacked; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
-$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
-        if test ! -d $installdir; then
-            mkdir -p $installdir
-        fi
-        if test ! -d $installdir; then
-            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
-        fi
-        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
-        touch $tmpfile
-        if test ! -f $tmpfile; then
-            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
-        fi
-
-    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
-    # $tmpfile is the local file name for the downloaded file.
-    VALID_TOOL=no
-    if test "x$BDEPS_FTP" = xwget; then
-       VALID_TOOL=yes
-       wget -O $tmpfile $with_builddeps_server/$resource
-    fi
-    if test "x$BDEPS_FTP" = xlftp; then
-       VALID_TOOL=yes
-       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
-    fi
-    if test "x$BDEPS_FTP" = xftp; then
-        VALID_TOOL=yes
-        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
-        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
-        FTPUSERPWD=${FTPSERVER%%@*}
-        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
-            FTPUSER=${userpwd%%:*}
-            FTPPWD=${userpwd#*@}
-            FTPSERVER=${FTPSERVER#*@}
-        else
-            FTPUSER=ftp
-            FTPPWD=ftp
-        fi
-        # the "pass" command does not work on some
-        # ftp clients (read ftp.exe) but if it works,
-        # passive mode is better!
-        (\
-            echo "user $FTPUSER $FTPPWD"        ;\
-            echo "pass"                         ;\
-            echo "bin"                          ;\
-            echo "get $FTPPATH $tmpfile"              ;\
-        ) | ftp -in $FTPSERVER
-    fi
-    if test "x$VALID_TOOL" != xyes; then
-       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
-    fi
-
-        mv $tmpfile $installdir/$filename
-        if test ! -s $installdir/$filename; then
-            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
-        fi
-        case "$extension" in
-            zip)  echo "Unzipping $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
-            ;;
-            tar.gz) echo "Untaring $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-            ;;
-            tgz) echo "Untaring $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-            ;;
-            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
-            ;;
-        esac
-    fi
-    if test -f $installdir/$filename.unpacked; then
-        depdir=$installdir
-    fi
-
-	    fi
-            # Source the builddeps file again, because in the previous command, the depdir
-            # was updated to point at the current build dependency install directory.
-            . $builddepsfile
-            # Now extract variables from the builddeps.conf files.
-            theroot=${builddep_freetype2_ROOT}
-            thecflags=${builddep_freetype2_CFLAGS}
-            thelibs=${builddep_freetype2_LIBS}
-            if test "x$depdir" = x; then
-                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
-            fi
-            FREETYPE2=$depdir
-            if test "x$theroot" != x; then
-               FREETYPE2="$theroot"
-            fi
-            if test "x$thecflags" != x; then
-               FREETYPE2_CFLAGS="$thecflags"
-            fi
-            if test "x$thelibs" != x; then
-               FREETYPE2_LIBS="$thelibs"
-            fi
-            FREETYPE2_FOUND=yes
-            else FREETYPE2_FOUND=no
-
-        fi
-        else FREETYPE2_FOUND=no
-
-    fi
-
-            USING_SYSTEM_FT_LIB=true
-	fi
-	if test "x$FREETYPE2_FOUND" = xno; then
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
-$as_echo_n "checking for FREETYPE2... " >&6; }
-
-if test -n "$FREETYPE2_CFLAGS"; then
-    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$FREETYPE2_LIBS"; then
-    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
-        else
-	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$FREETYPE2_PKG_ERRORS" >&5
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                FREETYPE2_FOUND=no
-elif test $pkg_failed = untried; then
-	FREETYPE2_FOUND=no
-else
-	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
-	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	FREETYPE2_FOUND=yes
-fi
-            USING_SYSTEM_FT_LIB=true
-	fi
-	if test "x$FREETYPE2_FOUND" = xno; then
-	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
-$as_echo_n "checking for freetype in some standard locations... " >&6; }
-
-	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
-	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
-	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
-	    fi
-	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
-	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
-	        DEFAULT_FREETYPE_LIBS="-lfreetype"
-	    fi
-
-	    PREV_CXXCFLAGS="$CXXFLAGS"
-	    PREV_LDFLAGS="$LDFLAGS"
-	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
-	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
-	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include<ft2build.h>
-	                    #include FT_FREETYPE_H
-	                   int main() { return 0; }
-
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-
-	                      # Yes, the default cflags and libs did the trick.
-	                      FREETYPE2_FOUND=yes
-	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
-	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
-
-else
-
-	                      FREETYPE2_FOUND=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-            CXXCFLAGS="$PREV_CXXFLAGS"
-	    LDFLAGS="$PREV_LDFLAGS"
-	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
-$as_echo "$FREETYPE2_FOUND" >&6; }
-            USING_SYSTEM_FT_LIB=true
-	fi
-	if test "x$FREETYPE2_FOUND" = xno; then
-		help_on_build_dependency freetype2
-		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
-	fi
-fi
-
-
-
-
-
-
-###############################################################################
-#
-# Check for alsa headers and libraries. Used on Linux/GNU systems.
-#
-
-# Check whether --with-alsa was given.
-if test "${with_alsa+set}" = set; then :
-  withval=$with_alsa;
-fi
-
-
-# Check whether --with-alsa-include was given.
-if test "${with_alsa_include+set}" = set; then :
-  withval=$with_alsa_include;
-fi
-
-
-# Check whether --with-alsa-lib was given.
-if test "${with_alsa_lib+set}" = set; then :
-  withval=$with_alsa_lib;
-fi
-
-
-if test "x$ALSA_NOT_NEEDED" = xyes; then
-	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
-$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
-	fi
-	ALSA_CFLAGS=
-	ALSA_LIBS=
+###
+### Call the configure script
+###
+if $TEST -e $conf_closed_script_dir/generated-configure.sh; then
+  # Closed source configure available; run that instead
+  . $conf_closed_script_dir/generated-configure.sh $conf_processed_arguments --with-extra-cflags="$conf_extra_cflags" --with-extra-cxxflags="$conf_extra_cxxflags"
 else
-	ALSA_FOUND=no
-
-	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
-	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
-	fi
-
-	if test "x${with_alsa}" != x; then
-	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
-	    ALSA_CFLAGS="-I${with_alsa}/include"
-	    ALSA_FOUND=yes
-	fi
-	if test "x${with_alsa_include}" != x; then
-	    ALSA_CFLAGS="-I${with_alsa_include}"
-	    ALSA_FOUND=yes
-	fi
-	if test "x${with_alsa_lib}" != x; then
-	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
-	    ALSA_FOUND=yes
-	fi
-	if test "x$ALSA_FOUND" = xno; then
-
-
-    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
-        # Source the builddeps file again, to make sure it uses the latest variables!
-        . $builddepsfile
-        # Look for a host and build machine specific resource!
-        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_HOST_${rewritten_host_var}}
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a host specific resource
-            eval resource=\${builddep_alsa_HOST_${rewritten_host_var}}
-        fi
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a build specific resource
-            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
-        fi
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a generic resource
-            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
-            resource=${builddep_alsa}
-        fi
-        if test "x$resource" != x; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
-$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
-	    # If the resource in the builddeps.conf file is an existing directory,
-	    # for example /java/linux/cups
-	    if test -d ${resource}; then
-	       depdir=${resource}
-	    else
-
-# alsa is for example mymodule
-# $resource is for example libs/general/libmymod_1_2_3.zip
-# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
-# $with_builddeps_dir is for example /localhome/builddeps
-# depdir is the name of the variable into which we store the depdir, eg MYMOD
-# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
-# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
-    filename=`basename $resource`
-    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
-    filebase=${filename%%.*}
-    extension=${filename#*.}
-    installdir=$with_builddeps_dir/$filebase
-    if test ! -f $installdir/$filename.unpacked; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
-$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
-        if test ! -d $installdir; then
-            mkdir -p $installdir
-        fi
-        if test ! -d $installdir; then
-            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
-        fi
-        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
-        touch $tmpfile
-        if test ! -f $tmpfile; then
-            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
-        fi
-
-    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
-    # $tmpfile is the local file name for the downloaded file.
-    VALID_TOOL=no
-    if test "x$BDEPS_FTP" = xwget; then
-       VALID_TOOL=yes
-       wget -O $tmpfile $with_builddeps_server/$resource
-    fi
-    if test "x$BDEPS_FTP" = xlftp; then
-       VALID_TOOL=yes
-       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
-    fi
-    if test "x$BDEPS_FTP" = xftp; then
-        VALID_TOOL=yes
-        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
-        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
-        FTPUSERPWD=${FTPSERVER%%@*}
-        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
-            FTPUSER=${userpwd%%:*}
-            FTPPWD=${userpwd#*@}
-            FTPSERVER=${FTPSERVER#*@}
-        else
-            FTPUSER=ftp
-            FTPPWD=ftp
-        fi
-        # the "pass" command does not work on some
-        # ftp clients (read ftp.exe) but if it works,
-        # passive mode is better!
-        (\
-            echo "user $FTPUSER $FTPPWD"        ;\
-            echo "pass"                         ;\
-            echo "bin"                          ;\
-            echo "get $FTPPATH $tmpfile"              ;\
-        ) | ftp -in $FTPSERVER
-    fi
-    if test "x$VALID_TOOL" != xyes; then
-       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
-    fi
-
-        mv $tmpfile $installdir/$filename
-        if test ! -s $installdir/$filename; then
-            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
-        fi
-        case "$extension" in
-            zip)  echo "Unzipping $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
-            ;;
-            tar.gz) echo "Untaring $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-            ;;
-            tgz) echo "Untaring $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-            ;;
-            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
-            ;;
-        esac
-    fi
-    if test -f $installdir/$filename.unpacked; then
-        depdir=$installdir
-    fi
-
-	    fi
-            # Source the builddeps file again, because in the previous command, the depdir
-            # was updated to point at the current build dependency install directory.
-            . $builddepsfile
-            # Now extract variables from the builddeps.conf files.
-            theroot=${builddep_alsa_ROOT}
-            thecflags=${builddep_alsa_CFLAGS}
-            thelibs=${builddep_alsa_LIBS}
-            if test "x$depdir" = x; then
-                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
-            fi
-            ALSA=$depdir
-            if test "x$theroot" != x; then
-               ALSA="$theroot"
-            fi
-            if test "x$thecflags" != x; then
-               ALSA_CFLAGS="$thecflags"
-            fi
-            if test "x$thelibs" != x; then
-               ALSA_LIBS="$thelibs"
-            fi
-            ALSA_FOUND=yes
-            else ALSA_FOUND=no
-
-        fi
-        else ALSA_FOUND=no
-
-    fi
-
-	fi
-	if test "x$ALSA_FOUND" = xno; then
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
-$as_echo_n "checking for ALSA... " >&6; }
-
-if test -n "$ALSA_CFLAGS"; then
-    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$ALSA_LIBS"; then
-    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
-        else
-	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$ALSA_PKG_ERRORS" >&5
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                ALSA_FOUND=no
-elif test $pkg_failed = untried; then
-	ALSA_FOUND=no
-else
-	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
-	ALSA_LIBS=$pkg_cv_ALSA_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	ALSA_FOUND=yes
-fi
-	fi
-	if test "x$ALSA_FOUND" = xno; then
-	    for ac_header in alsa/asoundlib.h
-do :
-  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_ALSA_ASOUNDLIB_H 1
-_ACEOF
- ALSA_FOUND=yes
-	                      ALSA_CFLAGS=-Iignoreme
-	                      ALSA_LIBS=-lasound
-	                      DEFAULT_ALSA=yes
-else
-  ALSA_FOUND=no
-fi
-
-done
-
-	fi
-	if test "x$ALSA_FOUND" = xno; then
-	    help_on_build_dependency alsa
-	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
-	fi
-fi
-
-
-
-
-###############################################################################
-#
-# Check for pulse audio headers and libraries.
-#
-PULSE_FOUND=no
-
-# Check whether --with-pulse was given.
-if test "${with_pulse+set}" = set; then :
-  withval=$with_pulse;
-fi
-
-
-# Check whether --with-pulse-include was given.
-if test "${with_pulse_include+set}" = set; then :
-  withval=$with_pulse_include;
-fi
-
-
-# Check whether --with-pulse-lib was given.
-if test "${with_pulse_lib+set}" = set; then :
-  withval=$with_pulse_lib;
-fi
-
-
-if test "x${with_pulse}" != x; then
-    PULSE_LIBS="-L${with_pulse}/lib -lfreetype"
-    PULSE_CFLAGS="-I${with_pulse}/include"
-    PULSE_FOUND=yes
-fi
-if test "x${with_pulse_include}" != x; then
-    PULSE_CFLAGS="-I${with_pulse_include}"
-    PULSE_FOUND=yes
-fi
-if test "x${with_pulse_lib}" != x; then
-    PULSE_LIBS="-L${with_pulse_lib} -lpulse"
-    PULSE_FOUND=yes
-fi
-if test "x$PULSE_FOUND" = xno; then
-
-
-    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
-        # Source the builddeps file again, to make sure it uses the latest variables!
-        . $builddepsfile
-        # Look for a host and build machine specific resource!
-        eval resource=\${builddep_pulse_BUILD_${rewritten_build_var}_HOST_${rewritten_host_var}}
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a host specific resource
-            eval resource=\${builddep_pulse_HOST_${rewritten_host_var}}
-        fi
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a build specific resource
-            eval resource=\${builddep_pulse_BUILD_${rewritten_build_var}}
-        fi
-        if test "x$resource" = x; then
-            # Ok, lets instead look for a generic resource
-            # (The pulse comes from M4 and not the shell, thus no need for eval here.)
-            resource=${builddep_pulse}
-        fi
-        if test "x$resource" != x; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for pulse" >&5
-$as_echo "$as_me: Using builddeps $resource for pulse" >&6;}
-	    # If the resource in the builddeps.conf file is an existing directory,
-	    # for example /java/linux/cups
-	    if test -d ${resource}; then
-	       depdir=${resource}
-	    else
-
-# pulse is for example mymodule
-# $resource is for example libs/general/libmymod_1_2_3.zip
-# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
-# $with_builddeps_dir is for example /localhome/builddeps
-# depdir is the name of the variable into which we store the depdir, eg MYMOD
-# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
-# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
-    filename=`basename $resource`
-    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
-    filebase=${filename%%.*}
-    extension=${filename#*.}
-    installdir=$with_builddeps_dir/$filebase
-    if test ! -f $installdir/$filename.unpacked; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency pulse from $with_builddeps_server/$resource and installing into $installdir" >&5
-$as_echo "$as_me: Downloading build dependency pulse from $with_builddeps_server/$resource and installing into $installdir" >&6;}
-        if test ! -d $installdir; then
-            mkdir -p $installdir
-        fi
-        if test ! -d $installdir; then
-            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
-        fi
-        tmpfile=`mktemp $installdir/pulse.XXXXXXXXX`
-        touch $tmpfile
-        if test ! -f $tmpfile; then
-            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
-        fi
-
-    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
-    # $tmpfile is the local file name for the downloaded file.
-    VALID_TOOL=no
-    if test "x$BDEPS_FTP" = xwget; then
-       VALID_TOOL=yes
-       wget -O $tmpfile $with_builddeps_server/$resource
-    fi
-    if test "x$BDEPS_FTP" = xlftp; then
-       VALID_TOOL=yes
-       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
-    fi
-    if test "x$BDEPS_FTP" = xftp; then
-        VALID_TOOL=yes
-        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
-        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
-        FTPUSERPWD=${FTPSERVER%%@*}
-        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
-            FTPUSER=${userpwd%%:*}
-            FTPPWD=${userpwd#*@}
-            FTPSERVER=${FTPSERVER#*@}
-        else
-            FTPUSER=ftp
-            FTPPWD=ftp
-        fi
-        # the "pass" command does not work on some
-        # ftp clients (read ftp.exe) but if it works,
-        # passive mode is better!
-        (\
-            echo "user $FTPUSER $FTPPWD"        ;\
-            echo "pass"                         ;\
-            echo "bin"                          ;\
-            echo "get $FTPPATH $tmpfile"              ;\
-        ) | ftp -in $FTPSERVER
-    fi
-    if test "x$VALID_TOOL" != xyes; then
-       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
-    fi
-
-        mv $tmpfile $installdir/$filename
-        if test ! -s $installdir/$filename; then
-            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
-        fi
-        case "$extension" in
-            zip)  echo "Unzipping $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
-            ;;
-            tar.gz) echo "Untaring $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-            ;;
-            tgz) echo "Untaring $installdir/$filename..."
-               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
-            ;;
-            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
-            ;;
-        esac
-    fi
-    if test -f $installdir/$filename.unpacked; then
-        depdir=$installdir
-    fi
-
-	    fi
-            # Source the builddeps file again, because in the previous command, the depdir
-            # was updated to point at the current build dependency install directory.
-            . $builddepsfile
-            # Now extract variables from the builddeps.conf files.
-            theroot=${builddep_pulse_ROOT}
-            thecflags=${builddep_pulse_CFLAGS}
-            thelibs=${builddep_pulse_LIBS}
-            if test "x$depdir" = x; then
-                as_fn_error $? "Could not download build dependency pulse" "$LINENO" 5
-            fi
-            PULSE=$depdir
-            if test "x$theroot" != x; then
-               PULSE="$theroot"
-            fi
-            if test "x$thecflags" != x; then
-               PULSE_CFLAGS="$thecflags"
-            fi
-            if test "x$thelibs" != x; then
-               PULSE_LIBS="$thelibs"
-            fi
-            PULSE_FOUND=yes
-            else PULSE_FOUND=no
-
-        fi
-        else PULSE_FOUND=no
-
-    fi
-
-fi
-if test "x$PULSE_FOUND" = xno; then
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBPULSE" >&5
-$as_echo_n "checking for LIBPULSE... " >&6; }
-
-if test -n "$LIBPULSE_CFLAGS"; then
-    pkg_cv_LIBPULSE_CFLAGS="$LIBPULSE_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse >= 0.9.11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libpulse >= 0.9.11") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_LIBPULSE_CFLAGS=`$PKG_CONFIG --cflags "libpulse >= 0.9.11" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$LIBPULSE_LIBS"; then
-    pkg_cv_LIBPULSE_LIBS="$LIBPULSE_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse >= 0.9.11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libpulse >= 0.9.11") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_LIBPULSE_LIBS=`$PKG_CONFIG --libs "libpulse >= 0.9.11" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        LIBPULSE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpulse >= 0.9.11" 2>&1`
-        else
-	        LIBPULSE_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpulse >= 0.9.11" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$LIBPULSE_PKG_ERRORS" >&5
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                PULSE_FOUND=no
-elif test $pkg_failed = untried; then
-	PULSE_FOUND=no
-else
-	LIBPULSE_CFLAGS=$pkg_cv_LIBPULSE_CFLAGS
-	LIBPULSE_LIBS=$pkg_cv_LIBPULSE_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	PULSE_FOUND=yes
-fi
-fi
-if test "x$PULSE_FOUND" = xno; then
-    for ac_header in pulse/pulseaudio.h
-do :
-  ac_fn_cxx_check_header_mongrel "$LINENO" "pulse/pulseaudio.h" "ac_cv_header_pulse_pulseaudio_h" "$ac_includes_default"
-if test "x$ac_cv_header_pulse_pulseaudio_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PULSE_PULSEAUDIO_H 1
-_ACEOF
- PULSE_FOUND=yes
-                      PULSE_CFLAGS=-Iignoreme
-                      PULSE_LIBS=
-                      DEFAULT_PULSE=yes
-else
-  PULSE_FOUND=no
-fi
-
-done
-
-fi
-
-if test "x$PULSE_FOUND" = xno && test "x$PULSE_NOT_NEEDED" != xyes; then
-    help_on_build_dependency pulse
-    as_fn_error $? "Could not find pulse audio libraries. $HELP_MSG " "$LINENO" 5
-fi
-
-
-
-
-###############################################################################
-#
-# Check for the jpeg library
-#
-
-USE_EXTERNAL_LIBJPEG=true
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
-$as_echo_n "checking for main in -ljpeg... " >&6; }
-if test "${ac_cv_lib_jpeg_main+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ljpeg  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-int
-main ()
-{
-return main ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_cv_lib_jpeg_main=yes
-else
-  ac_cv_lib_jpeg_main=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
-$as_echo "$ac_cv_lib_jpeg_main" >&6; }
-if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBJPEG 1
-_ACEOF
-
-  LIBS="-ljpeg $LIBS"
-
-else
-   USE_EXTERNAL_LIBJPEG=false
-               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
-$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
-
-fi
-
-
-
-###############################################################################
-#
-# Check for the gif library
-#
-
-USE_EXTERNAL_LIBJPEG=true
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
-$as_echo_n "checking for main in -lgif... " >&6; }
-if test "${ac_cv_lib_gif_main+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgif  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-int
-main ()
-{
-return main ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_cv_lib_gif_main=yes
-else
-  ac_cv_lib_gif_main=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
-$as_echo "$ac_cv_lib_gif_main" >&6; }
-if test "x$ac_cv_lib_gif_main" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBGIF 1
-_ACEOF
-
-  LIBS="-lgif $LIBS"
-
-else
-   USE_EXTERNAL_LIBGIF=false
-               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
-$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
-
+  . $conf_script_dir/generated-configure.sh $conf_processed_arguments --with-extra-cflags="$conf_extra_cflags" --with-extra-cxxflags="$conf_extra_cxxflags"
 fi
 
-
-
-###############################################################################
-#
-# Check for the zlib library
-#
-
-USE_EXTERNAL_LIBZ=true
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lz" >&5
-$as_echo_n "checking for main in -lz... " >&6; }
-if test "${ac_cv_lib_z_main+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-int
-main ()
-{
-return main ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_cv_lib_z_main=yes
-else
-  ac_cv_lib_z_main=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_main" >&5
-$as_echo "$ac_cv_lib_z_main" >&6; }
-if test "x$ac_cv_lib_z_main" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBZ 1
-_ACEOF
-
-  LIBS="-lz $LIBS"
-
-else
-   USE_EXTERNAL_LIBZ=false
-               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use zlib bundled with the OpenJDK source" >&5
-$as_echo "$as_me: Will use zlib bundled with the OpenJDK source" >&6;}
-
-fi
-
-
-
-###############################################################################
-#
-# Check if altzone exists in time.h
-#
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <time.h>
-int
-main ()
-{
-return (int)altzone;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  has_altzone=yes
-else
-  has_altzone=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-if test "x$has_altzone" = xyes; then
-
-$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
-
-fi
-
-###############################################################################
-#
-# Check the maths library
-#
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
-$as_echo_n "checking for cos in -lm... " >&6; }
-if test "${ac_cv_lib_m_cos+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lm  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char cos ();
-int
-main ()
-{
-return cos ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_cv_lib_m_cos=yes
-else
-  ac_cv_lib_m_cos=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
-$as_echo "$ac_cv_lib_m_cos" >&6; }
-if test "x$ac_cv_lib_m_cos" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBM 1
-_ACEOF
-
-  LIBS="-lm $LIBS"
-
-else
-
-                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
-$as_echo "$as_me: Maths library was not found" >&6;}
-
-fi
-
-
-
-###############################################################################
-#
-# Check for libdl.so
-
-save_LIBS="$LIBS"
-LIBS=""
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_cv_lib_dl_dlopen=yes
-else
-  ac_cv_lib_dl_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBDL 1
-_ACEOF
-
-  LIBS="-ldl $LIBS"
-
-fi
-
-LIBDL="$LIBS"
-
-LIBS="$save_LIBS"
-
-###############################################################################
-#
-# Should we run the painfully slow javadoc tool?
-#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build documentation" >&5
-$as_echo_n "checking whether to build documentation... " >&6; }
-# Check whether --enable-docs was given.
-if test "${enable_docs+set}" = set; then :
-  enableval=$enable_docs; ENABLE_DOCS="${enableval}"
-else
-  ENABLE_DOCS='no'
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DOCS" >&5
-$as_echo "$ENABLE_DOCS" >&6; }
-
-GENERATE_DOCS=false
-if test "x$ENABLE_DOCS" = xyes; then
-    GENERATE_DOCS=true
-fi
-
-
-###############################################################################
-#
-# Should we compile nimbus swing L&F? We can probably remove this option
-# since nimbus is officially part of javax now.
-#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build nimbus L&F" >&5
-$as_echo_n "checking whether to build nimbus L&F... " >&6; }
-# Check whether --enable-nimbus was given.
-if test "${enable_nimbus+set}" = set; then :
-  enableval=$enable_nimbus; ENABLE_NIMBUS="${enableval}"
-else
-  ENABLE_NIMBUS='yes'
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_NIMBUS" >&5
-$as_echo "$ENABLE_NIMBUS" >&6; }
-DISABLE_NIMBUS=
-if test "x$ENABLE_NIMBUS" = xno; then
-    DISABLE_NIMBUS=true
-fi
-
-
-###############################################################################
-#
-# Setup the opt flags for different compilers
-# and different operating systems.
-#
-C_FLAG_DEPS="-MMD -MF"
-CXX_FLAG_DEPS="-MMD -MF"
-
-case $COMPILER_TYPE in
-  CC )
-    D_FLAG="-g"
-    case $COMPILER_NAME in
-      gcc )
-      	case $PLATFORM in
-	  macosx )
-	    # On MacOSX we optimize for size, something
-	    # we should do for all platforms?
-	    C_O_FLAG_HI="-Os"
-	    C_O_FLAG_NORM="-Os"
-	    C_O_FLAG_NONE=""
-	    ;;
-	  *)
-	    C_O_FLAG_HI="-O3"
-	    C_O_FLAG_NORM="-O2"
-	    C_O_FLAG_NONE="-O0"
-	    ;;
-	esac
-        CXX_O_FLAG_HI="$C_O_FLAG_HI"
-        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
-        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
-        ;;
-      ossc )
-        #
-        # Forte has different names for this with their C++ compiler...
-        #
-	CXX_FLAG_DEPS="-xMMD -xMF"
-
-# Extra options used with HIGHEST
-#
-# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
-#          done with care, there are some assumptions below that need to
-#          be understood about the use of pointers, and IEEE behavior.
-#
-# Use non-standard floating point mode (not IEEE 754)
-CC_HIGHEST="$CC_HIGHEST -fns"
-# Do some simplification of floating point arithmetic (not IEEE 754)
-CC_HIGHEST="$CC_HIGHEST -fsimple"
-# Use single precision floating point with 'float'
-CC_HIGHEST="$CC_HIGHEST -fsingle"
-# Assume memory references via basic pointer types do not alias
-#   (Source with excessing pointer casting and data access with mixed
-#    pointer types are not recommended)
-CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
-# Use intrinsic or inline versions for math/std functions
-#   (If you expect perfect errno behavior, do not use this)
-CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
-# Loop data dependency optimizations (need -xO3 or higher)
-CC_HIGHEST="$CC_HIGHEST -xdepend"
-# Pointer parameters to functions do not overlap
-#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
-#    If you pass in multiple pointers to the same data, do not use this)
-CC_HIGHEST="$CC_HIGHEST -xrestrict"
-# Inline some library routines
-#   (If you expect perfect errno behavior, do not use this)
-CC_HIGHEST="$CC_HIGHEST -xlibmil"
-# Use optimized math routines
-#   (If you expect perfect errno behavior, do not use this)
-#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
-#CC_HIGHEST="$CC_HIGHEST -xlibmopt"
-
-        case $LEGACY_HOST_CPU1 in
-          i586)
-            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xchip=pentium"
-            C_O_FLAG_HI="-xO4 -Wu,-O4~yz"
-            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz"
-            C_O_FLAG_NONE=""
-            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xchip=pentium"
-            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz"
-            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz"
-            CXX_O_FLAG_NONE=""
-            ;;
-          sparc)
-            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
-            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
-            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
-            C_O_FLAG_NONE=""
-            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
-            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
-            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
-            CXX_O_FLAG_NONE=""
-            ;;
-        esac
-    esac
-    ;;
-  CL )
-    D_FLAG=
-    C_O_FLAG_HI="-O2"
-    C_O_FLAG_NORM="-O1"
-    C_O_FLAG_NONE="-Od"
-    CXX_O_FLAG_HI="$C_O_FLAG_HI"
-    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
-    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
-    ;;
-esac
-
-if test -z "$C_O_FLAG_HIGHEST"; then
-   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
-fi
-
-if test -z "$CXX_O_FLAG_HIGHEST"; then
-   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-###############################################################################
-#
-# Setup legacy vars/targets and new vars to deal with different debug levels.
-#
-case $DEBUG_LEVEL in
-      release )
-              HOTSPOT_DEBUG_LEVEL="product"
-              HOTSPOT_EXPORT="product"
-              ;;
-      fastdebug )
-              HOTSPOT_DEBUG_LEVEL="fastdebug"
-              HOTSPOT_EXPORT="fastdebug"
-              CFLAGS="$CFLAGS $D_FLAG"
-              JAVAC_FLAGS="$JAVAC_FLAGS -g"
-              ;;
-      slowdebug )
-              HOTSPOT_DEBUG_LEVEL="jvmg"
-              HOTSPOT_EXPORT="debug"
-              CFLAGS="$CFLAGS $D_FLAG"
-	      C_O_FLAG_HI="$C_O_FLAG_NONE"
-	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
-	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
-	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
-              JAVAC_FLAGS="$JAVAC_FLAGS -g"
-              ;;
-esac
-
-###############################################################################
-#
-# Generate the legacy makefile targets for hotspot.
-# The hotspot api for selecting the build artifacts, really, needs to be improved.
-#
-HOTSPOT_TARGET=""
-
-if test "x$JVM_VARIANT_SERVER" = xtrue; then
-    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
-fi
-
-if test "x$JVM_VARIANT_CLIENT" = xtrue; then
-    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
-fi
-
-if test "x$JVM_VARIANT_KERNEL" = xtrue; then
-    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
-fi
-
-if test "x$JVM_VARIANT_ZERO" = xtrue; then
-    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
-fi
-
-if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
-    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
-fi
-
-HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
-
-###############################################################################
-#
-# Setup all directories for the subrepoes and the arguments to the sub makes.
-#
-LANGTOOLS_OUTPUTDIR="$OUTPUT_ROOT/langtools"
-LANGTOOLS_DIST="$OUTPUT_ROOT/langtools/dist"
-LANGTOOLS_MAKE_ARGS=""
-
-
-
-
-CORBA_OUTPUTDIR="$OUTPUT_ROOT/corba"
-CORBA_DIST="$OUTPUT_ROOT/corba/dist"
-CORBA_MAKE_ARGS=""
-
-
-
-
-JAXP_OUTPUTDIR="$OUTPUT_ROOT/jaxp"
-JAXP_DIST="$OUTPUT_ROOT/jaxp/dist"
-JAXP_MAKE_ARGS=""
-
-
-
-
-JAXWS_OUTPUTDIR="$OUTPUT_ROOT/jaxws"
-JAXWS_DIST="$OUTPUT_ROOT/jaxws/dist"
-JAXWS_MAKE_ARGS=""
-
-
-
-
-HOTSPOT_OUTPUTDIR="$OUTPUT_ROOT/hotspot"
-HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
-HOTSPOT_MAKE_ARGS="ALT_OUTPUTDIR=$HOTSPOT_OUTPUTDIR ALT_EXPORT_PATH=$HOTSPOT_DIST $HOTSPOT_TARGET"
-
-
-
-
-JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
-JDK_MAKE_ARGS="ALT_OUTPUTDIR=\"$OUTPUT_ROOT/jdk\""
-
-
-
-IMAGES_OUTPUTDIR=$OUTPUT_ROOT/images
-IMAGES_MAKE_ARGS="ALT_OUTPUTDIR=$OUTPUT_ROOT/jdk \
-                  SHARE_SRC=$JDK_TOPDIR/src/share \
-                  PLATFORM_SRC=$JDK_TOPDIR/src/$LEGACY_HOST_OS_API \
-                  TEMPDIR=$IMAGES_OUTPUTDIR/tmp \
-                  ABS_TEMPDIR=$IMAGES_OUTPUTDIR/tmp "
-
-
-
-###############################################################################
-#
-# Now setup the CFLAGS and LDFLAGS for the JDK build.
-# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
-#
-case $COMPILER_NAME in
-      gcc )
-      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
-                          -pipe -fno-omit-frame-pointer \
-                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
-          CFLAGS_JDK="$CFLAGS_JDK -fno-strict-aliasing"
-          ;;
-      ossc )
-      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -norunpath -xnolib"
-      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX"
-          ;;
-      cl )
-          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
-               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
-	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
-	       -DWIN32 -DIAL"
-          case $LEGACY_HOST_CPU1 in
-              i?86 )
-                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
-                  ;;
-              amd64 )
-                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
-                  ;;
-          esac
-          ;;
-esac
-
-CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
-
-# The package path is used only on macosx?
-PACKAGE_PATH=/opt/local
-
-
-# Sometimes we use a cpu dir (.../lib/amd64/server)
-# Sometimes not (.../lib/server)
-LIBARCHDIR="$LEGACY_HOST_CPU2/"
-if test "x$ENDIAN" = xlittle; then
-    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
-else
-    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
-fi
-if test "x$HOST_OS" = xlinux; then
-    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
-fi
-if test "x$HOST_OS" = xwindows; then
-    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
-fi
-if test "x$HOST_OS" = xsolaris; then
-    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
-fi
-if test "x$HOST_OS" = xmacosx; then
-    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
-    LIBARCHDIR=""
-fi
-if test "x$HOST_OS" = xbsd; then
-    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
-fi
-if test "x$DEBUG_LEVEL" = xrelease; then
-    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
-else
-    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
-fi
-
-CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$LEGACY_HOST_CPU1\"' -D$LEGACY_HOST_CPU1"
-CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
-
-CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
-        -I${JDK_OUTPUTDIR}/include \
-        -I${JDK_OUTPUTDIR}/include/$PLATFORM \
-        -I${JDK_TOPDIR}/src/share/javavm/export \
-        -I${JDK_TOPDIR}/src/$LEGACY_HOST_OS_API/javavm/export \
-        -I${JDK_TOPDIR}/src/share/native/common \
-        -I${JDK_TOPDIR}/src/$LEGACY_HOST_OS_API/native/common"
-
-# The shared libraries are compiled using the picflag.
-CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
-CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG"
-
-# Executable flags
-CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
-CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
-
-# Now this is odd. The JDK native libraries have to link against libjvm.so
-# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
-# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
-# is identical for client and server? Yes. Which is picked at runtime (client or server)?
-# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
-# libraries will link to whatever is in memory. Yuck.
-#
-# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
-if test "x$COMPILER_TYPE" = xCL; then
-    LDFLAGS_JDKLIB="$LDFLAGS -dll -libpath:${JDK_OUTPUTDIR}/lib -libpath:${JDK_OUTPUTDIR}/objs"
-    LDFLAGS_JDKLIB_SUFFIX=""
-    if test "$HOST_CPU_BITS" == "64"; then
-        LDFLAGS_STACK_SIZE=1048576
-    else
-        LDFLAGS_STACK_SIZE=327680
-    fi
-    LDFLAGS_JDKEXE="$LDFLAGS /STACK:$LDFLAGS_STACK_SIZE"
-else
-    # If this is a --hash-style=gnu system, use --hash-style=both, why?
-    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
-    if test -n "$HAS_GNU_HASH"; then
-        # And since we now know that the linker is gnu, then add -z defs, to forbid
-        # undefined symbols in object files.
-        LDFLAGS="$LDFLAGS -Xlinker --hash-style=both -Xlinker -z -Xlinker defs"
-        if test "x$DEBUG_LEVEL" == "xrelease"; then
-            # When building release libraries, tell the linker optimize them.
-            # Should this be supplied to the OSS linker as well?
-            LDFLAGS="$LDFLAGS -Xlinker -O1"
-        fi
-    fi
-
-    LDFLAGS_JDKLIB="$LDFLAGS $SHARED_LIBRARY_FLAGS \
-                    -L${JDK_OUTPUTDIR}/objs \
-                    -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}server \
-                    -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}client \
-  	            -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}"
-    LDFLAGS_JDKLIB_SUFFIX="-ljvm -ljava"
-    if test "x$COMPILER_NAME" = xossc; then
-        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
-    fi
-
-    # Only the jli library is explicitly linked when the launchers are built.
-    # The libjvm is then dynamically loaded/linked by the launcher.
-    if test "x$HOST_OS" != "xmacosx"; then
-       LDFLAGS_JDKEXE="$LDFLAGS -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}jli"
-       LDFLAGS_JDKEXE_SUFFIX="-ljli"
-    fi
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-###############################################################################
-#
-# statically link libstdc++ before C++ ABI is stablized on Linux unless
-# dynamic build is configured on command line.
-#
-# Check whether --enable-static-link-stdc++ was given.
-if test "${enable_static_link_stdc__+set}" = set; then :
-  enableval=$enable_static_link_stdc__;
-else
-
-		enable_static_link_stdc__=yes
-
-fi
-
-
-if test "x$HOST_OS" = xlinux; then
-    # Test if -lstdc++ works.
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
-$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-    OLD_CXXFLAGS="$CXXFLAGS"
-    CXXFLAGS="$CXXFLAGS -lstdc++"
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  has_dynamic_libstdcxx=yes
-else
-  has_dynamic_libstdcxx=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    CXXFLAGS="$OLD_CXXFLAGS"
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
-$as_echo "$has_dynamic_libstdcxx" >&6; }
-
-    # Test if stdc++ can be linked statically.
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
-$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
-    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-    OLD_LIBS="$LIBS"
-    OLD_CXX="$CXX"
-    LIBS="$STATIC_STDCXX_FLAGS"
-    CXX="$CC"
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  has_static_libstdcxx=yes
-else
-  has_static_libstdcxx=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    LIBS="$OLD_LIBS"
-    CXX="$OLD_CXX"
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
-$as_echo "$has_static_libstdcxx" >&6; }
-
-    if test "x$has_static_libcxx" = xno && test "x$has_dynamic_libcxx" = xno; then
-        as_fn_error $? "I cannot link to stdc++! Neither dynamically nor statically." "$LINENO" 5
-    fi
-
-    if test "x$enable_static_link_stdc__" = xyes && test "x$has_static_libstdcxx" = xno; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Static linking of libstdc++ was not possible reverting to dynamic linking." >&5
-$as_echo "$as_me: Static linking of libstdc++ was not possible reverting to dynamic linking." >&6;}
-        enable_static_link_stdc__=no
-    fi
-
-    if test "x$enable_static_link_stdc__" = xno && test "x$has_dynamic_libstdcxx" = xno; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Dynamic linking of libstdc++ was not possible reverting to static linking." >&5
-$as_echo "$as_me: Dynamic linking of libstdc++ was not possible reverting to static linking." >&6;}
-        enable_static_link_stdc__=yes
-    fi
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
-$as_echo_n "checking how to link with libstdc++... " >&6; }
-    if test "x$enable_static_link_stdc__" = xyes; then
-        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
-        LDCXX="$CC"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
-$as_echo "static" >&6; }
-    else
-        LIBCXX="$LIBCXX -lstdc++"
-        LDCXX="$CXX"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
-$as_echo "dynamic" >&6; }
-    fi
-fi
-
-###############################################################################
-#
-# Could someone enlighten this configure script with a comment about libCrun?
-# The LEGACY_HOST_CPU3 is the setting for ISA_DIR.
-#
-if test "x$HOST_OS" = xsolaris && test "x$LIBCXX" = x; then
-    LIBCXX="/usr/lib${LEGACY_HOST_CPU3}/libCrun.so.1"
-fi
-
-# TODO better (platform agnostic) test
-if test "x$HOST_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
-    LIBCXX="-lstdc++"
-fi
-
-
-
-###############################################################################
-
-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 ' '`"
-
-
-
-
-###############################################################################
-#
-# Misc
-#
-
-# The name of the Service Agent jar.
-SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
-if test "x$HOST_OS" = "xwindows"; then
-    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
-fi
-
-
-# Control wether Hotspot runs Queens test after build.
-# Check whether --enable-hotspot-test-in-build was given.
-if test "${enable_hotspot_test_in_build+set}" = set; then :
-  enableval=$enable_hotspot_test_in_build;
-else
-  enable_hotspot_test_in_build=no
-fi
-
-if test "x$enable_hotspot_test_in_build" = "xyes"; then
-    TEST_IN_BUILD=true
-else
-    TEST_IN_BUILD=false
-fi
-
-
-###############################################################################
-#
-# Choose cacerts source file
-#
-
-# Check whether --with-cacerts-file was given.
-if test "${with_cacerts_file+set}" = set; then :
-  withval=$with_cacerts_file;
-fi
-
-if test "x$with_cacerts_file" != x; then
-    CACERTS_FILE=$with_cacerts_file
-else
-    if test "x$OPENJDK" = "xtrue"; then
-        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
-    else
-        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
-    fi
-fi
-
-
-# Check if build directory is on local disk.
-# return 0 if it is on local disk, non-0 if on remote disk or failure
-function is_directory_on_local_disk {
-	# df -l lists only local disks; if the given directory is not found then
-	# a non-zero exit code is given
-	$DF -l $1 > /dev/null 2>&1
-}
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
-$as_echo_n "checking if build directory is on local disk... " >&6; }
-if is_directory_on_local_disk $OUTPUT_ROOT; then
-	OUTPUT_DIR_IS_LOCAL="yes"
-else
-	OUTPUT_DIR_IS_LOCAL="no"
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
-$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
-
-# We're messing a bit with internal autoconf variables to put the config.status in the
-# output directory instead of the current directory.
-CONFIG_STATUS=$OUTPUT_ROOT/config.status
-
-# Now create the actual output files, after this, the main work of configure is done
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems.  If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
-  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) { eval $ac_var=; unset $ac_var;} ;;
-      esac ;;
-    esac
-  done
-
-  (set) 2>&1 |
-    case $as_nl`(ac_space=' '; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      # `set' does not quote correctly, so add quotes: double-quote
-      # substitution turns \\\\ into \\, and sed turns \\ into \.
-      sed -n \
-	"s/'/'\\\\''/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;; #(
-    *)
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-) |
-  sed '
-     /^ac_cv_env_/b end
-     t clear
-     :clear
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
-     t end
-     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
-  if test -w "$cache_file"; then
-    test "x$cache_file" != "x/dev/null" &&
-      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
-    cat confcache >$cache_file
-  else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
-  fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-U=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
-  # 1. Remove the extension, and $U if already installed.
-  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
-  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
-  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
-  #    will be set to the directory where LIBOBJS objects are built.
-  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
-  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_write_fail=0
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-as_write_fail=0
-cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-
-SHELL=\${CONFIG_SHELL-$SHELL}
-export SHELL
-_ASEOF
-cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in #(
-  *posix*) :
-    set -o posix ;; #(
-  *) :
-     ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
-    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='print -r --'
-  as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in #(
-      *"$as_nl"*)
-	expr "X$arg" : "X\\(.*\\)$as_nl";
-	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" ""	$as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-case $0 in #((
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-  done
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there.  '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
+###
+### Post-processing
+###
 
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
-  as_status=$1; test $as_status -eq 0 && as_status=1
-  if test "$4"; then
-    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
-  fi
-  $as_echo "$as_me: error: $2" >&2
-  as_fn_exit $as_status
-} # as_fn_error
-
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
-  return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
-  set +e
-  as_fn_set_status $1
-  exit $1
-} # as_fn_exit
-
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
-  { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
-  eval 'as_fn_append ()
-  {
-    eval $1+=\$2
-  }'
-else
-  as_fn_append ()
-  {
-    eval $1=\$$1\$2
-  }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
-  eval 'as_fn_arith ()
-  {
-    as_val=$(( $* ))
-  }'
-else
-  as_fn_arith ()
-  {
-    as_val=`expr "$@" || test $? -eq 1`
-  }
-fi # as_fn_arith
-
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
-  case `echo 'xy\c'` in
-  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  xy)  ECHO_C='\c';;
-  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
-       ECHO_T='	';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
-  if ln -s conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s='ln -s'
-    # ... but there are two gotchas:
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
-    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
-  elif ln conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s=ln
-  else
-    as_ln_s='cp -p'
-  fi
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || eval $as_mkdir_p || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p='mkdir -p "$as_dir"'
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-	test -d "$1/.";
-      else
-	case $1 in #(
-	-*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-## ----------------------------------- ##
-## Main body of $CONFIG_STATUS script. ##
-## ----------------------------------- ##
-_ASEOF
-test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# Save the log message, to keep $0 and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by openjdk $as_me version-0.1, which was
-generated by GNU Autoconf 2.67.  Invocation command line was
-
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-case $ac_config_files in *"
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
-esac
-
-case $ac_config_headers in *"
-"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
-esac
-
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
-from templates according to the current configuration.  Unless the files
-and actions are specified as TAGs, all are instantiated by default.
-
-Usage: $0 [OPTION]... [TAG]...
-
-  -h, --help       print this help, then exit
-  -V, --version    print version number and configuration settings, then exit
-      --config     print configuration, then exit
-  -q, --quiet, --silent
-                   do not print progress messages
-  -d, --debug      don't remove temporary files
-      --recheck    update $as_me by reconfiguring in the same conditions
-      --file=FILE[:TEMPLATE]
-                   instantiate the configuration file FILE
-      --header=FILE[:TEMPLATE]
-                   instantiate the configuration header FILE
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Report bugs to <build-infra-dev@openjdk.java.net>."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
-ac_cs_version="\\
-openjdk config.status version-0.1
-configured by $0, generated by GNU Autoconf 2.67,
-  with options \\"\$ac_cs_config\\"
-
-Copyright (C) 2010 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-AWK='$AWK'
-test -n "\$AWK" || AWK=awk
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
-ac_need_defaults=:
-while test $# != 0
-do
-  case $1 in
-  --*=?*)
-    ac_option=`expr "X$1" : 'X\([^=]*\)='`
-    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
-    ac_shift=:
-    ;;
-  --*=)
-    ac_option=`expr "X$1" : 'X\([^=]*\)='`
-    ac_optarg=
-    ac_shift=:
-    ;;
-  *)
-    ac_option=$1
-    ac_optarg=$2
-    ac_shift=shift
-    ;;
-  esac
-
-  case $ac_option in
-  # Handling of the options.
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    ac_cs_recheck=: ;;
-  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
-    $as_echo "$ac_cs_version"; exit ;;
-  --config | --confi | --conf | --con | --co | --c )
-    $as_echo "$ac_cs_config"; exit ;;
-  --debug | --debu | --deb | --de | --d | -d )
-    debug=: ;;
-  --file | --fil | --fi | --f )
-    $ac_shift
-    case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    '') as_fn_error $? "missing file argument" ;;
-    esac
-    as_fn_append CONFIG_FILES " '$ac_optarg'"
-    ac_need_defaults=false;;
-  --header | --heade | --head | --hea )
-    $ac_shift
-    case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
-    ac_need_defaults=false;;
-  --he | --h)
-    # Conflict between --help and --header
-    as_fn_error $? "ambiguous option: \`$1'
-Try \`$0 --help' for more information.";;
-  --help | --hel | -h )
-    $as_echo "$ac_cs_usage"; exit ;;
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil | --si | --s)
-    ac_cs_silent=: ;;
-
-  # This is an error.
-  -*) as_fn_error $? "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
-
-  *) as_fn_append ac_config_targets " $1"
-     ac_need_defaults=false ;;
-
-  esac
-  shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
-  exec 6>/dev/null
-  ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-if \$ac_cs_recheck; then
-  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-  shift
-  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
-  CONFIG_SHELL='$SHELL'
-  export CONFIG_SHELL
-  exec "\$@"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-  $as_echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
-  case $ac_config_target in
-    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
-    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
-    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
-
-  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
-  esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used.  Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
-  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
-fi
-
-# Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
-  tmp=
-  trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
-  trap 'as_fn_exit 1' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
-  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
-}  ||
-{
-  tmp=./conf$$-$RANDOM
-  (umask 077 && mkdir "$tmp")
-} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr=`echo X | tr X '\015'`
-# On cygwin, bash can eat \r inside `` if the user requested igncr.
-# But we know of no other shell where ac_cr would be empty at this
-# point, so we can use a bashism as a fallback.
-if test "x$ac_cr" = x; then
-  eval ac_cr=\$\'\\r\'
-fi
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\\r'
-else
-  ac_cs_awk_cr=$ac_cr
+# Move the log file to the output root, if this was successfully created
+if $TEST -d "$OUTPUT_ROOT"; then
+  mv -f config.log "$OUTPUT_ROOT" 2> /dev/null
 fi
-
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
-_ACEOF
-
-
-{
-  echo "cat >conf$$subs.awk <<_ACEOF" &&
-  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
-  echo "_ACEOF"
-} >conf$$subs.sh ||
-  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
-  . ./conf$$subs.sh ||
-    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-
-  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
-  if test $ac_delim_n = $ac_delim_num; then
-    break
-  elif $ac_last_try; then
-    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\)..*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\)..*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' <conf$$subs.awk | sed '
-/^[^""]/{
-  N
-  s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
-  for (key in S) S_is_set[key] = 1
-  FS = ""
-
-}
-{
-  line = $ 0
-  nfields = split(line, field, "@")
-  substed = 0
-  len = length(field[1])
-  for (i = 2; i < nfields; i++) {
-    key = field[i]
-    keylen = length(key)
-    if (S_is_set[key]) {
-      value = S[key]
-      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
-      len += length(value) + length(field[++i])
-      substed = 1
-    } else
-      len += 1 + keylen
-  }
-
-  print line
-}
-
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
-  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
-  cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
-  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
-# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
-h
-s///
-s/^/:/
-s/[	 ]*$/:/
-s/:\$(srcdir):/:/g
-s/:\${srcdir}:/:/g
-s/:@srcdir@:/:/g
-s/^:*//
-s/:*$//
-x
-s/\(=[	 ]*\).*/\1/
-G
-s/\n//
-s/^[^=]*=[	 ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
-
-# Set up the scripts for CONFIG_HEADERS section.
-# No need to generate them if there are no CONFIG_HEADERS.
-# This happens for instance with `./config.status Makefile'.
-if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
-BEGIN {
-_ACEOF
-
-# Transform confdefs.h into an awk script `defines.awk', embedded as
-# here-document in config.status, that substitutes the proper values into
-# config.h.in to produce config.h.
-
-# Create a delimiter string that does not exist in confdefs.h, to ease
-# handling of long lines.
-ac_delim='%!_!# '
-for ac_last_try in false false :; do
-  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
-    break
-  elif $ac_last_try; then
-    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-
-# For the awk script, D is an array of macro values keyed by name,
-# likewise P contains macro parameters if any.  Preserve backslash
-# newline sequences.
-
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-sed -n '
-s/.\{148\}/&'"$ac_delim"'/g
-t rset
-:rset
-s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
-t def
-d
-:def
-s/\\$//
-t bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3"/p
-s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
-d
-:bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3\\\\\\n"\\/p
-t cont
-s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
-t cont
-d
-:cont
-n
-s/.\{148\}/&'"$ac_delim"'/g
-t clear
-:clear
-s/\\$//
-t bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/"/p
-d
-:bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
-b cont
-' <confdefs.h | sed '
-s/'"$ac_delim"'/"\\\
-"/g' >>$CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-  for (key in D) D_is_set[key] = 1
-  FS = ""
-}
-/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
-  line = \$ 0
-  split(line, arg, " ")
-  if (arg[1] == "#") {
-    defundef = arg[2]
-    mac1 = arg[3]
-  } else {
-    defundef = substr(arg[1], 2)
-    mac1 = arg[2]
-  }
-  split(mac1, mac2, "(") #)
-  macro = mac2[1]
-  prefix = substr(line, 1, index(line, defundef) - 1)
-  if (D_is_set[macro]) {
-    # Preserve the white space surrounding the "#".
-    print prefix "define", macro P[macro] D[macro]
-    next
-  } else {
-    # Replace #undef with comments.  This is necessary, for example,
-    # in the case of _POSIX_SOURCE, which is predefined and required
-    # on some systems where configure will not decide to define it.
-    if (defundef == "undef") {
-      print "/*", prefix defundef, macro, "*/"
-      next
-    }
-  }
-}
-{ print }
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
-fi # test -n "$CONFIG_HEADERS"
-
-
-eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
-shift
-for ac_tag
-do
-  case $ac_tag in
-  :[FHLC]) ac_mode=$ac_tag; continue;;
-  esac
-  case $ac_mode$ac_tag in
-  :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
-  :[FH]-) ac_tag=-:-;;
-  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
-  esac
-  ac_save_IFS=$IFS
-  IFS=:
-  set x $ac_tag
-  IFS=$ac_save_IFS
-  shift
-  ac_file=$1
-  shift
-
-  case $ac_mode in
-  :L) ac_source=$1;;
-  :[FH])
-    ac_file_inputs=
-    for ac_f
-    do
-      case $ac_f in
-      -) ac_f="$tmp/stdin";;
-      *) # Look for the file first in the build tree, then in the source tree
-	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
-	 # because $ac_f cannot contain `:'.
-	 test -f "$ac_f" ||
-	   case $ac_f in
-	   [\\/$]*) false;;
-	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
-	   esac ||
-	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
-      esac
-      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
-      as_fn_append ac_file_inputs " '$ac_f'"
-    done
-
-    # Let's still pretend it is `configure' which instantiates (i.e., don't
-    # use $as_me), people would be surprised to read:
-    #    /* config.h.  Generated by config.status.  */
-    configure_input='Generated from '`
-	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
-	`' by configure.'
-    if test x"$ac_file" != x-; then
-      configure_input="$ac_file.  $configure_input"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
-    fi
-    # Neutralize special characters interpreted by sed in replacement strings.
-    case $configure_input in #(
-    *\&* | *\|* | *\\* )
-       ac_sed_conf_input=`$as_echo "$configure_input" |
-       sed 's/[\\\\&|]/\\\\&/g'`;; #(
-    *) ac_sed_conf_input=$configure_input;;
-    esac
-
-    case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
-      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
-    esac
-    ;;
-  esac
-
-  ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$ac_file" : 'X\(//\)[^/]' \| \
-	 X"$ac_file" : 'X\(//\)$' \| \
-	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-  as_dir="$ac_dir"; as_fn_mkdir_p
-  ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
-  case $ac_mode in
-  :F)
-  #
-  # CONFIG_FILE
-  #
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-ac_sed_dataroot='
-/datarootdir/ {
-  p
-  q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-  ac_datarootdir_hack='
-  s&@datadir@&$datadir&g
-  s&@docdir@&$docdir&g
-  s&@infodir@&$infodir&g
-  s&@localedir@&$localedir&g
-  s&@mandir@&$mandir&g
-  s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined" >&2;}
-
-  rm -f "$tmp/stdin"
-  case $ac_file in
-  -) cat "$tmp/out" && rm -f "$tmp/out";;
-  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
-  esac \
-  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- ;;
-  :H)
-  #
-  # CONFIG_HEADER
-  #
-  if test x"$ac_file" != x-; then
-    {
-      $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
-      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
-    else
-      rm -f "$ac_file"
-      mv "$tmp/config.h" "$ac_file" \
-	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
-    fi
-  else
-    $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
-      || as_fn_error $? "could not create -" "$LINENO" 5
-  fi
- ;;
-
-
-  esac
-
-done # for ac_tag
-
-
-as_fn_exit 0
-_ACEOF
-ac_clean_files=$ac_clean_files_save
-
-test $ac_write_fail = 0 ||
-  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded.  So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status.  When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
-  ac_cs_success=:
-  ac_config_status_args=
-  test "$silent" = yes &&
-    ac_config_status_args="$ac_config_status_args --quiet"
-  exec 5>/dev/null
-  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
-  exec 5>>config.log
-  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
-  # would make configure fail if this is the last instruction.
-  $ac_cs_success || as_fn_exit 1
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
-
-
-# Finally output some useful information to the user
-
-if test "x$CCACHE_FOUND" != x; then
-	if  test "x$HAS_GOOD_CCACHE" = x; then
-		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
-		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
-	else
-		CCACHE_STATUS="installed and in use"
-	fi
-else
-	if test "x$GCC" = xyes; then
-		CCACHE_STATUS="not installed (consider installing)"
-		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
-	else
-		CCACHE_STATUS="not available for your system"
-	fi
-fi
-
-printf "\n"
-printf "====================================================\n"
-printf "A new configuration has been successfully created in\n"
-printf "$OUTPUT_ROOT\n"
-if test "x$CONFIGURE_COMMAND_LINE" != x; then
-	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
-else
-	printf "using default settings.\n"
-fi
-
-printf "\n"
-printf "Configuration summary:\n"
-printf "* Debug level:  $DEBUG_LEVEL\n"
-printf "* JDK variant:  $JDK_VARIANT\n"
-printf "* JVM variants: $with_jvm_variants\n"
-printf "* Host info:    OS: $HOST_OS, CPU architecture: $HOST_CPU_ARCH, address length: $HOST_CPU_BITS\n"
-printf "* Boot JDK:     $BOOT_JDK\n"
-
-printf "\n"
-printf "Build performance summary:\n"
-printf "* Cores to use:  $NUM_CORES\n"
-printf "* Memory limit:  $MEMORY_SIZE MB\n"
-printf "* ccache status: $CCACHE_STATUS\n"
-
-if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
-	printf "\n"
-	printf "WARNING: Your build output directory is not on a local disk.\n"
-	printf "This will severely degrade build performance!\n"
-	printf "It is recommended that you create an output directory on a local disk,\n"
-	printf "and run the configure script again from that directory.\n"
-fi
-
-if test "x$CCACHE_HELP_MSG" != x; then
-	printf "\n"
-	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
-	printf "$CCACHE_HELP_MSG\n"
-
-    help_on_build_dependency ccache
-    printf "$HELP_MSG\n"
-fi
--- a/common/autoconf/configure.ac	Wed Jul 05 18:15:28 2017 +0200
+++ b/common/autoconf/configure.ac	Wed Jul 05 18:16:12 2017 +0200
@@ -23,2856 +23,204 @@
 # questions.
 #
 
+###############################################################################
+#
+# Includes and boilerplate
+#
+###############################################################################
+
+
 AC_PREREQ([2.61])
-AC_INIT(openjdk, version-0.1, build-infra-dev@openjdk.java.net)
+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_CONFIG_AUX_DIR([build-aux])
-
 m4_include([build-aux/pkg.m4])
-m4_include([builddeps.m4])
-m4_include([platform.m4])
-m4_include([cores.m4])
-m4_include([help.m4])
-
-# Save the command line. Do this very early, before it is lost by calling autoconf macros.
-CONFIGURE_COMMAND_LINE="$@"
-AC_SUBST(CONFIGURE_COMMAND_LINE)
-
-# Locate the directory of this script.
-SCRIPT="[$]0"
-REMOVE_SYMBOLIC_LINKS(SCRIPT)        
-AUTOCONF_DIR=`dirname [$]0`
-
-# 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. 
-AC_PROG_AWK
-CHECK_NONEMPTY(AWK)
-AC_PATH_PROG(CAT, cat)
-CHECK_NONEMPTY(CAT)
-AC_PATH_PROG(CHMOD, chmod)
-CHECK_NONEMPTY(CHMOD)
-AC_PATH_PROG(CP, cp)
-CHECK_NONEMPTY(CP)
-AC_PATH_PROG(CPIO, cpio)
-CHECK_NONEMPTY(CPIO)
-AC_PATH_PROG(CUT, cut)
-CHECK_NONEMPTY(CUT)
-AC_PATH_PROG(DATE, date)
-CHECK_NONEMPTY(DATE)
-AC_PATH_PROG(DF, df)
-CHECK_NONEMPTY(DF)
-AC_PATH_PROG(DIFF, diff)
-CHECK_NONEMPTY(DIFF)
-# Warning echo is really, really unportable!!!!! Different
-# behaviour in bash and dash and in a lot of other shells!
-# Use printf for serious work! 
-AC_PATH_PROG(ECHO, echo)
-CHECK_NONEMPTY(ECHO)
-AC_PROG_EGREP
-CHECK_NONEMPTY(EGREP)
-AC_PROG_FGREP
-CHECK_NONEMPTY(FGREP)
-
-AC_PATH_PROG(FIND, find)
-CHECK_NONEMPTY(FIND)
-CHECK_FIND_DELETE
-AC_SUBST(FIND_DELETE)
-
-AC_PROG_GREP
-CHECK_NONEMPTY(GREP)
-AC_PATH_PROG(HEAD, head)
-CHECK_NONEMPTY(HEAD)
-AC_PATH_PROG(LN, ln)
-CHECK_NONEMPTY(LN)
-AC_PATH_PROG(LS, ls)
-CHECK_NONEMPTY(LS)
-AC_PATH_PROGS(MAKE, [gmake make])
-CHECK_NONEMPTY(MAKE)
-MAKE_VERSION=`$MAKE --version | head -n 1 | grep '3.8[[12346789]]'`
-if test "x$MAKE_VERSION" = x; then
-    AC_MSG_ERROR([You must use GNU make 3.81 or newer! Please put it in the path.])
-fi
-AC_PATH_PROG(MKDIR, mkdir)
-CHECK_NONEMPTY(MKDIR)
-AC_PATH_PROG(MV, mv)
-CHECK_NONEMPTY(MV)
-AC_PATH_PROGS(NAWK, [nawk gawk awk])
-CHECK_NONEMPTY(NAWK)
-AC_PATH_PROG(PRINTF, printf)
-CHECK_NONEMPTY(PRINTF)
-AC_PATH_PROG(THEPWDCMD, pwd)
-AC_PATH_PROG(RM, rm)
-CHECK_NONEMPTY(RM)
-RM="$RM -f"
-AC_PROG_SED
-CHECK_NONEMPTY(SED)
-AC_PATH_PROG(SH, sh)
-CHECK_NONEMPTY(SH)
-AC_PATH_PROG(SORT, sort)
-CHECK_NONEMPTY(SORT)
-AC_PATH_PROG(TAR, tar)
-CHECK_NONEMPTY(TAR)
-AC_PATH_PROG(TAIL, tail)
-CHECK_NONEMPTY(TAIL)
-AC_PATH_PROG(TEE, tee)
-CHECK_NONEMPTY(TEE)
-AC_PATH_PROG(TR, tr)
-CHECK_NONEMPTY(TR)
-AC_PATH_PROG(TOUCH, touch)
-CHECK_NONEMPTY(TOUCH)
-AC_PATH_PROG(WC, wc)
-CHECK_NONEMPTY(WC)
-AC_PATH_PROG(XARGS, xargs)
-CHECK_NONEMPTY(XARGS)
-AC_PATH_PROG(ZIP, zip)
-CHECK_NONEMPTY(ZIP)
-AC_PATH_PROG(UNZIP, unzip)
-CHECK_NONEMPTY(UNZIP)
-AC_PATH_PROG(LDD, ldd)
-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
-AC_PATH_PROG(OTOOL, otool)
-if test "x$OTOOL" = "x"; then
-   OTOOL="true"
-fi
-AC_PATH_PROG(READELF, readelf)
-AC_PATH_PROG(EXPR, expr)
-CHECK_NONEMPTY(EXPR)
-AC_PATH_PROG(FILE, file)
-CHECK_NONEMPTY(FILE)
-AC_PATH_PROG(HG, hg)
-
-# Figure out the build and host system.
-AC_CANONICAL_BUILD
-AC_CANONICAL_HOST
-
-AC_ARG_WITH(data-model, [AS_HELP_STRING([--with-data-model],
-   [build 32-bit or 64-bit binaries (for platforms that support it), e.g. --with-data-model=32 @<:@guessed@:>@])])
 
-if test "x$with_data_model" != x && \
-   test "x$with_data_model" != x32 && \
-   test "x$with_data_model" != x64 ; then
-    AC_MSG_ERROR([The data model can only be 32 or 64!])
-fi
-# Translate the standard cpu-vendor-kernel-os quadruplets into
-# the new HOST_.... and BUILD_... and the legacy names used by
-# the openjdk build.
-# It uses $host_os $host_cpu $build_os $build_cpu and $with_data_model
-EXTRACT_HOST_AND_BUILD_AND_LEGACY_VARS
-# Now the following vars are defined.
-# HOST_OS=aix,bsd,hpux,linux,macosx,solaris,windows
-# HOST_OS_FAMILY=bsd,gnu,sysv,win32,wince
-# HOST_OS_API=posix,winapi
-#
-# HOST_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64
-# HOST_CPU_ARCH=x86,sparc,pcc,arm
-# HOST_CPU_BITS=32,64
-# HOST_CPU_ENDIAN=big,little
-#
-# There is also a:
-# LEGACY_HOST_CPU1=i586,amd64,....  # used to set the old var ARCH
-# LEGACY_HOST_CPU2=i386,amd64,.... # used to set the old var LIBARCH
-# LEGACY_HOST_CPU3=only sparcv9,amd64 # used to set the ISA_DIR on Solaris
-# There was also a BUILDARCH that had i486,amd64,... but we do not use that
-# in the new build.
-# LEGACY_HOST_OS_API=solaris,windows # used to select source roots
-
-DATE_WHEN_CONFIGURED=`LANG=C date`
-AC_SUBST(DATE_WHEN_CONFIGURED)
-
-# How many cores do we have on this build system?
-AC_ARG_WITH(num-cores, [AS_HELP_STRING([--with-num-cores],
-    [number of cores in the build system, e.g. --with-num-cores=8 @<:@probed@:>@])])
-if test "x$with_num_cores" = x; then
-    # The number of cores were not specified, try to probe them.
-    CHECK_CORES
-else
-    NUM_CORES=$with_num_cores
-    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
-fi
-AC_SUBST(NUM_CORES)
-AC_SUBST(CONCURRENT_BUILD_JOBS)
-
-# How many cores do we have on this build system?
-AC_ARG_WITH(memory-size, [AS_HELP_STRING([--with-memory-size],
-    [memory (in MB) available in the build system, e.g. --with-memory-size=1024 @<:@probed@:>@])])
-if test "x$with_memory_size" = x; then
-    # The memory size was not specified, try to probe it.
-    CHECK_MEMORY_SIZE
-else
-    MEMORY_SIZE=$with_memory_size
-fi
-AC_SUBST(MEMORY_SIZE)
-
-# Where is the source? It is located two levels above the configure script.
-CURDIR="$PWD"
-cd "$AUTOCONF_DIR/../.."
-SRC_ROOT="`pwd`"
-AC_SUBST(SRC_ROOT)
-cd "$CURDIR"
-
-# For cygwin we need cygpath first, since it is used everywhere.
-AC_PATH_PROG(CYGPATH, cygpath)
-PATH_SEP=":"
-if test "x$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)
-
-SPACESAFE(SRC_ROOT,[the path to the source root])
-SPACESAFE(CURDIR,[the path to the current directory])
+# Include these first...
+m4_include([basics.m4])
+m4_include([builddeps.m4])
+# ... then the rest
+m4_include([boot-jdk.m4])
+m4_include([build-performance.m4])
+m4_include([help.m4])
+m4_include([jdk-options.m4])
+m4_include([libraries.m4])
+m4_include([platform.m4])
+m4_include([source-dirs.m4])
+m4_include([toolchain.m4])
 
-if test "x$BUILD_OS" = "xsolaris"; then
-    # Also search in /usr/ccs/bin for utilities like ar and as.
-    PATH="/usr/ccs/bin:$PATH"
-fi
-
-###############################################################################
-#
-# OpenJDK or closed
-#
-AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only],
-    [build OpenJDK regardless of the presence of closed repositories @<:@disabled@:>@])],,)
-
-if test "x$enable_openjdk_only" = "xyes"; then
-    OPENJDK=true
-elif test "x$enable_openjdk_only" = "xno"; then
-    OPENJDK=false
-elif test -d "$SRC_ROOT/jdk/src/closed"; then
-    OPENJDK=false
-else
-    OPENJDK=true
-fi
-
-if test "x$OPENJDK" = "xtrue"; then
-    SET_OPENJDK=OPENJDK=true
-fi
-
-AC_SUBST(SET_OPENJDK)
-
-###############################################################################
-#
-# JIGSAW or not.  The JIGSAW variable is used during the intermediate
-# stage when we are building both the old style JDK and the new style modularized JDK.
-# When the modularized JDK is finalized, this option will go away.
-#
-AC_ARG_ENABLE([jigsaw], [AS_HELP_STRING([--enable-jigsaw],
-    [build Jigsaw images (not yet available) @<:@disabled@:>@])],,)
-
-if test "x$enable_jigsaw" = "xyes"; then
-    JIGSAW=true
-else
-    JIGSAW=false
-fi
-AC_SUBST(JIGSAW)
-
-###############################################################################
-#
-# Check which variant of the JDK that we want to build.
-# Currently we have:
-#    normal:   standard edition   
-#    embedded: cut down to a smaller footprint
-#
-# Effectively the JDK variant gives a name to a specific set of
-# modules to compile into the JDK. In the future, these modules
-# might even be Jigsaw modules.
-#
-AC_MSG_CHECKING([which variant of the JDK to build])
-AC_ARG_WITH([jdk-variant], [AS_HELP_STRING([--with-jdk-variant],
-	[JDK variant to build (normal, embedded) @<:@normal@:>@])])
-
-if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
-    JAVASE_EMBEDDED=""
-    MINIMIZE_RAM_USAGE=""
-    JDK_VARIANT="normal"
-elif test "x$with_jdk_variant" = xembedded; then
-    JAVASE_EMBEDDED="JAVASE_EMBEDDED:=true"
-    MINIMIZE_RAM_USAGE="MINIMIZE_RAM_USAGE:=true"
-    JDK_VARIANT="embedded"
-else
-    AC_MSG_ERROR([The available JDK variants are: normal, embedded])
-fi
-                              
-AC_SUBST(JAVASE_EMBEDDED)
-AC_SUBST(MINIMIZE_RAM_USAGE)
-AC_SUBST(JDK_VARIANT)
-
-AC_MSG_RESULT([$JDK_VARIANT])
+# This line needs to be here, verbatim, after all includes.
+# It is replaced with closed functionality when building
+# closed sources.
+AC_DEFUN_ONCE([CLOSED_HOOK])
 
 ###############################################################################
 #
-# Should we build a JDK/JVM with head support (ie a graphical ui)?
-# We always build headless support.
-#
-AC_MSG_CHECKING([headful support])
-AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful],
-	[build headful support (graphical UI support) @<:@enabled@:>@])],
-    [SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes])
-
-SUPPORT_HEADLESS=yes
-BUILD_HEADLESS="BUILD_HEADLESS:=true"
-
-if test "x$SUPPORT_HEADFUL" = xyes; then
-    # We are building both headful and headless.
-    BUILD_HEADLESS_ONLY=""
-    headful_msg="inlude support for both headful and headless"
-fi
-
-if test "x$SUPPORT_HEADFUL" = xno; then
-    # Thus we are building headless only.
-    BUILD_HEADLESS="BUILD_HEADLESS:=true"
-    BUILD_HEADLESS_ONLY="BUILD_HEADLESS_ONLY:=true"
-    headful_msg="headless only"
-fi
-
-AC_MSG_RESULT([$headful_msg])
-
-AC_SUBST(SUPPORT_HEADLESS)
-AC_SUBST(SUPPORT_HEADFUL)
-AC_SUBST(BUILD_HEADLESS)
-AC_SUBST(BUILD_HEADLESS_ONLY)
-
-###############################################################################
+# Initialization
 #
-# Check which variants of the JVM that we want to build.
-# Currently we have:
-#    server: normal interpreter and a tiered C1/C2 compiler
-#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
-#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
-#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
-#    zero: no machine code interpreter, no compiler
-#    zeroshark: zero interpreter and shark/llvm compiler backend
-AC_MSG_CHECKING([which variants of the JVM that should be built])
-AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
-	[JVM variants (separated by commas) to build (server, client, kernel, zero, zeroshark) @<:@server@:>@])])
-
-if test "x$with_jvm_variants" = x; then
-    if test "x$JDK_VARIANT" = xembedded; then
-        with_jvm_variants="kernel"
-    elif test "x$HOST_CPU_BITS" = x64; then
-        with_jvm_variants="server"
-    else
-        # Yes, on 32-bit machines, the same source (almost) is compiled twice
-        # to generate two libjvm.so files. Fun, fun.
-        with_jvm_variants="client,server"
-    fi
-fi
-
-JVM_VARIANTS=",$with_jvm_variants,"
-TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
-
-if test "x$TEST_VARIANTS" != "x,"; then
-   AC_MSG_ERROR([The available JVM variants are: server, client, kernel, zero, zeroshark])
-fi   
-AC_MSG_RESULT([$with_jvm_variants])
-
-JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
-JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'` 
-JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
-JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
-JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
-
-if test "x$JVM_VARIANT_CLIENT" = xtrue; then
-    if test "x$HOST_CPU_BITS" = x64; then
-        AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.])
-    fi
-fi
-if test "x$JVM_VARIANT_KERNEL" = xtrue; then
-    if test "x$HOST_CPU_BITS" = x64; then
-        AC_MSG_ERROR([You cannot build a kernel JVM for a 64-bit machine.])
-    fi
-fi
+###############################################################################
 
-COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
-# Replace the commas with AND for use in the build directory name.
-ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
-if test "x$COUNT_VARIANTS" != "x,1"; then
-    AC_MSG_NOTICE([NOTE! Longer build time since we are building more than one version of the libjvm! $with_jvm_variants])
-fi
-
-AC_SUBST(JVM_VARIANTS)
-AC_SUBST(JVM_VARIANT_SERVER)
-AC_SUBST(JVM_VARIANT_CLIENT)
-AC_SUBST(JVM_VARIANT_KERNEL)
-AC_SUBST(JVM_VARIANT_ZERO)
-AC_SUBST(JVM_VARIANT_ZEROSHARK)
-
-###############################################################################
-#
-# Set the debug level
-#    release: no debug information, all optimizations, no asserts.
-#    fastdebug: debug information (-g), all optimizations, all asserts
-#    slowdebug: debug information (-g), no optimizations, all asserts
-#
-DEBUG_LEVEL="release"              
-AC_MSG_CHECKING([which debug level to use])
-AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug],
-	[set the debug level to fastdebug (shorthand for --with-debug-level=fastdebug) @<:@disabled@:>@])],
-	[
-        ENABLE_DEBUG="${enableval}"
-        DEBUG_LEVEL="fastdebug"
-    ], [ENABLE_DEBUG="no"])
-
-AC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level],
-	[set the debug level (release, fastdebug, slowdebug) @<:@release@:>@])],
-	[
-        DEBUG_LEVEL="${withval}"
-        if test "x$ENABLE_DEBUG" = xyes; then
-			AC_MSG_ERROR([You cannot use both --enable-debug and --with-debug-level at the same time.])
-        fi
-    ])
-AC_MSG_RESULT([$DEBUG_LEVEL])
-
-if test "x$DEBUG_LEVEL" != xrelease && \
-   test "x$DEBUG_LEVEL" != xfastdebug && \
-   test "x$DEBUG_LEVEL" != xslowdebug; then
-   AC_MSG_ERROR([Allowed debug levels are: release, fastdebug and slowdebug])
-fi
-
-case $DEBUG_LEVEL in
-      release )
-          VARIANT="OPT"
-          FASTDEBUG="false"
-          DEBUG_CLASSFILES="false"            
-          BUILD_VARIANT_RELEASE=""             
-           ;;
-      fastdebug )
-          VARIANT="DBG"
-          FASTDEBUG="true"
-          DEBUG_CLASSFILES="true"            
-          BUILD_VARIANT_RELEASE="-fastdebug"
-           ;;
-      slowdebug )
-          VARIANT="DBG"
-          FASTDEBUG="false"
-          DEBUG_CLASSFILES="true"            
-          BUILD_VARIANT_RELEASE="-debug"             
-           ;;
-esac
-
-AC_SUBST(DEBUG_LEVEL)
-AC_SUBST(VARIANT)
-AC_SUBST(FASTDEBUG)
-AC_SUBST(DEBUG_CLASSFILES)
-AC_SUBST(BUILD_VARIANT_RELEASE)
-
-# Source the version numbers
-. $AUTOCONF_DIR/version.numbers
-if test "x$OPENJDK" = "xfalse"; then
-    . $AUTOCONF_DIR/closed.version.numbers
-fi
-# Now set the JDK version, milestone, build number etc.
-AC_SUBST(JDK_MAJOR_VERSION)
-AC_SUBST(JDK_MINOR_VERSION)
-AC_SUBST(JDK_MICRO_VERSION)
-AC_SUBST(JDK_UPDATE_VERSION)
-AC_SUBST(JDK_BUILD_NUMBER)
-AC_SUBST(MILESTONE)
-AC_SUBST(LAUNCHER_NAME)
-AC_SUBST(PRODUCT_NAME)
-AC_SUBST(PRODUCT_SUFFIX)
-AC_SUBST(JDK_RC_PLATFORM_NAME)
-AC_SUBST(COMPANY_NAME)
+# Basic initialization that must happen first of all
+BASIC_INIT
+BASIC_SETUP_PATHS
+BASIC_SETUP_LOGGING
 
-COPYRIGHT_YEAR=`date +'%Y'`
-AC_SUBST(COPYRIGHT_YEAR)
-
-RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
-AC_SUBST(RUNTIME_NAME)
-
-if test "x$JDK_UPDATE_VERSION" != x; then
-    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
-else
-    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
-fi
-AC_SUBST(JDK_VERSION)
-
-if test "x$MILESTONE" != x; then
-    RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
-else
-    RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
-fi
-AC_SUBST(RELEASE)
-
-if test "x$JDK_BUILD_NUMBER" != x; then
-    FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
-else
-    JDK_BUILD_NUMBER=b00
-    BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
-    # Avoid [:alnum:] since it depends on the locale.
-    CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
-    USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
-    FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
-fi
-AC_SUBST(FULL_VERSION)
-COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
-AC_SUBST(COOKED_BUILD_NUMBER)
-
-# Test from where we are running configure, in or outside of src root.
-if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
-    # We are running configure from the src root.
-    # Create a default ./build/host-variant-debuglevel output root.
-    CONF_NAME="${HOST_OS}-${HOST_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
-    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
-    mkdir -p "$OUTPUT_ROOT"
-    if test ! -d "$OUTPUT_ROOT"; then
-        AC_MSG_ERROR([Could not create build directory $OUTPUT_ROOT])
-    fi
-else
-    # We are running configure from outside of the src dir.
-    # Then use the current directory as output dir!
-    # If configuration is situated in normal build directory, just use the build
-    # directory name as configuration name, otherwise use the complete path.
-    CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
-    OUTPUT_ROOT="$CURDIR"
-fi
-
-SPACESAFE(OUTPUT_ROOT,[the path to the output root])
-
-# Save the arguments given to us
-echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
+# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
+HELP_SETUP_DEPENDENCY_HELP
 
-# 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.
-SETUPDEVENV="# No special vars"
-if test "x$BUILD_OS" = "xwindows"; then
-    # If vcvarsall.bat has been run, then VCINSTALLDIR is set.
-    if test "x$VCINSTALLDIR" != x; then
-        # No further setup is needed. The build will happen from this kind
-        # of shell.
-        SETUPDEVENV="# This spec file expects that you are running bash from within a VS command prompt."
-        # Make sure to remind you, if you forget to run make from a cygwin bash shell
-        # that is spawned "bash -l" from a VS command prompt.
-        CHECK_FOR_VCINSTALLDIR=yes
-        AC_MSG_CHECKING([if you are running from within a VS command prompt])
-        AC_MSG_RESULT([yes])
-    else
-        # Ah, we have not yet run vcvarsall.bat/vsvars32.bat/vsvars64.bat. Lets do that. First find it.
-        if test "x$VS100COMNTOOLS" != x; then
-            VARSBAT=`find "$VS100COMNTOOLS/../.." -name vcvarsall.bat`
-	    SEARCH_ROOT="$VS100COMNTOOLS"
-        else
-            VARSBAT=`find "$PROGRAMFILES" -name vcvarsall.bat`
-	    SEARCH_ROOT="$PROGRAMFILES"
-        fi
-        VCPATH=`dirname "$VARSBAT"`
-        VCPATH=`cygpath -w "$VCPATH"`
-	if test "x$VARSBAT" = x || test ! -d "$VCPATH"; then
-            AC_MSG_CHECKING([if we can find the VS installation])
-            AC_MSG_RESULT([no])
-            AC_MSG_ERROR([Tried to find a VS installation using both $SEARCH_ROOT but failed. Please run "c:\\cygwin\\bin\\bash.exe -l" from a VS command prompt and then run configure/make from there.])
-        fi
-        case "$LEGACY_HOST_CPU1" in
-          i?86)
-            VARSBAT_ARCH=x86
-            ;;
-          *)
-            VARSBAT_ARCH=$LEGACY_HOST_CPU1
-            ;;
-        esac
-        # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
-        cd $OUTPUT_ROOT
-        bash $SRC_ROOT/common/bin/extractvcvars.sh "$VARSBAT" "$VARSBAT_ARCH"
-	cd $CURDIR
-	if test ! -s $OUTPUT_ROOT/localdevenv.sh || test ! -s $OUTPUT_ROOT/localdevenv.gmk; then
-            AC_MSG_CHECKING([if we can extract the needed env variables])
-            AC_MSG_RESULT([no])
-            AC_MSG_ERROR([Could not succesfully extract the env variables needed for the VS setup. Please run "c:\\cygwin\\bin\\bash.exe -l" from a VS command prompt and then run configure/make from there.])
-        fi 
-        # Now set all paths and other env variables. This will allow the rest of 
-        # the configure script to find and run the compiler in the proper way.
-        . $OUTPUT_ROOT/localdevenv.sh
-        AC_MSG_CHECKING([if we can find the VS installation])
-	if test "x$VCINSTALLDIR" != x; then 
-            AC_MSG_RESULT([$VCINSTALLDIR])
-        else 
-            AC_MSG_RESULT([no])
-            AC_MSG_ERROR([Could not find VS installation. Please install. If you are sure you have installed VS, then please run "c:\\cygwin\\bin\\bash.exe -l" from a VS command prompt and then run configure/make from there.])
-        fi
-        CHECK_FOR_VCINSTALLDIR=no
-	SETUPDEVENV="include $OUTPUT_ROOT/localdevenv.gmk"
+# 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
 
-	AC_MSG_CHECKING([for msvcr100.dll])
-        AC_ARG_WITH(msvcr100dll, [AS_HELP_STRING([--with-msvcr100dll],
-            [copy this msvcr100.dll into the built JDK])])
-        if test "x$with_msvcr100dll" != x; then
-            MSVCR100DLL="$with_msvcr100dll"
-        else
-            if test "x$HOST_CPU_BITS" = x64; then
-                MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x64 | head --lines 1`
-            else
-                MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
-                if test "x$MSVCR100DLL" = x; then
-                    MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | head --lines 1`
-                fi
-            fi
-        fi
-	if test "x$MSVCR100DLL" = x; then
-           AC_MSG_RESULT([no])
-	   AC_MSG_ERROR([Could not find msvcr100.dll !])
-        fi
-        AC_MSG_RESULT([$MSVCR100DLL])
-	SPACESAFE(MSVCR100DLL,[the path to msvcr100.dll])
-    fi
-fi
-AC_SUBST(SETUPDEVENV)
-AC_SUBST(CHECK_FOR_VCINSTALLDIR)
-AC_SUBST(MSVCR100DLL)
-
-# Most of the probed defines are put into config.h
-AC_CONFIG_HEADERS([$OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in])
-# The spec.gmk file contains all variables for the make system.
-AC_CONFIG_FILES([$OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in])
-# The generated Makefile knows where the spec.gmk is and where the source is.
-# You can run make from the OUTPUT_ROOT. If you have only
-# one configured host, then you can also run make from the SRC_ROOT,
-# since it will go look for a single spec.gmk file. Or perhaps it
-# should instead make all configured hosts it can find?
-AC_CONFIG_FILES([$OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in])
-
-AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk)
-AC_SUBST(CONF_NAME, $CONF_NAME)
-AC_SUBST(OUTPUT_ROOT, $OUTPUT_ROOT)
-
-# Where are the sources. Any of these can be overridden
-# using --with-override-corba and the likes.
-LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
-CORBA_TOPDIR="$SRC_ROOT/corba"
-JAXP_TOPDIR="$SRC_ROOT/jaxp"
-JAXWS_TOPDIR="$SRC_ROOT/jaxws"
-HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
-JDK_TOPDIR="$SRC_ROOT/jdk"
-AC_SUBST(LANGTOOLS_TOPDIR)
-AC_SUBST(CORBA_TOPDIR)
-AC_SUBST(JAXP_TOPDIR)
-AC_SUBST(JAXWS_TOPDIR)
-AC_SUBST(HOTSPOT_TOPDIR)
-AC_SUBST(JDK_TOPDIR)
+# 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.
+BDEPS_CONFIGURE_BUILDDEPS
+BDEPS_SCAN_FOR_BUILDDEPS
 
 # Check if pkg-config is available.
 PKG_PROG_PKG_CONFIG
 
-AC_ARG_WITH(builddeps-conf, [AS_HELP_STRING([--with-builddeps-conf],
-    [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])])
-
-AC_ARG_WITH(builddeps-dir, [AS_HELP_STRING([--with-builddeps-dir],
-    [store downloaded build dependencies here @<:@d/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 $SRC_ROOT/configure.ac | grep BDEPS_CHECK_MODUL | grep -v configure.ac | cut -f 2 -d ',' | tr -d ' ' | sort
-    echo
-    exit 1
-fi
-
-# If builddeps server or conf file is given. Setup buildeps usage.
-BDEPS_SCAN_FOR_BUILDDEPS
-
 ###############################################################################
 #
-# Configure the development tool paths and potential sysroot.
+# Determine OpenJDK build and target platforms.
 #
-AC_LANG(C++)
-DEVKIT=
-SYS_ROOT=/
-AC_SUBST(SYS_ROOT)
-
-# The option used to specify the target .o,.a or .so file.
-# When compiling, how to specify the to be created object file.
-CC_OUT_OPTION='-o$(SPACE)'
-# When linking, how to specify the to be created executable.
-EXE_OUT_OPTION='-o$(SPACE)'
-# When linking, how to specify the to be created dynamically linkable library.
-LD_OUT_OPTION='-o$(SPACE)'
-# When archiving, how to specify the to be create static archive for object files.
-AR_OUT_OPTION='rcs$(SPACE)'
-AC_SUBST(CC_OUT_OPTION)
-AC_SUBST(EXE_OUT_OPTION)
-AC_SUBST(LD_OUT_OPTION)
-AC_SUBST(AR_OUT_OPTION)
-
-# If --build AND --host is set, then the configure script will find any
-# cross compilation tools in the PATH. Cross compilation tools
-# follows the cross compilation standard where they are prefixed with ${host}.
-# For example the binary i686-sun-solaris2.10-gcc
-# will cross compile for i686-sun-solaris2.10
-# If neither of build and host is not set, then build=host and the
-# default compiler found in the path will be used.
-# Setting only --host, does not seem to be really supported.
-# Please set both --build and --host if you want to cross compile.
-
-DEFINE_CROSS_COMPILE_ARCH=""
-HOSTCC=""
-HOSTCXX=""
-AC_SUBST(DEFINE_CROSS_COMPILE_ARCH)
-AC_SUBST(HOST_CC)
-AC_SUBST(HOST_CXX)
-AC_MSG_CHECKING([if this is a cross compile])
-if test "x$build_var" != "x$host_var"; then
-    AC_MSG_RESULT([yes, from $build_var to $host_var])   
-    # We have detected a cross compile!
-    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$LEGACY_HOST_CPU1"
-    # Now we to find a C/C++ compiler that can build executables for the build
-    # platform. We can't use the AC_PROG_CC macro, since it can only be used
-    # once.
-    AC_PATH_PROGS(HOSTCC, [cl cc gcc])
-    WHICHCMD(HOSTCC)
-    AC_PATH_PROGS(HOSTCXX, [cl CC g++])
-    WHICHCMD(HOSTCXX)
-    # Building for the build platform should be easy. Therefore
-    # we do not need any linkers or assemblers etc.    
-else
-    AC_MSG_RESULT([no])
-fi
-
-# 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)])])
-
-if test "x$with_sys_root" != x; then
-    SYS_ROOT=$with_sys_root
-fi
-                     
-# If a devkit is found on the builddeps server, then prepend its path to the
-# PATH variable. If there are cross compilers available in the devkit, these
-# will be found by AC_PROG_CC et al.
-BDEPS_CHECK_MODULE(DEVKIT, devkit, xxx,
-                    [# Found devkit
-                     PATH="$DEVKIT/bin:$PATH"
-                     SYS_ROOT="$DEVKIT/${rewritten_host}/sys-root"
-                     if test "x$x_includes" = "xNONE"; then
-                         x_includes="$SYS_ROOT/usr/include/X11"
-                     fi
-                     if test "x$x_libraries" = "xNONE"; then
-                         x_libraries="$SYS_ROOT/usr/lib"
-                     fi
-                    ],
-                    [])
-
-if test "x$SYS_ROOT" != "x/" ; then                    
-    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
-    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
-    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS" 
-    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS" 
-    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
-    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
-fi
-
-# Store the CFLAGS etal passed to the configure script.
-ORG_CFLAGS="$CFLAGS"
-ORG_CXXFLAGS="$CXXFLAGS"
-ORG_OBJCFLAGS="$OBJCFLAGS"
-
-prepare_help_system
-
-# gcc is almost always present, but on Windows we
-# prefer cl.exe and on Solaris we prefer CC.
-# Thus test for them in this order.
-AC_PROG_CC([cl cc gcc])
-if test "x$CC" = x; then
-    help_on_build_dependency devkit
-    AC_MSG_ERROR([Could not find a compiler. $HELP_MSG])
-fi
-if test "x$CC" = xcc && test "x$BUILD_OS" = xmacosx; then
-    # Do not use cc on MacOSX use gcc instead.
-    CC="gcc"
-fi
-WHICHCMD(CC)
-
-AC_PROG_CXX([cl CC g++])
-if test "x$CXX" = xCC && test "x$BUILD_OS" = xmacosx; then
-    # The found CC, even though it seems to be a g++ derivate, cannot compile
-    # c++ code. Override.
-    CXX="g++"
-fi
-WHICHCMD(CXX)
-
-if test "x$CXX" = x || test "x$CC" = x; then
-    help_on_build_dependency devkit
-    AC_MSG_ERROR([Could not find the needed compilers! $HELP_MSG ])
-fi
-
-if test "x$BUILD_OS" != xwindows; then
-    AC_PROG_OBJC
-    WHICHCMD(OBJC)
-else
-    OBJC=
-fi
-
-# Restore the flags to the user specified values.
-# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
-CFLAGS="$ORG_CFLAGS"
-CXXFLAGS="$ORG_CXXFLAGS"
-OBJCFLAGS="$ORG_OBJCFLAGS"
-
-# If we are not cross compiling, use the same compilers for
-# building the build platform executables.
-if test "x$DEFINE_CROSS_COMPILE_ARCH" = x; then
-    HOSTCC="$CC"
-    HOSTCXX="$CXX"
-fi
-
-AC_CHECK_TOOL(LD, ld)
-WHICHCMD(LD)
-LD="$CC"
-LDEXE="$CC"
-LDCXX="$CXX"
-LDEXECXX="$CXX"
-# LDEXE is the linker to use, when creating executables.
-AC_SUBST(LDEXE)
-# Linking C++ libraries.
-AC_SUBST(LDCXX)
-# Linking C++ executables.
-AC_SUBST(LDEXECXX)
-
-AC_CHECK_TOOL(AR, ar)
-WHICHCMD(AR)
-if test "x$BUILD_OS" = xmacosx; then
-    ARFLAGS="-r"
-else
-    ARFLAGS=""
-fi
-AC_SUBST(ARFLAGS)
-
-COMPILER_NAME=gcc
-COMPILER_TYPE=CC
-AS_IF([test "x$BUILD_OS" = xwindows], [
-    # For now, assume that we are always compiling using cl.exe. 
-    CC_OUT_OPTION=-Fo
-    EXE_OUT_OPTION=-out:
-    LD_OUT_OPTION=-out:
-    AR_OUT_OPTION=-out:
-    # On Windows, reject /usr/bin/link, which is a cygwin
-    # program for something completely different.
-    AC_CHECK_PROG([WINLD], [link],[link],,, [/usr/bin/link])
-    # Since we must ignore the first found link, WINLD will contain
-    # the full path to the link.exe program.
-    WHICHCMD_SPACESAFE([WINLD])
-    LD="$WINLD"
-    LDEXE="$WINLD"
-    LDCXX="$WINLD"
-    LDEXECXX="$WINLD"
-
-    AC_CHECK_PROG([MT], [mt], [mt],,, [/usr/bin/mt])
-    WHICHCMD_SPACESAFE([MT])
-    # The resource compiler
-    AC_CHECK_PROG([RC], [rc], [rc],,, [/usr/bin/rc])
-    WHICHCMD_SPACESAFE([RC])
-
-    RC_FLAGS="-nologo /l 0x409 /r"
-    AS_IF([test "x$VARIANT" = xOPT], [
-        RC_FLAGS="$RC_FLAGS -d NDEBUG"
-    ])
-    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
-    AS_IF([test "x$JDK_UPDATE_VERSION" = x], [
-        JDK_UPDATE_VERSION_NOTNULL=0
-    ])
-    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
-    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
-    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
-    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
-    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
-    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
-    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
-
-    # lib.exe is used to create static libraries.
-    AC_CHECK_PROG([WINAR], [lib],[lib],,,)
-    WHICHCMD_SPACESAFE([WINAR])
-    AR="$WINAR"
-    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
-
-    AC_CHECK_PROG([DUMPBIN], [dumpbin], [dumpbin],,,)
-    WHICHCMD_SPACESAFE([DUMPBIN])
-
-    COMPILER_TYPE=CL
-    CCXXFLAGS="$CCXXFLAGS -nologo"
-    LDFLAGS="$LDFLAGS -nologo -opt:ref -incremental:no"
-    if test "x$LEGACY_HOST_CPU1" = xi586; then 
-        LDFLAGS="$LDFLAGS -safeseh"
-    fi
-    # TODO: make -debug optional "--disable-full-debug-symbols"
-    LDFLAGS="$LDFLAGS -debug"
-])
-AC_SUBST(RC_FLAGS)
-AC_SUBST(COMPILER_TYPE)
-
-AC_PROG_CPP
-WHICHCMD(CPP)
-
-AC_PROG_CXXCPP
-WHICHCMD(CXXCPP)
-
-# Find the right assembler.
-if test "x$BUILD_OS" = xsolaris; then
-    AC_PATH_PROG(AS, as)
-    WHICHCMD(AS)
-    ASFLAGS=" "
-else
-    AS="$CC -c"
-    ASFLAGS=" "
-fi
-AC_SUBST(AS)
-AC_SUBST(ASFLAGS)
+###############################################################################
 
-if test "x$HOST_CPU_BITS" = x32 && test "x$HOST_OS" = xmacosx; then
-    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
-    # While waiting for a better solution, the current workaround is to use -mstackrealign.
-    CFLAGS="$CFLAGS -mstackrealign"
-    AC_MSG_CHECKING([if 32-bit compiler supports -mstackrealign])
-    AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],
-                   [
-		        AC_MSG_RESULT([yes])
-                   ],
-	           [
-		        AC_MSG_RESULT([no])
-	                AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.])
-	           ])
-fi
-
-if test "x$BUILD_OS" = xsolaris; then
-    AC_PATH_PROG(NM, nm)
-    WHICHCMD(NM)
-    AC_PATH_PROG(STRIP, strip)
-    WHICHCMD(STRIP)
-    AC_PATH_PROG(MCS, mcs)
-    WHICHCMD(MCS)
-else
-    AC_CHECK_TOOL(NM, nm)
-    WHICHCMD(NM)
-    AC_CHECK_TOOL(STRIP, strip)
-    WHICHCMD(STRIP)
-fi
-
-# 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$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
-fi
-
-AC_SUBST(UNCYGDRIVE)
-
-TESTFOR_PROG_CCACHE
-
-# Used on GNU/Linux systems, can be empty...
-#AC_PATH_PROG(ELFDUMP, elfdump)
-
-# Setup default logging of stdout and stderr to build.log in the output root.
-BUILD_LOG='$(OUTPUT_ROOT)/build.log'
-BUILD_LOG_WRAPPER='$(SH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
-AC_SUBST(BUILD_LOG)
-AC_SUBST(BUILD_LOG_WRAPPER)
-
-###############################################################################
-#
-# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
-# (The JVM can use 32 or 64 bit Java pointers but that decision
-# is made at runtime.)
-#
-AC_LANG_PUSH(C++)
-OLD_CXXFLAGS="$CXXFLAGS"
-if test "x$HOST_OS" = xsolaris && test "x$with_data_model" != x; then
-	CXXFLAGS="-m{$with_data_model} $CXXFLAGS"
-fi
-AC_CHECK_SIZEOF([int *], [1111])
-CXXFLAGS="$OLD_CXXFLAGS"
-AC_LANG_POP(C++)
-
-if test "x$ac_cv_sizeof_int_p" = x0; then 
-    # The test failed, lets pick the assumed value.
-    ARCH_DATA_MODEL=$HOST_CPU_BITS
-else
-    ARCH_DATA_MODEL=`expr 8 \* $ac_cv_sizeof_int_p`
-fi
-
-if test "x$ARCH_DATA_MODEL" = x64; then
-    A_LP64="LP64:="
-    ADD_LP64="-D_LP64=1"
-fi
-AC_MSG_CHECKING([for host address size])
-AC_MSG_RESULT([$ARCH_DATA_MODEL bits])
-AC_SUBST(LP64,$A_LP64)
-AC_SUBST(ARCH_DATA_MODEL)
-
-if test "x$ARCH_DATA_MODEL" != "x$HOST_CPU_BITS"; then
-    AC_MSG_ERROR([The tested number of bits in the host ($ARCH_DATA_MODEL) differs from the number of bits expected to be found in the host ($HOST_CPU_BITS)])
-fi
-
-###############################################################################
-#
-# 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@:>@])],
-    [ENABLE_PRECOMPH=${enable_precompiled-headers}], [ENABLE_PRECOMPH=yes])
-
-USE_PRECOMPILED_HEADER=1
-if test "x$ENABLE_PRECOMPH" = xno; then
-    USE_PRECOMPILED_HEADER=0
-fi
+PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET
+PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION
 
-if test "x$ENABLE_PRECOMPH" = xyes; then
-    # Check that the compiler actually supports precomp headers.
-    if test "x$GCC" = xyes; then
-         AC_MSG_CHECKING([that precompiled headers work])         
-         echo "int alfa();" > conftest.h
-         $CXX -x c++-header conftest.h -o conftest.hpp.gch
-         if test ! -f conftest.hpp.gch; then
-             echo Precompiled header is not working!
-             USE_PRECOMPILED_HEADER=0
-             AC_MSG_RESULT([no])        
-         else
-             AC_MSG_RESULT([yes])
-         fi
-         rm -f conftest.h
-    fi
-fi
-
-AC_SUBST(USE_PRECOMPILED_HEADER)
-
-###############################################################################
-#
-# How to compile shared libraries. 
-#
-
-if test "x$GCC" = xyes; then
-    COMPILER_NAME=gcc
-    PICFLAG="-fPIC"
-    LIBRARY_PREFIX=lib
-    SHARED_LIBRARY='lib$1.so'
-    STATIC_LIBRARY='lib$1.a'
-    SHARED_LIBRARY_FLAGS="-shared"
-    SHARED_LIBRARY_SUFFIX='.so'
-    STATIC_LIBRARY_SUFFIX='.a'
-    OBJ_SUFFIX='.o'
-    EXE_SUFFIX=''
-    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
-    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
-    C_FLAG_REORDER=''
-    CXX_FLAG_REORDER=''
-    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN/$1'
-    LD="$CC"
-    LDEXE="$CC"
-    LDCXX="$CXX"
-    LDEXECXX="$CXX"
-    # TODO: for embedded set --strip-unneeded
-    POST_STRIP_CMD="$STRIP -g"
-
-    # Linking is different on MacOSX
-    if test "x$BUILD_OS" = xmacosx; then
-        # Might change in the future to clang.
-        COMPILER_NAME=gcc
-        SHARED_LIBRARY='lib$1.dylib'
-        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
-        SHARED_LIBRARY_SUFFIX='.dylib'
-        EXE_SUFFIX=''
-        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1' 
-        SET_SHARED_LIBRARY_MAPFILE=''
-        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
-        POST_STRIP_CMD="$STRIP -S"
-    fi
-else
-    if test "x$BUILD_OS" = xsolaris; then
-        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
-        COMPILER_NAME=ossc
-        PICFLAG="-KPIC"
-        LIBRARY_PREFIX=lib
-        SHARED_LIBRARY='lib$1.so'
-        STATIC_LIBRARY='lib$1.a'
-        SHARED_LIBRARY_FLAGS="-G"
-        SHARED_LIBRARY_SUFFIX='.so'
-        STATIC_LIBRARY_SUFFIX='.a'
-        OBJ_SUFFIX='.o'
-        EXE_SUFFIX=''
-        SET_SHARED_LIBRARY_NAME=''
-        SET_SHARED_LIBRARY_MAPFILE='-M $1'
-	C_FLAG_REORDER='-xF'
-	CXX_FLAG_REORDER='-xF'
-        SET_SHARED_LIBRARY_ORIGIN='-R \$$$$ORIGIN/$1'
-        CFLAGS_JDKLIB_EXTRA='-xstrconst -D__solaris__'
-        POST_STRIP_CMD="$STRIP -x"
-        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
-    fi
-    if test "x$BUILD_OS" = xwindows; then
-        # If it is not gcc, then assume it is the MS Visual Studio compiler
-        COMPILER_NAME=cl
-        PICFLAG=""
-        LIBRARY_PREFIX=
-        SHARED_LIBRARY='$1.dll'
-        STATIC_LIBRARY='$1.lib'
-        SHARED_LIBRARY_FLAGS="-LD"
-        SHARED_LIBRARY_SUFFIX='.dll'
-        STATIC_LIBRARY_SUFFIX='.lib'
-        OBJ_SUFFIX='.obj'
-        EXE_SUFFIX='.exe'
-        SET_SHARED_LIBRARY_NAME=''
-        SET_SHARED_LIBRARY_MAPFILE=''
-        SET_SHARED_LIBRARY_ORIGIN=''
-    fi
-fi
-
-AC_SUBST(OBJ_SUFFIX)
-AC_SUBST(SHARED_LIBRARY)
-AC_SUBST(STATIC_LIBRARY)
-AC_SUBST(LIBRARY_PREFIX)
-AC_SUBST(SHARED_LIBRARY_SUFFIX)
-AC_SUBST(STATIC_LIBRARY_SUFFIX)
-AC_SUBST(EXE_SUFFIX)
-AC_SUBST(SHARED_LIBRARY_FLAGS)
-AC_SUBST(SET_SHARED_LIBRARY_NAME)
-AC_SUBST(SET_SHARED_LIBRARY_MAPFILE)
-AC_SUBST(C_FLAG_REORDER)
-AC_SUBST(CXX_FLAG_REORDER)
-AC_SUBST(SET_SHARED_LIBRARY_ORIGIN)
-AC_SUBST(POST_STRIP_CMD)
-AC_SUBST(POST_MCS_CMD)
-
-# The (cross) compiler is now configured, we can now test capabilities
-# of the host platform.
-
-###############################################################################
-#
-# Is the host little of big endian?
-#
-AC_C_BIGENDIAN([ENDIAN="big"],[ENDIAN="little"],[ENDIAN="unknown"],[ENDIAN="universal"])
-
-if test "x$ENDIAN" = xuniversal; then
-    AC_MSG_ERROR([It seems like someone needs to decide how we are to deal with universal binaries on the MacOSX?])
-fi
-if test "x$ENDIAN" = xunknown; then
-    ENDIAN="$HOST_CPU_ENDIAN"
-fi
-if test "x$ENDIAN" != "x$HOST_CPU_ENDIAN"; then
-    AC_MSG_WARN([The tested endian in the host ($ENDIAN) differs from the endian expected to be found in the host ($HOST_CPU_ENDIAN)])
-    ENDIAN="$HOST_CPU_ENDIAN"
-fi
-AC_SUBST(ENDIAN)
+# With knowledge of the build platform, setup more basic things.
+BASIC_SETUP_PATH_SEP
+BASIC_SETUP_SEARCHPATH
 
 ###############################################################################
 #
-# We need a Boot JDK to bootstrap the build. 
+# Determine OpenJDK variants, options and version numbers.
 #
-BOOT_JDK_FOUND=no
-AC_ARG_WITH(boot-jdk, [AS_HELP_STRING([--with-boot-jdk],
-    [path to Boot JDK (used to bootstrap build) @<:@probed@:>@])])
-                    
-if test "x$with_boot_jdk" != x; then
-    BOOT_JDK=$with_boot_jdk
-    BOOT_JDK_FOUND=yes
-fi
-if test "x$BOOT_JDK_FOUND" = xno; then
-    BDEPS_CHECK_MODULE(BOOT_JDK, boot-jdk, xxx, [BOOT_JDK_FOUND=yes], [BOOT_JDK_FOUND=no])
-fi
-
-if test "x$BOOT_JDK_FOUND" = xno; then
-    if test "x$JAVA_HOME" != x; then
-        if test ! -d "$JAVA_HOME"; then
-            AC_MSG_ERROR([Your JAVA_HOME points to a non-existing directory!])
-        fi
-        # Aha, the user has set a JAVA_HOME
-        # let us use that as the Boot JDK.
-        BOOT_JDK="$JAVA_HOME"
-        BOOT_JDK_FOUND=yes
-        # To be on the safe side, lets check that it is a JDK.
-        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
-            JAVAC="$BOOT_JDK/bin/javac"
-            JAVA="$BOOT_JDK/bin/java"
-            BOOT_JDK_FOUND=yes
-        else
-            AC_MSG_ERROR([Your JAVA_HOME points to a JRE! The build needs a JDK! Please point JAVA_HOME to a JDK. JAVA_HOME=[$]JAVA_HOME])
-        fi            
-    fi
-fi
-
-if test "x$BOOT_JDK_FOUND" = xno; then
-    AC_PATH_PROG(JAVAC_CHECK, javac)
-    AC_PATH_PROG(JAVA_CHECK, java)
-    BINARY="$JAVAC_CHECK"
-    if test "x$JAVAC_CHECK" = x; then
-        BINARY="$JAVA_CHECK"
-    fi
-    if test "x$BINARY" != x; then
-        # So there is a java(c) binary, it might be part of a JDK.
-        # 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.
-	WHICHCMD_SPACESAFE(BINARY,[path to javac])
-        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
-            JAVAC=$BOOT_JDK/bin/javac
-            JAVA=$BOOT_JDK/bin/java
-            BOOT_JDK_FOUND=yes
-        fi
-    fi
-fi
-
-if test "x$BOOT_JDK_FOUND" = xno; then
-    # Try the MacOSX way.
-    if test -x /usr/libexec/java_home; then
-        BOOT_JDK=`/usr/libexec/java_home`
-        if test -x $BOOT_JDK/bin/javac && test -x $BOOT_JDK/bin/java; then
-            JAVAC=$BOOT_JDK/bin/javac
-            JAVA=$BOOT_JDK/bin/java
-            BOOT_JDK_FOUND=yes
-        fi
-    fi
-fi
-
-if test "x$BOOT_JDK_FOUND" = xno; then
-    AC_PATH_PROG(JAVA_CHECK, java)
-    if test "x$JAVA_CHECK" != x; then
-        # There is a java in the path. But apparently we have not found a javac 
-        # in the path, since that would have been tested earlier.
-        if test "x$HOST_OS" = xwindows; then
-            # Now if this is a windows platform. The default installation of a JDK
-            # actually puts the JRE in the path and keeps the JDK out of the path!
-            # Go look in the default installation location.
-            BOOT_JDK=/cygdrive/c/Program\ Files/Java/`ls /cygdrive/c/Program\ Files/Java | grep jdk | sort -r | head --lines 1`
-            if test -d "$BOOT_JDK"; then
-                BOOT_JDK_FOUND=yes
-            fi
-        fi
-        if test "x$BOOT_JDK_FOUND" = xno; then
-            help_on_build_dependency openjdk
-            AC_MSG_ERROR([Found a JRE, not not a JDK! Please remove the JRE from your path and put a JDK there instead. $HELP_MSG])
-        fi
-    else
-        help_on_build_dependency openjdk
-        AC_MSG_ERROR([Could not find a JDK. $HELP_MSG])
-    fi
-fi
-
-WIN_FIX_PATH(BOOT_JDK)
+###############################################################################
 
-# Now see if we can find the rt.jar, or its nearest equivalent.
-BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
-SPACESAFE(BOOT_RTJAR,[the path to the Boot JDK rt.jar (or nearest equivalent)])
-
-BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
-SPACESAFE(BOOT_TOOLSJAR,[the path to the Boot JDK tools.jar (or nearest equivalent)])
-
-if test ! -f $BOOT_RTJAR; then
-    # On MacOSX it is called classes.jar
-    BOOT_RTJAR=$BOOT_JDK/../Classes/classes.jar
-    if test ! -f $BOOT_RTJAR; then
-        AC_MSG_ERROR([Cannot find the rt.jar or its equivalent!])
-    fi
-    # Remove the .. 
-    BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
-    # The tools.jar is part of classes.jar
-    BOOT_TOOLSJAR="$BOOT_RTJAR"
-fi
-
-AC_SUBST(BOOT_JDK)
-AC_SUBST(BOOT_RTJAR)
-AC_SUBST(BOOT_TOOLSJAR)
-AC_MSG_CHECKING([for Boot JDK])
-AC_MSG_RESULT([$BOOT_JDK])
-AC_MSG_CHECKING([for Boot rt.jar])
-AC_MSG_RESULT([$BOOT_RTJAR])
-AC_MSG_CHECKING([for Boot tools.jar])
-AC_MSG_RESULT([$BOOT_TOOLSJAR])
-
-# Use the java tool from the Boot JDK.
-AC_MSG_CHECKING([for java in Boot JDK])
-JAVA=$BOOT_JDK/bin/java
-if test ! -x $JAVA; then
-    AC_MSG_ERROR([Could not find a working java])
-fi
-BOOT_JDK_VERSION=`$JAVA -version 2>&1 | head -n 1`
-AC_MSG_RESULT([yes $BOOT_JDK_VERSION])
-AC_SUBST(JAVA)
-
-# Extra M4 quote needed to protect [] in grep expression.
-[FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`]
-if test "x$FOUND_VERSION_78" = x; then
-    help_on_build_dependency openjdk
-    AC_MSG_ERROR([Your boot-jdk must be version 7 or 8. $HELP_MSG])
-fi
+# 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
 
-# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
-BOOT_JDK_SOURCETARGET="-source 7 -target 7"
-AC_SUBST(BOOT_JDK_SOURCETARGET)
-
-# Use the javac tool from the Boot JDK.
-AC_MSG_CHECKING([for javac in Boot JDK])
-JAVAC=$BOOT_JDK/bin/javac
-if test ! -x $JAVAC; then
-    AC_MSG_ERROR([Could not find a working javac])
-fi
-AC_MSG_RESULT(yes)
-AC_SUBST(JAVAC)
-AC_SUBST(JAVAC_FLAGS)
-
-# Use the javah tool from the Boot JDK.
-AC_MSG_CHECKING([for javah in Boot JDK])
-JAVAH=$BOOT_JDK/bin/javah
-if test ! -x $JAVAH; then
-    AC_MSG_ERROR([Could not find a working javah])
-fi
-AC_MSG_RESULT(yes)
-AC_SUBST(JAVAH)
-
-# Use the jar tool from the Boot JDK.
-AC_MSG_CHECKING([for jar in Boot JDK])
-JAR=$BOOT_JDK/bin/jar
-if test ! -x $JAR; then
-    AC_MSG_ERROR([Could not find a working jar])
-fi
-AC_SUBST(JAR)
-AC_MSG_RESULT(yes)
-
-# Use the rmic tool from the Boot JDK.
-AC_MSG_CHECKING([for rmic in Boot JDK])
-RMIC=$BOOT_JDK/bin/rmic
-if test ! -x $RMIC; then
-    AC_MSG_ERROR([Could not find a working rmic])
-fi
-AC_SUBST(RMIC)
-AC_MSG_RESULT(yes)
-
-# Use the native2ascii tool from the Boot JDK.
-AC_MSG_CHECKING([for native2ascii in Boot JDK])
-NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
-if test ! -x $NATIVE2ASCII; then
-    AC_MSG_ERROR([Could not find a working native2ascii])
-fi
-AC_MSG_RESULT(yes)
-AC_SUBST(NATIVE2ASCII)
+# To properly create a configuration name, we need to have the OpenJDK target
+# and options (variants and debug level) parsed.
+BASIC_SETUP_OUTPUT_DIR
 
 ###############################################################################
 #
-# Pickup additional source for a component from outside of the source root
-# or override source for a component. 
+# Setup BootJDK, used to bootstrap the build.
 #
-AC_ARG_WITH(add-source-root, [AS_HELP_STRING([--with-add-source-root],
-    [for each and every source directory, look in this additional source root for
-     the same directory; if it exists and have files in it, include it in the build])])                             
-                             
-AC_ARG_WITH(override-source-root, [AS_HELP_STRING([--with-override-source-root],
-    [for each and every source directory, look in this override source root for
-     the same directory; if it exists, use that directory instead and
-     ignore the directory in the original source root])])
-
-AC_ARG_WITH(adds-and-overrides, [AS_HELP_STRING([--with-adds-and-overrides],
-    [use the subdirs 'adds' and 'overrides' in the specified directory as
-     add-source-root and override-source-root])])
-
-if test "x$with_adds_and_overrides" != x; then
-    with_add_source_root="$with_adds_and_overrides/adds"
-    with_override_source_root="$with_adds_and_overrides/overrides"
-fi
+###############################################################################
 
-if test "x$with_add_source_root" != x; then
-    if ! test -d $with_add_source_root; then
-       AC_MSG_ERROR([Trying to use a non-existant add-source-root $with_add_source_root])
-    fi
-    CURDIR="$PWD"
-    cd "$with_add_source_root"
-    ADD_SRC_ROOT="`pwd`"
-    cd "$CURDIR"
-    # Verify that the addon source root does not have any root makefiles.
-    # If it does, then it is usually an error, prevent this.
-    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
-       test -f $with_add_source_root/langtools/make/Makefile; then
-        AC_MSG_ERROR([Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources.])
-    fi
-    if test -f $with_add_source_root/corba/makefiles/Makefile || \
-       test -f $with_add_source_root/corba/make/Makefile; then
-        AC_MSG_ERROR([Your add source root seems to contain a full corba repo! An add source root should only contain additional sources.])
-    fi
-    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
-       test -f $with_add_source_root/jaxp/make/Makefile; then
-        AC_MSG_ERROR([Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources.])
-    fi
-    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
-       test -f $with_add_source_root/jaxws/make/Makefile; then
-        AC_MSG_ERROR([Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources.])
-    fi
-    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
-       test -f $with_add_source_root/hotspot/make/Makefile; then
-        AC_MSG_ERROR([Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources.])
-    fi
-    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
-       test -f $with_add_source_root/jdk/make/Makefile; then
-        AC_MSG_ERROR([Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources.])
-    fi
-fi
-AC_SUBST(ADD_SRC_ROOT)
-
-if test "x$with_override_source_root" != x; then
-    if ! test -d $with_override_source_root; then
-       AC_MSG_ERROR([Trying to use a non-existant override-source-root $with_override_source_root])
-    fi
-    CURDIR="$PWD"
-    cd "$with_override_source_root"
-    OVERRIDE_SRC_ROOT="`pwd`"
-    cd "$CURDIR"
-    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
-       test -f $with_override_source_root/langtools/make/Makefile; then
-        AC_MSG_ERROR([Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override.])
-    fi
-    if test -f $with_override_source_root/corba/makefiles/Makefile || \
-       test -f $with_override_source_root/corba/make/Makefile; then
-        AC_MSG_ERROR([Your override source root seems to contain a full corba repo! An override source root should only contain sources that override.])
-    fi
-    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
-       test -f $with_override_source_root/jaxp/make/Makefile; then
-        AC_MSG_ERROR([Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override.])
-    fi
-    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
-       test -f $with_override_source_root/jaxws/make/Makefile; then
-        AC_MSG_ERROR([Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override.])
-    fi
-    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
-       test -f $with_override_source_root/hotspot/make/Makefile; then
-        AC_MSG_ERROR([Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override.])
-    fi
-    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
-       test -f $with_override_source_root/jdk/make/Makefile; then
-        AC_MSG_ERROR([Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override.])
-    fi
-fi
-AC_SUBST(OVERRIDE_SRC_ROOT)
+BOOTJDK_SETUP_BOOT_JDK
+BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS
 
 ###############################################################################
 #
-# Override a repo completely, this is used for example when you have 3 small
-# development sandboxes of the langtools sources and want to avoid having 3 full
-# OpenJDK sources checked out on disk.
-#
-# Assuming that the 3 langtools sandboxes are located here:
-# /home/fredrik/sandbox1/langtools
-# /home/fredrik/sandbox2/langtools
-# /home/fredrik/sandbox3/langtools
-#
-# From the source root you create build subdirs manually:
-#     mkdir -p build1 build2 build3 
-# in each build directory run:
-#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
-#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
-#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
+# Configure the sources to use. We can add or override individual directories.
 #
-
-AC_ARG_WITH(override-langtools, [AS_HELP_STRING([--with-override-langtools],
-    [use this langtools dir for the build])])
-
-AC_ARG_WITH(override-corba, [AS_HELP_STRING([--with-override-corba],
-    [use this corba dir for the build])])
-
-AC_ARG_WITH(override-jaxp, [AS_HELP_STRING([--with-override-jaxp],
-	[use this jaxp dir for the build])])
-
-AC_ARG_WITH(override-jaxws, [AS_HELP_STRING([--with-override-jaxws],
-	[use this jaxws dir for the build])])
-
-AC_ARG_WITH(override-hotspot, [AS_HELP_STRING([--with-override-hotspot],
-	[use this hotspot dir for the build])])
-
-AC_ARG_WITH(override-jdk, [AS_HELP_STRING([--with-override-jdk],
-	[use this jdk dir for the build])])
-
-if test "x$with_override_langtools" != x; then
-    CURDIR="$PWD"
-    cd "$with_override_langtools"
-    LANGTOOLS_TOPDIR="`pwd`"
-    cd "$CURDIR"
-    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
-        AC_MSG_ERROR([You have to override langtools with a full langtools repo!])
-    fi
-    AC_MSG_CHECKING([if langtools should be overridden])
-    AC_MSG_RESULT([yes with $LANGTOOLS_TOPDIR])
-fi    
-if test "x$with_override_corba" != x; then
-    CURDIR="$PWD"
-    cd "$with_override_corba"
-    CORBA_TOPDIR="`pwd`"
-    cd "$CURDIR"
-    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
-        AC_MSG_ERROR([You have to override corba with a full corba repo!])
-    fi
-    AC_MSG_CHECKING([if corba should be overridden])
-    AC_MSG_RESULT([yes with $CORBA_TOPDIR])
-fi    
-if test "x$with_override_jaxp" != x; then
-    CURDIR="$PWD"
-    cd "$with_override_jaxp"
-    JAXP_TOPDIR="`pwd`"
-    cd "$CURDIR"
-    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
-        AC_MSG_ERROR([You have to override jaxp with a full jaxp repo!])
-    fi
-    AC_MSG_CHECKING([if jaxp should be overridden])
-    AC_MSG_RESULT([yes with $JAXP_TOPDIR])
-fi    
-if test "x$with_override_jaxws" != x; then
-    CURDIR="$PWD"
-    cd "$with_override_jaxws"
-    JAXWS_TOPDIR="`pwd`"
-    cd "$CURDIR"
-    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
-        AC_MSG_ERROR([You have to override jaxws with a full jaxws repo!])
-    fi
-    AC_MSG_CHECKING([if jaxws should be overridden])
-    AC_MSG_RESULT([yes with $JAXWS_TOPDIR])
-fi    
-if test "x$with_override_hotspot" != x; then
-    CURDIR="$PWD"
-    cd "$with_override_hotspot"
-    HOTSPOT_TOPDIR="`pwd`"
-    cd "$CURDIR"
-    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
-       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
-        AC_MSG_ERROR([You have to override hotspot with a full hotspot repo!])
-    fi
-    AC_MSG_CHECKING([if hotspot should be overridden])
-    AC_MSG_RESULT([yes with $HOTSPOT_TOPDIR])
-fi    
-if test "x$with_override_jdk" != x; then
-    CURDIR="$PWD"
-    cd "$with_override_jdk"
-    JDK_TOPDIR="`pwd`"
-    cd "$CURDIR"
-    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
-        AC_MSG_ERROR([You have to override JDK with a full JDK repo!])
-    fi
-    AC_MSG_CHECKING([if JDK should be overridden])
-    AC_MSG_RESULT([yes with $JDK_TOPDIR])
-fi    
-
 ###############################################################################
-#
-# Specify options for anything that is run with the Boot JDK.
-#
-AC_ARG_WITH(boot-jdk-jvmargs, [AS_HELP_STRING([--with-boot-jdk-jvmargs],
-	[specify JVM arguments to be passed to all invocations of the Boot JDK, overriding the default values,
-     e.g --with-boot-jdk-jvmargs="-Xmx8G -enableassertions"])])
-
-if test "x$with_boot_jdk_jvmargs" = x; then
-    # Not all JVM:s accept the same arguments on the command line.
-    # OpenJDK specific increase in thread stack for JDK build,
-    # well more specifically, when running javac.
-    if test "x$BUILD_NUM_BITS" = x32; then
-       STACK_SIZE=768
-    else
-       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
-       # since 64-bit pointers are pushed on the stach. Apparently, we need
-       # to increase the stack space when javacing the JDK....
-       STACK_SIZE=1536
-    fi
 
-    # Minimum amount of heap memory.
-    ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA])
-    if test "x$HOST_OS" = "xmacosx"; then
-        # Why does macosx need more heap? Its the huge JDK batch.
-        ADD_JVM_ARG_IF_OK([-Xmx1600M],boot_jdk_jvmargs,[$JAVA])
-    else
-        ADD_JVM_ARG_IF_OK([-Xmx1100M],boot_jdk_jvmargs,[$JAVA])
-    fi
-    # When is adding -client something that speeds up the JVM?
-    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
-    ADD_JVM_ARG_IF_OK([-XX:PermSize=32m],boot_jdk_jvmargs,[$JAVA])
-    ADD_JVM_ARG_IF_OK([-XX:MaxPermSize=160m],boot_jdk_jvmargs,[$JAVA])
-    ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs,[$JAVA])
-    # Disable special log output when a debug build is used as Boot JDK...
-    ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA])
-fi
-
-AC_SUBST(BOOT_JDK_JVMARGS, $boot_jdk_jvmargs)
-
-AC_ARG_WITH(server-java, [AS_HELP_STRING([--with-server-java],
-	[use this java binary for running the javac background server and other long running java tasks in the build process,
-     e.g. ---with-server-java="/opt/jrockit/bin/java -server"])])
-
-if test "x$with_server_java" != x; then
-    SERVER_JAVA="$with_server_java"
-    FOUND_VERSION=`$SERVER_JAVA -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" = x; then
-        AC_MSG_ERROR([Could not execute server java: $SERVER_JAVA])
-    fi
-else
-    SERVER_JAVA=""
-    # Hotspot specific options.
-    ADD_JVM_ARG_IF_OK([-XX:+UseParallelOldGC],SERVER_JAVA,[$JAVA])
-    ADD_JVM_ARG_IF_OK([-verbosegc],SERVER_JAVA,[$JAVA])
-    # JRockit specific options.
-    ADD_JVM_ARG_IF_OK([-Xverbose:gc],SERVER_JAVA,[$JAVA])
-    SERVER_JAVA="$JAVA $SERVER_JAVA"
-fi                    
-AC_SUBST(SERVER_JAVA)
-
-AC_MSG_CHECKING([whether to use shared server for javac])
-AC_ARG_ENABLE([javac-server], [AS_HELP_STRING([--enable-javac-server],
-	[enable the shared javac server during the build process @<:@disabled@:>@])],
-	[ENABLE_JAVAC_SERVER="${enableval}"], [ENABLE_JAVAC_SERVER='no'])
-AC_MSG_RESULT([$ENABLE_JAVAC_SERVER])
-if test "x$ENABLE_JAVAC_SERVER" = xyes; then
-    JAVAC_USE_REMOTE=true
-    JAVAC_SERVERS="$OUTPUT_ROOT/javacservers"
-else
-    JAVAC_USE_REMOTE=false
-    JAVAC_SERVERS=
-fi
-AC_SUBST(JAVAC_USE_REMOTE)
-AC_SUBST(JAVAC_SERVERS)
-
-AC_ARG_WITH(javac-server-cores, [AS_HELP_STRING([--with-javac-server-cores],
-	[use at most this number of concurrent threads on the javac server @<:@probed@:>@])])
-if test "x$with_javac_server_cores" != x; then
-    JAVAC_SERVER_CORES="$with_javac_server_cores"
-else
-    if test "$NUM_CORES" -gt 16; then
-        # We set this arbitrary limit because we want to limit the heap
-        # size of the javac server.
-        # In the future we will make the javac compilers in the server
-        # share more and more state, thus enabling us to use more and
-        # more concurrent threads in the server.
-        JAVAC_SERVER_CORES="16"
-    else
-        JAVAC_SERVER_CORES="$NUM_CORES"
-    fi
-
-    if test "$MEMORY_SIZE" -gt "17000"; then
-        MAX_HEAP_MEM=10000
-        ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA])
-        ADD_JVM_ARG_IF_OK([-Xms10G -Xmx10G],SERVER_JAVA,[$SERVER_JAVA])
-        ADD_JVM_ARG_IF_OK([-Xmn2G],SERVER_JAVA,[$SERVER_JAVA])
-    elif test "$MEMORY_SIZE" -gt "10000"; then
-        MAX_HEAP_MEM=6000
-        ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA])
-        ADD_JVM_ARG_IF_OK([-Xms6G -Xmx6G],SERVER_JAVA,[$SERVER_JAVA])
-        ADD_JVM_ARG_IF_OK([-Xmn1G],SERVER_JAVA,[$SERVER_JAVA])
-    elif test "$MEMORY_SIZE" -gt "5000"; then
-        MAX_HEAP_MEM=3000
-        ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA])
-        ADD_JVM_ARG_IF_OK([-Xms1G -Xmx3G],SERVER_JAVA,[$SERVER_JAVA])
-        ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA])
-    elif test "$MEMORY_SIZE" -gt "3800"; then
-        MAX_HEAP_MEM=2500
-        ADD_JVM_ARG_IF_OK([-Xms1G -Xmx2500M],SERVER_JAVA,[$SERVER_JAVA])
-        ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA])
-    elif test "$MEMORY_SIZE" -gt "1900"; then
-        MAX_HEAP_MEM=1200
-        ADD_JVM_ARG_IF_OK([-Xms700M -Xmx1200M],SERVER_JAVA,[$SERVER_JAVA])
-        ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA])
-    elif test "$MEMORY_SIZE" -gt "1000"; then
-        MAX_HEAP_MEM=900
-        ADD_JVM_ARG_IF_OK([-Xms400M -Xmx900M],SERVER_JAVA,[$SERVER_JAVA])
-        ADD_JVM_ARG_IF_OK([-Xmn128M],SERVER_JAVA,[$SERVER_JAVA])
-    else
-        MAX_HEAP_MEM=512
-        ADD_JVM_ARG_IF_OK([-Xms256M -Xmx512M],SERVER_JAVA,[$SERVER_JAVA])
-        ADD_JVM_ARG_IF_OK([-Xmn128M],SERVER_JAVA,[$SERVER_JAVA])
-    fi
-
-    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
-    if test "$JAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
-        AC_MSG_CHECKING([if number of server cores must be reduced])
-        JAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
-        AC_MSG_RESULT([yes, to $JAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB])
-    fi
-fi                    
-AC_SUBST(JAVAC_SERVER_CORES)
-
-AC_MSG_CHECKING([whether to track dependencies between Java packages])
-AC_ARG_ENABLE([javac-deps], [AS_HELP_STRING([--enable-javac-deps],
-	[enable the dependency tracking between Java packages @<:@disabled@:>@])],
-	[ENABLE_JAVAC_DEPS="${enableval}"], [ENABLE_JAVAC_DEPS='no'])
-AC_MSG_RESULT([$ENABLE_JAVAC_DEPS])
-if test "x$ENABLE_JAVAC_DEPS" = xyes; then
-    JAVAC_USE_DEPS=true
-else
-    JAVAC_USE_DEPS=false
-fi
-AC_SUBST(JAVAC_USE_DEPS)
-
-AC_MSG_CHECKING([whether to use multiple cores for javac compilation])
-AC_ARG_ENABLE([javac-multi-core], [AS_HELP_STRING([--enable-javac-multi-core],
-	[compile Java packages concurrently @<:@disabled@:>@])],
-	[ENABLE_JAVAC_MULTICORE="${enableval}"], [ENABLE_JAVAC_MULTICORE='no'])
-AC_MSG_RESULT([$ENABLE_JAVAC_MULTICORE])
-if test "x$ENABLE_JAVAC_MULTICORE" = xyes; then
-    JAVAC_USE_MODE=MULTI_CORE_CONCURRENT
-else
-    JAVAC_USE_MODE=SINGLE_THREADED_BATCH
-    if test "x$ENABLE_JAVAC_DEPS" = xyes; then
-        AC_MSG_WARN([Dependency tracking is not supported with single threaded batch compiles of Java source roots. Please add --disable-javac-deps to your configure options.])
-        AC_MSG_WARN([Disabling dependency tracking for you now.])
-        JAVAC_USE_DEPS=false
-    fi
-    if test "x$ENABLE_JAVAC_SERVER" = xyes; then
-        AC_MSG_WARN([The javac server will not be used since single threaded batch compiles are run within their own JVM. Please add --disable-javac-server to your configure options.])
-        AC_MSG_WARN([Disabling javac server for you now.])
-        JAVAC_USE_REMOTE=false
-    fi
-fi
-AC_SUBST(JAVAC_USE_MODE)
+SRCDIRS_SETUP_TOPDIRS
+SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS
+SRCDIRS_SETUP_OUTPUT_DIRS
 
 ###############################################################################
 #
-# OS specific settings that we never will need to probe.
-#
-if test "x$HOST_OS" = xlinux; then
-    AC_MSG_CHECKING([what is not needed on Linux?])
-    PULSE_NOT_NEEDED=yes
-    AC_MSG_RESULT([pulse])
-fi
-
-if test "x$HOST_OS" = xsolaris; then
-    AC_MSG_CHECKING([what is not needed on Solaris?])
-    ALSA_NOT_NEEDED=yes
-    PULSE_NOT_NEEDED=yes
-    AC_MSG_RESULT([alsa pulse])
-fi
-
-if test "x$HOST_OS" = xwindows; then
-    AC_MSG_CHECKING([what is not needed on Windows?])
-    CUPS_NOT_NEEDED=yes    
-    ALSA_NOT_NEEDED=yes
-    PULSE_NOT_NEEDED=yes
-    X11_NOT_NEEDED=yes
-    AC_MSG_RESULT([alsa cups pulse x11])
-fi
-
-if test "x$HOST_OS" = xmacosx; then
-    AC_MSG_CHECKING([what is not needed on MacOSX?])
-    ALSA_NOT_NEEDED=yes
-    PULSE_NOT_NEEDED=yes
-    X11_NOT_NEEDED=yes
-    FREETYPE2_NOT_NEEDED=yes    
-    # If the java runtime framework is disabled, then we need X11.
-    # This will be adjusted below.
-    AC_MSG_RESULT([alsa pulse x11])
-fi
-
-if test "x$HOST_OS" = xbsd; then
-    AC_MSG_CHECKING([what is not needed on bsd?])
-    ALSA_NOT_NEEDED=yes
-    AC_MSG_RESULT([alsa])    
-fi
-
-###############################################################################
-#
-# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
-# that uses this API. 
+# Setup the toolchain (compilers etc), i.e. the tools that need to be
+# cross-compilation aware.
 #
-AC_ARG_ENABLE([macosx-runtime-support], [AS_HELP_STRING([--disable-macosx-runtime-support],
-	[disable the use of MacOSX Java runtime support framework @<:@enabled@:>@])],
-	[MACOSX_RUNTIME_SUPPORT="${enableval}"],[MACOSX_RUNTIME_SUPPORT="no"])
+###############################################################################
 
-USE_MACOSX_RUNTIME_SUPPORT=no
-AC_MSG_CHECKING([for explicit Java runtime support in the OS])
-if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
-    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
-        MACOSX_RUNTIME_SUPPORT=yes
-        USE_MACOSX_RUNTIME_SUPPORT=yes
-        AC_MSG_RESULT([yes, does not need alsa freetype2 pulse and X11])
-    else
-        AC_MSG_RESULT([yes, but explicitly disabled.])
-    fi
-else
-    AC_MSG_RESULT([no])
-fi
+TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS
+TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
+# Locate the actual tools
+TOOLCHAIN_SETUP_PATHS
 
-if test "x$HOST_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
-    AC_MSG_CHECKING([what is not needed on an X11 build on MacOSX?])
-    X11_NOT_NEEDED=
-    FREETYPE2_NOT_NEEDED=
-    AC_MSG_RESULT([alsa pulse])
-fi
+# FIXME: Currently we must test this after paths but before flags. Fix!
 
-###############################################################################
-#
-# Check for X Windows
-#
-AC_PATH_XTRA
-
-if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then 
-    help_on_build_dependency x11
-    AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG])
-fi
+# And we can test some aspects on the target using configure macros.
+PLATFORM_TEST_OPENJDK_TARGET_BITS
+PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS
 
-# Some of the old makefiles require a setting of OPENWIN_HOME
-# Since the X11R6 directory has disappeared on later Linuxes,
-# we need to probe for it.
-if test "x$HOST_OS" = xlinux; then
-    if test -d "$SYS_ROOT/usr/X11R6"; then
-        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
-    fi
-    if test -d "$SYS_ROOT/usr/include/X11"; then
-        OPENWIN_HOME="$SYS_ROOT/usr"
-    fi
-fi
-if test "x$HOST_OS" = xsolaris; then
-    OPENWIN_HOME="/usr/openwin"
-fi
-AC_SUBST(OPENWIN_HOME)
+# Configure flags for the tools
+TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS
+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
 
 
-#
-# Weird Sol10 something check...TODO change to try compile
-#
-if test "x${HOST_OS}" = xsolaris; then
-  if test "`uname -r`" = "5.10"; then
-     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
-     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
-     fi
-  fi
-fi
-
-AC_LANG_PUSH(C)
-OLD_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $X_CFLAGS"
-AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h],
-                [X11_A_OK=yes],
-                [X11_A_OK=no])
-CFLAGS="$OLD_CFLAGS"
-AC_LANG_POP(C)
-
-if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then 
-    help_on_build_dependency x11
-    AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG])
-fi
-
-AC_SUBST(X_CFLAGS)
-AC_SUBST(X_LIBS)
-
-###############################################################################
-#
-# The common unix printing system cups is used to print from java.
-#
-AC_ARG_WITH(cups, [AS_HELP_STRING([--with-cups],
-    [specify prefix directory for the cups package
-	 (expecting the libraries under PATH/lib and the headers under PATH/include)])])
-AC_ARG_WITH(cups-include, [AS_HELP_STRING([--with-cups-include],
-	[specify directory for the cups include files])])
-AC_ARG_WITH(cups-lib, [AS_HELP_STRING([--with-cups-lib],
-	[specify directory for the cups library])])
-
-if test "x$CUPS_NOT_NEEDED" = xyes; then
-	if test "x${with_cups}" != x || test "x${with_cups_include}" != x || test "x${with_cups_lib}" != x; then
-		AC_MSG_WARN([cups not used, so --with-cups is ignored])
-	fi
-	CUPS_CFLAGS=
-	CUPS_LIBS=
-else
-	CUPS_FOUND=no
-
-	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno || test "x${with_cups_lib}" = xno; then
-	    AC_MSG_ERROR([It is not possible to disable the use of cups. Remove the --without-cups option.])
-	fi
-
-	if test "x${with_cups}" != x; then
-	    CUPS_LIBS="-L${with_cups}/lib -lcups"
-	    CUPS_CFLAGS="-I${with_cups}/include"
-	    CUPS_FOUND=yes
-	fi
-	if test "x${with_cups_include}" != x; then
-	    CUPS_CFLAGS="-I${with_cups_include}"
-	    CUPS_FOUND=yes
-	fi
-	if test "x${with_cups_lib}" != x; then
-	    CUPS_LIBS="-L${with_cups_lib} -lcups"
-	    CUPS_FOUND=yes
-	fi
-	if test "x$CUPS_FOUND" = xno; then
-	    BDEPS_CHECK_MODULE(CUPS, cups, xxx, [CUPS_FOUND=yes])
-	fi
-	if test "x$CUPS_FOUND" = xno; then
-	    # Are the cups headers installed in the default /usr/include location?
-	    AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],
-	                     [CUPS_FOUND=yes
-	                      CUPS_CFLAGS=
-	                      CUPS_LIBS="-lcups"
-	                      DEFAULT_CUPS=yes])
-	fi
-	if test "x$CUPS_FOUND" = xno; then
-	    # Getting nervous now? Lets poke around for standard Solaris third-party
-	    # package installation locations.
-	    AC_MSG_CHECKING([for cups headers and libs])
-	    if test -s /opt/sfw/cups/include/cups/cups.h; then
-	       # An SFW package seems to be installed!
-	       CUPS_FOUND=yes
-	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
-	       CUPS_LIBS="-L/opt/sfw/cups/lib -lcups"
-	    elif test -s /opt/csw/include/cups/cups.h; then
-	       # A CSW package seems to be installed!
-	       CUPS_FOUND=yes
-	       CUPS_CFLAGS="-I/opt/csw/include"
-	       CUPS_LIBS="-L/opt/csw/lib -lcups"
-	    fi
-	    AC_MSG_RESULT([$CUPS_FOUND])
-	fi
-	if test "x$CUPS_FOUND" = xno; then 
-	    help_on_build_dependency cups
-	    AC_MSG_ERROR([Could not find cups! $HELP_MSG ])
-	fi
-fi
-
-AC_SUBST(CUPS_CFLAGS)
-AC_SUBST(CUPS_LIBS)
+# Setup debug symbols (need objcopy from the toolchain for that)
+JDKOPT_SETUP_DEBUG_SYMBOLS
 
 ###############################################################################
 #
-# The ubiquitous freetype2 library is used to render fonts.
+# Check dependencies for external and internal libraries.
 #
-AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype],
-	[specify prefix directory for the freetype2 package
-     (expecting the libraries under PATH/lib and the headers under PATH/include)])])
-
-# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
-USING_SYSTEM_FT_LIB=false
-
-if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
-	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
-		AC_MSG_WARN([freetype not used, so --with-freetype is ignored])
-	fi
-	FREETYPE2_CFLAGS=
-	FREETYPE2_LIBS=
-        FREETYPE2_LIB_PATH=
-else
-	FREETYPE2_FOUND=no
-
-	if test "x$with_freetype" != x; then
-            SPACESAFE(with_freetype,[the path to freetype])
-	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
-            if test "x$HOST_OS" = xwindows; then
-                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
-            fi
-            FREETYPE2_LIB_PATH="$with_freetype/lib"
-	    FREETYPE2_CFLAGS="-I$with_freetype/include"
-            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
-                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
-            fi
-	    FREETYPE2_FOUND=yes
-   	    if test "x$FREETYPE2_FOUND" = xyes; then
-	        # Verify that the directories exist 
-                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
-		   AC_MSG_ERROR([Could not find the expected directories $with_freetype/lib and $with_freetype/include])
-		fi
-	        # List the contents of the lib.
-		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
-                if test "x$FREETYPELIB" = x; then
-		   AC_MSG_ERROR([Could not find libfreetype.se nor freetype.dll in $with_freetype/lib])
-		fi
-	        # Check one h-file
-                if ! test -s "$with_freetype/include/ft2build.h"; then
-		   AC_MSG_ERROR([Could not find $with_freetype/include/ft2build.h])
-		fi
-            fi
-        fi
-	if test "x$FREETYPE2_FOUND" = xno; then
-	    BDEPS_CHECK_MODULE(FREETYPE2, freetype2, xxx, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no])
-            USING_SYSTEM_FT_LIB=true
-	fi
-	if test "x$FREETYPE2_FOUND" = xno; then
-	    PKG_CHECK_MODULES(FREETYPE2, freetype2, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no])
-            USING_SYSTEM_FT_LIB=true
-	fi
-	if test "x$FREETYPE2_FOUND" = xno; then
-	    AC_MSG_CHECKING([for freetype in some standard locations])
-	
-	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
-	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
-	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
-	    fi
-	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
-	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
-	        DEFAULT_FREETYPE_LIBS="-lfreetype"
-	    fi
-	
-	    PREV_CXXCFLAGS="$CXXFLAGS"
-	    PREV_LDFLAGS="$LDFLAGS"
-	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
-	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
-	    AC_LINK_IFELSE([AC_LANG_SOURCE([[#include<ft2build.h>
-	                    #include FT_FREETYPE_H 
-	                   int main() { return 0; }
-	                  ]])],
-	                  [
-	                      # Yes, the default cflags and libs did the trick.
-	                      FREETYPE2_FOUND=yes
-	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
-	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
-	                  ],
-	                  [
-	                      FREETYPE2_FOUND=no
-	                  ])
-            CXXCFLAGS="$PREV_CXXFLAGS"
-	    LDFLAGS="$PREV_LDFLAGS"
-	    AC_MSG_RESULT([$FREETYPE2_FOUND])
-            USING_SYSTEM_FT_LIB=true
-	fi
-	if test "x$FREETYPE2_FOUND" = xno; then
-		help_on_build_dependency freetype2
-		AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ])
-	fi    
-fi
-
-AC_SUBST(USING_SYSTEM_FT_LIB)
-AC_SUBST(FREETYPE2_LIB_PATH)
-AC_SUBST(FREETYPE2_CFLAGS)
-AC_SUBST(FREETYPE2_LIBS)
-
 ###############################################################################
-#
-# Check for alsa headers and libraries. Used on Linux/GNU systems.
-#
-AC_ARG_WITH(alsa, [AS_HELP_STRING([--with-alsa],
-	[specify prefix directory for the alsa package
-	 (expecting the libraries under PATH/lib and the headers under PATH/include)])])
-AC_ARG_WITH(alsa-include, [AS_HELP_STRING([--with-alsa-include],
-	[specify directory for the alsa include files])])
-AC_ARG_WITH(alsa-lib, [AS_HELP_STRING([--with-alsa-lib],
-	[specify directory for the alsa library])])
-
-if test "x$ALSA_NOT_NEEDED" = xyes; then
-	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
-		AC_MSG_WARN([alsa not used, so --with-alsa is ignored])
-	fi
-	ALSA_CFLAGS=
-	ALSA_LIBS=
-else
-	ALSA_FOUND=no
-
-	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
-	    AC_MSG_ERROR([It is not possible to disable the use of alsa. Remove the --without-alsa option.])
-	fi
 
-	if test "x${with_alsa}" != x; then
-	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
-	    ALSA_CFLAGS="-I${with_alsa}/include"
-	    ALSA_FOUND=yes
-	fi
-	if test "x${with_alsa_include}" != x; then
-	    ALSA_CFLAGS="-I${with_alsa_include}"
-	    ALSA_FOUND=yes
-	fi
-	if test "x${with_alsa_lib}" != x; then
-	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
-	    ALSA_FOUND=yes
-	fi
-	if test "x$ALSA_FOUND" = xno; then
-	    BDEPS_CHECK_MODULE(ALSA, alsa, xxx, [ALSA_FOUND=yes], [ALSA_FOUND=no])
-	fi
-	if test "x$ALSA_FOUND" = xno; then
-	    PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no])
-	fi
-	if test "x$ALSA_FOUND" = xno; then
-	    AC_CHECK_HEADERS([alsa/asoundlib.h],
-	                     [ALSA_FOUND=yes
-	                      ALSA_CFLAGS=-Iignoreme
-	                      ALSA_LIBS=-lasound
-	                      DEFAULT_ALSA=yes],
-	                     [ALSA_FOUND=no])
-	fi
-	if test "x$ALSA_FOUND" = xno; then 
-	    help_on_build_dependency alsa
-	    AC_MSG_ERROR([Could not find alsa! $HELP_MSG ])
-	fi    
-fi
-
-AC_SUBST(ALSA_CFLAGS)
-AC_SUBST(ALSA_LIBS)
-
-###############################################################################
-#
-# Check for pulse audio headers and libraries.
-#
-PULSE_FOUND=no
-AC_ARG_WITH(pulse, [AS_HELP_STRING([--with-pulse],
-	[specify prefix directory for the pulseaudio package
-	 (expecting the libraries under PATH/lib and the headers under PATH/include)])])
-AC_ARG_WITH(pulse-include, [AS_HELP_STRING([--with-pulse-include],
-	[specify directory for the pulseaudio include files])])
-AC_ARG_WITH(pulse-lib, [AS_HELP_STRING([--with-pulse-lib],
-	[specify directory for the pulseaudio library])])
-
-if test "x${with_pulse}" != x; then
-    PULSE_LIBS="-L${with_pulse}/lib -lfreetype"
-    PULSE_CFLAGS="-I${with_pulse}/include"
-    PULSE_FOUND=yes
-fi
-if test "x${with_pulse_include}" != x; then
-    PULSE_CFLAGS="-I${with_pulse_include}"
-    PULSE_FOUND=yes
-fi
-if test "x${with_pulse_lib}" != x; then
-    PULSE_LIBS="-L${with_pulse_lib} -lpulse"
-    PULSE_FOUND=yes
-fi
-if test "x$PULSE_FOUND" = xno; then
-    BDEPS_CHECK_MODULE(PULSE, pulse, xxx, [PULSE_FOUND=yes], [PULSE_FOUND=no])
-fi
-if test "x$PULSE_FOUND" = xno; then
-    PKG_CHECK_MODULES(LIBPULSE,[libpulse >= 0.9.11],[PULSE_FOUND=yes],[PULSE_FOUND=no])
-fi
-if test "x$PULSE_FOUND" = xno; then
-    AC_CHECK_HEADERS([pulse/pulseaudio.h],
-                     [PULSE_FOUND=yes
-                      PULSE_CFLAGS=-Iignoreme
-                      PULSE_LIBS=
-                      DEFAULT_PULSE=yes],
-                     [PULSE_FOUND=no])
-fi
-
-if test "x$PULSE_FOUND" = xno && test "x$PULSE_NOT_NEEDED" != xyes; then 
-    help_on_build_dependency pulse
-    AC_MSG_ERROR([Could not find pulse audio libraries. $HELP_MSG ])
-fi    
-
-AC_SUBST(PULSE_CFLAGS)
-AC_SUBST(PULSE_LIBS)
-
-###############################################################################
-#
-# Check for the jpeg library
-#
-
-USE_EXTERNAL_LIBJPEG=true
-AC_CHECK_LIB(jpeg, main, [],
-             [ USE_EXTERNAL_LIBJPEG=false
-               AC_MSG_NOTICE([Will use jpeg decoder bundled with the OpenJDK source])
-             ])
-AC_SUBST(USE_EXTERNAL_LIBJPEG)
-        
-###############################################################################
-#
-# Check for the gif library
-#
-
-USE_EXTERNAL_LIBJPEG=true
-AC_CHECK_LIB(gif, main, [],
-             [ USE_EXTERNAL_LIBGIF=false
-               AC_MSG_NOTICE([Will use gif decoder bundled with the OpenJDK source])
-             ])
-AC_SUBST(USE_EXTERNAL_LIBGIF)
-
-###############################################################################
-#
-# Check for the zlib library
-#
-
-USE_EXTERNAL_LIBZ=true
-AC_CHECK_LIB(z, main, [],
-             [ USE_EXTERNAL_LIBZ=false
-               AC_MSG_NOTICE([Will use zlib bundled with the OpenJDK source])
-             ])
-AC_SUBST(USE_EXTERNAL_LIBZ)
-
-###############################################################################
-#
-# Check if altzone exists in time.h
-#
-
-AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <time.h>], [return (int)altzone;])],
-            [has_altzone=yes],
-            [has_altzone=no])
-if test "x$has_altzone" = xyes; then
-    AC_DEFINE([HAVE_ALTZONE], 1, [Define if you have the external 'altzone' variable in time.h])
-fi
-
-###############################################################################
-#
-# Check the maths library
-#
-
-AC_CHECK_LIB(m, cos, [],
-             [ 
-                  AC_MSG_NOTICE([Maths library was not found])
-             ])
-AC_SUBST(LIBM)
-
-###############################################################################
-#
-# Check for libdl.so
-
-save_LIBS="$LIBS"
-LIBS=""
-AC_CHECK_LIB(dl,dlopen)
-LIBDL="$LIBS"
-AC_SUBST(LIBDL)
-LIBS="$save_LIBS"
-
-###############################################################################
-#
-# Should we run the painfully slow javadoc tool?
-#
-AC_MSG_CHECKING([whether to build documentation])
-AC_ARG_ENABLE([docs], [AS_HELP_STRING([--enable-docs],
-	[enable generation of Javadoc documentation @<:@disabled@:>@])],
-	[ENABLE_DOCS="${enableval}"], [ENABLE_DOCS='no'])
-AC_MSG_RESULT([$ENABLE_DOCS])
-AC_SUBST(ENABLE_DOCS)
-GENERATE_DOCS=false
-if test "x$ENABLE_DOCS" = xyes; then
-    GENERATE_DOCS=true
-fi
-AC_SUBST(GENERATE_DOCS)
-
-###############################################################################
-#
-# Should we compile nimbus swing L&F? We can probably remove this option
-# since nimbus is officially part of javax now.
-#
-AC_MSG_CHECKING([whether to build nimbus L&F])
-AC_ARG_ENABLE([nimbus], [AS_HELP_STRING([--disable-nimbus],
-	[disable Nimbus L&F @<:@enabled@:>@])],
-	[ENABLE_NIMBUS="${enableval}"], [ENABLE_NIMBUS='yes'])
-AC_MSG_RESULT([$ENABLE_NIMBUS])
-DISABLE_NIMBUS=
-if test "x$ENABLE_NIMBUS" = xno; then
-    DISABLE_NIMBUS=true
-fi
-AC_SUBST(DISABLE_NIMBUS)
+LIB_SETUP_INIT
+LIB_SETUP_X11
+LIB_SETUP_CUPS
+LIB_SETUP_FREETYPE
+LIB_SETUP_ALSA
+LIB_SETUP_MISC_LIBS
+LIB_SETUP_STATIC_LINK_LIBSTDCPP
 
 ###############################################################################
 #
-# Setup the opt flags for different compilers
-# and different operating systems.
-#
-C_FLAG_DEPS="-MMD -MF"
-CXX_FLAG_DEPS="-MMD -MF"
-
-case $COMPILER_TYPE in
-  CC )
-    D_FLAG="-g"
-    case $COMPILER_NAME in
-      gcc )
-      	case $PLATFORM in
-	  macosx )
-	    # On MacOSX we optimize for size, something
-	    # we should do for all platforms?
-	    C_O_FLAG_HI="-Os"
-	    C_O_FLAG_NORM="-Os"
-	    C_O_FLAG_NONE=""
-	    ;;
-	  *)
-	    C_O_FLAG_HI="-O3"
-	    C_O_FLAG_NORM="-O2"
-	    C_O_FLAG_NONE="-O0"
-	    ;;
-	esac
-        CXX_O_FLAG_HI="$C_O_FLAG_HI"
-        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
-        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
-        ;;
-      ossc )
-        #
-        # Forte has different names for this with their C++ compiler...
-        #
-	CXX_FLAG_DEPS="-xMMD -xMF"
-
-# Extra options used with HIGHEST
-#
-# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
-#          done with care, there are some assumptions below that need to
-#          be understood about the use of pointers, and IEEE behavior.
+# We need to do some final tweaking, when everything else is done.
 #
-# Use non-standard floating point mode (not IEEE 754)
-CC_HIGHEST="$CC_HIGHEST -fns"
-# Do some simplification of floating point arithmetic (not IEEE 754)
-CC_HIGHEST="$CC_HIGHEST -fsimple"
-# Use single precision floating point with 'float'
-CC_HIGHEST="$CC_HIGHEST -fsingle"
-# Assume memory references via basic pointer types do not alias
-#   (Source with excessing pointer casting and data access with mixed 
-#    pointer types are not recommended)
-CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
-# Use intrinsic or inline versions for math/std functions
-#   (If you expect perfect errno behavior, do not use this)
-CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
-# Loop data dependency optimizations (need -xO3 or higher)
-CC_HIGHEST="$CC_HIGHEST -xdepend"
-# Pointer parameters to functions do not overlap
-#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
-#    If you pass in multiple pointers to the same data, do not use this)
-CC_HIGHEST="$CC_HIGHEST -xrestrict"
-# Inline some library routines
-#   (If you expect perfect errno behavior, do not use this)
-CC_HIGHEST="$CC_HIGHEST -xlibmil"
-# Use optimized math routines
-#   (If you expect perfect errno behavior, do not use this)
-#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
-#CC_HIGHEST="$CC_HIGHEST -xlibmopt"
-
-        case $LEGACY_HOST_CPU1 in
-          i586)
-            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xchip=pentium"
-            C_O_FLAG_HI="-xO4 -Wu,-O4~yz"
-            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz"
-            C_O_FLAG_NONE=""
-            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xchip=pentium"
-            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz"
-            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz"
-            CXX_O_FLAG_NONE=""
-            ;;
-          sparc)
-            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
-            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
-            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
-            C_O_FLAG_NONE=""
-            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
-            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
-            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
-            CXX_O_FLAG_NONE=""
-            ;;
-        esac
-    esac
-    ;;
-  CL )
-    D_FLAG=
-    C_O_FLAG_HI="-O2"
-    C_O_FLAG_NORM="-O1"
-    C_O_FLAG_NONE="-Od"
-    CXX_O_FLAG_HI="$C_O_FLAG_HI"
-    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
-    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
-    ;;
-esac
-
-if test -z "$C_O_FLAG_HIGHEST"; then
-   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
-fi
-
-if test -z "$CXX_O_FLAG_HIGHEST"; then
-   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
-fi
+###############################################################################
 
-AC_SUBST(C_O_FLAG_HIGHEST)
-AC_SUBST(C_O_FLAG_HI)
-AC_SUBST(C_O_FLAG_NORM)
-AC_SUBST(C_O_FLAG_NONE)
-AC_SUBST(CXX_O_FLAG_HIGHEST)
-AC_SUBST(CXX_O_FLAG_HI)
-AC_SUBST(CXX_O_FLAG_NORM)
-AC_SUBST(CXX_O_FLAG_NONE)
-AC_SUBST(C_FLAG_DEPS)
-AC_SUBST(CXX_FLAG_DEPS)
-
-###############################################################################
-#
-# Setup legacy vars/targets and new vars to deal with different debug levels.
-#
-case $DEBUG_LEVEL in
-      release )
-              HOTSPOT_DEBUG_LEVEL="product"
-              HOTSPOT_EXPORT="product"
-              ;;
-      fastdebug ) 
-              HOTSPOT_DEBUG_LEVEL="fastdebug"   
-              HOTSPOT_EXPORT="fastdebug"
-              CFLAGS="$CFLAGS $D_FLAG"
-              JAVAC_FLAGS="$JAVAC_FLAGS -g"
-              ;;
-      slowdebug )
-              HOTSPOT_DEBUG_LEVEL="jvmg"
-              HOTSPOT_EXPORT="debug"
-              CFLAGS="$CFLAGS $D_FLAG"
-	      C_O_FLAG_HI="$C_O_FLAG_NONE"
-	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
-	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
-	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
-              JAVAC_FLAGS="$JAVAC_FLAGS -g"
-              ;;
-esac              
-
-###############################################################################
-#
-# Generate the legacy makefile targets for hotspot.
-# The hotspot api for selecting the build artifacts, really, needs to be improved.
-#
-HOTSPOT_TARGET=""
-
-if test "x$JVM_VARIANT_SERVER" = xtrue; then
-    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
-fi
-
-if test "x$JVM_VARIANT_CLIENT" = xtrue; then
-    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
-fi
-
-if test "x$JVM_VARIANT_KERNEL" = xtrue; then
-    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
-fi
-
-if test "x$JVM_VARIANT_ZERO" = xtrue; then
-    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
-fi
-
-if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
-    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
-fi
-
-HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
-
-###############################################################################
-#
-# Setup all directories for the subrepoes and the arguments to the sub makes.
-#
-LANGTOOLS_OUTPUTDIR="$OUTPUT_ROOT/langtools"
-LANGTOOLS_DIST="$OUTPUT_ROOT/langtools/dist"
-LANGTOOLS_MAKE_ARGS=""
-AC_SUBST(LANGTOOLS_OUTPUTDIR)
-AC_SUBST(LANGTOOLS_DIST)
-AC_SUBST(LANGTOOLS_MAKE_ARGS)
-
-CORBA_OUTPUTDIR="$OUTPUT_ROOT/corba"
-CORBA_DIST="$OUTPUT_ROOT/corba/dist"
-CORBA_MAKE_ARGS=""
-AC_SUBST(CORBA_OUTPUTDIR)
-AC_SUBST(CORBA_DIST)
-AC_SUBST(CORBA_MAKE_ARGS)
-
-JAXP_OUTPUTDIR="$OUTPUT_ROOT/jaxp"
-JAXP_DIST="$OUTPUT_ROOT/jaxp/dist"
-JAXP_MAKE_ARGS=""
-AC_SUBST(JAXP_OUTPUTDIR)
-AC_SUBST(JAXP_DIST)
-AC_SUBST(JAXP_MAKE_ARGS)
-
-JAXWS_OUTPUTDIR="$OUTPUT_ROOT/jaxws"
-JAXWS_DIST="$OUTPUT_ROOT/jaxws/dist"
-JAXWS_MAKE_ARGS=""
-AC_SUBST(JAXWS_OUTPUTDIR)
-AC_SUBST(JAXWS_DIST)
-AC_SUBST(JAXWS_MAKE_ARGS)
-
-HOTSPOT_OUTPUTDIR="$OUTPUT_ROOT/hotspot"
-HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
-HOTSPOT_MAKE_ARGS="ALT_OUTPUTDIR=$HOTSPOT_OUTPUTDIR ALT_EXPORT_PATH=$HOTSPOT_DIST $HOTSPOT_TARGET"
-AC_SUBST(HOTSPOT_OUTPUTDIR)
-AC_SUBST(HOTSPOT_DIST)
-AC_SUBST(HOTSPOT_MAKE_ARGS)
-
-JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
-JDK_MAKE_ARGS="ALT_OUTPUTDIR=\"$OUTPUT_ROOT/jdk\""
-AC_SUBST(JDK_OUTPUTDIR)
-AC_SUBST(JDK_MAKE_ARGS)
-
-IMAGES_OUTPUTDIR=$OUTPUT_ROOT/images
-IMAGES_MAKE_ARGS="ALT_OUTPUTDIR=$OUTPUT_ROOT/jdk \
-                  SHARE_SRC=$JDK_TOPDIR/src/share \
-                  PLATFORM_SRC=$JDK_TOPDIR/src/$LEGACY_HOST_OS_API \
-                  TEMPDIR=$IMAGES_OUTPUTDIR/tmp \
-                  ABS_TEMPDIR=$IMAGES_OUTPUTDIR/tmp "
-AC_SUBST(IMAGES_OUTPUTDIR)
-AC_SUBST(IMAGES_MAKE_ARGS)
+JDKOPT_SETUP_BUILD_TWEAKS
 
 ###############################################################################
 #
-# Now setup the CFLAGS and LDFLAGS for the JDK build.
-# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
+# Configure parts of the build that only affect the build performance,
+# not the result.
 #
-case $COMPILER_NAME in
-      gcc )
-      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
-                          -pipe -fno-omit-frame-pointer \
-                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
-          CFLAGS_JDK="$CFLAGS_JDK -fno-strict-aliasing"
-          ;;
-      ossc )
-      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -norunpath -xnolib"
-      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX"
-          ;;
-      cl )
-          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
-               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
-	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
-	       -DWIN32 -DIAL"
-          case $LEGACY_HOST_CPU1 in
-              i?86 )
-                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
-                  ;;
-              amd64 )
-                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
-                  ;;
-          esac
-          ;;
-esac
-
-CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
+###############################################################################
 
-# The package path is used only on macosx?
-PACKAGE_PATH=/opt/local
-AC_SUBST(PACKAGE_PATH)
-
-# Sometimes we use a cpu dir (.../lib/amd64/server) 
-# Sometimes not (.../lib/server) 
-LIBARCHDIR="$LEGACY_HOST_CPU2/"
-if test "x$ENDIAN" = xlittle; then
-    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
-else
-    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
-fi
-if test "x$HOST_OS" = xlinux; then
-    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
-fi
-if test "x$HOST_OS" = xwindows; then
-    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
-fi
-if test "x$HOST_OS" = xsolaris; then
-    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
-fi
-if test "x$HOST_OS" = xmacosx; then
-    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
-    LIBARCHDIR=""
-fi
-if test "x$HOST_OS" = xbsd; then
-    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
-fi
-if test "x$DEBUG_LEVEL" = xrelease; then
-    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
-else
-    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
-fi
-
-CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$LEGACY_HOST_CPU1\"' -D$LEGACY_HOST_CPU1"
-CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
+BPERF_SETUP_BUILD_CORES
+BPERF_SETUP_BUILD_MEMORY
 
-CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
-        -I${JDK_OUTPUTDIR}/include \
-        -I${JDK_OUTPUTDIR}/include/$PLATFORM \
-        -I${JDK_TOPDIR}/src/share/javavm/export \
-        -I${JDK_TOPDIR}/src/$LEGACY_HOST_OS_API/javavm/export \
-        -I${JDK_TOPDIR}/src/share/native/common \
-        -I${JDK_TOPDIR}/src/$LEGACY_HOST_OS_API/native/common"
-
-# The shared libraries are compiled using the picflag.
-CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
-CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG"
-
-# Executable flags
-CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
-CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
+# Setup smart javac (after cores and memory have been setup)
+BPERF_SETUP_SMART_JAVAC
 
-# Now this is odd. The JDK native libraries have to link against libjvm.so
-# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
-# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
-# is identical for client and server? Yes. Which is picked at runtime (client or server)?
-# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
-# libraries will link to whatever is in memory. Yuck. 
-#
-# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
-if test "x$COMPILER_TYPE" = xCL; then
-    LDFLAGS_JDKLIB="$LDFLAGS -dll -libpath:${JDK_OUTPUTDIR}/lib -libpath:${JDK_OUTPUTDIR}/objs"
-    LDFLAGS_JDKLIB_SUFFIX=""
-    if test "$HOST_CPU_BITS" == "64"; then
-        LDFLAGS_STACK_SIZE=1048576
-    else
-        LDFLAGS_STACK_SIZE=327680
-    fi
-    LDFLAGS_JDKEXE="$LDFLAGS /STACK:$LDFLAGS_STACK_SIZE"
-else
-    # If this is a --hash-style=gnu system, use --hash-style=both, why?
-    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
-    if test -n "$HAS_GNU_HASH"; then
-        # And since we now know that the linker is gnu, then add -z defs, to forbid
-        # undefined symbols in object files.
-        LDFLAGS="$LDFLAGS -Xlinker --hash-style=both -Xlinker -z -Xlinker defs"
-        if test "x$DEBUG_LEVEL" == "xrelease"; then
-            # When building release libraries, tell the linker optimize them.
-            # Should this be supplied to the OSS linker as well?
-            LDFLAGS="$LDFLAGS -Xlinker -O1"
-        fi
-    fi
+# Can the C/C++ compiler use precompiled headers?
+BPERF_SETUP_PRECOMPILED_HEADERS
 
-    LDFLAGS_JDKLIB="$LDFLAGS $SHARED_LIBRARY_FLAGS \
-                    -L${JDK_OUTPUTDIR}/objs \
-                    -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}server \
-                    -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}client \
-  	            -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}"
-    LDFLAGS_JDKLIB_SUFFIX="-ljvm -ljava"
-    if test "x$COMPILER_NAME" = xossc; then
-        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
-    fi
-
-    # Only the jli library is explicitly linked when the launchers are built.
-    # The libjvm is then dynamically loaded/linked by the launcher.
-    if test "x$HOST_OS" != "xmacosx"; then
-       LDFLAGS_JDKEXE="$LDFLAGS -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}jli"
-       LDFLAGS_JDKEXE_SUFFIX="-ljli"
-    fi
-fi
-
-                
-AC_SUBST(CFLAGS_JDKLIB)
-AC_SUBST(CFLAGS_JDKEXE)
-
-AC_SUBST(CXXFLAGS_JDKLIB)
-AC_SUBST(CXXFLAGS_JDKEXE)
-
-AC_SUBST(LDFLAGS_JDKLIB)
-AC_SUBST(LDFLAGS_JDKEXE)
-AC_SUBST(LDFLAGS_JDKLIB_SUFFIX)
-AC_SUBST(LDFLAGS_JDKEXE_SUFFIX)
-
+# Setup use of ccache, if available
+BPERF_SETUP_CCACHE
 
 ###############################################################################
 #
-# statically link libstdc++ before C++ ABI is stablized on Linux unless 
-# dynamic build is configured on command line.
+# And now the finish...
 #
-AC_ARG_ENABLE([static-link-stdc++], [AS_HELP_STRING([--disable-static-link-stdc++],
-	[disable static linking of the C++ runtime on Linux @<:@enabled@:>@])],,
-	[
-		enable_static_link_stdc__=yes
-    ])
-
-if test "x$HOST_OS" = xlinux; then
-    # Test if -lstdc++ works.
-    AC_MSG_CHECKING([if dynamic link of stdc++ is possible])
-    AC_LANG_PUSH(C++)
-    OLD_CXXFLAGS="$CXXFLAGS"
-    CXXFLAGS="$CXXFLAGS -lstdc++"
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
-            [has_dynamic_libstdcxx=yes],
-            [has_dynamic_libstdcxx=no])
-    CXXFLAGS="$OLD_CXXFLAGS"
-    AC_LANG_POP(C++)
-    AC_MSG_RESULT([$has_dynamic_libstdcxx])
-
-    # Test if stdc++ can be linked statically.
-    AC_MSG_CHECKING([if static link of stdc++ is possible])
-    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
-    AC_LANG_PUSH(C++)
-    OLD_LIBS="$LIBS"
-    OLD_CXX="$CXX"
-    LIBS="$STATIC_STDCXX_FLAGS"
-    CXX="$CC"                       
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
-            [has_static_libstdcxx=yes],
-            [has_static_libstdcxx=no])
-    LIBS="$OLD_LIBS"
-    CXX="$OLD_CXX"
-    AC_LANG_POP(C++)
-    AC_MSG_RESULT([$has_static_libstdcxx])
-
-    if test "x$has_static_libcxx" = xno && test "x$has_dynamic_libcxx" = xno; then
-        AC_MSG_ERROR([I cannot link to stdc++! Neither dynamically nor statically.])
-    fi
-
-    if test "x$enable_static_link_stdc__" = xyes && test "x$has_static_libstdcxx" = xno; then
-        AC_MSG_NOTICE([Static linking of libstdc++ was not possible reverting to dynamic linking.])
-        enable_static_link_stdc__=no
-    fi
-
-    if test "x$enable_static_link_stdc__" = xno && test "x$has_dynamic_libstdcxx" = xno; then
-        AC_MSG_NOTICE([Dynamic linking of libstdc++ was not possible reverting to static linking.])
-        enable_static_link_stdc__=yes
-    fi
-
-    AC_MSG_CHECKING([how to link with libstdc++])
-    if test "x$enable_static_link_stdc__" = xyes; then
-        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
-        LDCXX="$CC"
-        AC_MSG_RESULT([static])
-    else
-        LIBCXX="$LIBCXX -lstdc++"
-        LDCXX="$CXX"
-        AC_MSG_RESULT([dynamic])
-    fi
-fi
-
-###############################################################################
-#
-# Could someone enlighten this configure script with a comment about libCrun?
-# The LEGACY_HOST_CPU3 is the setting for ISA_DIR.
-#
-if test "x$HOST_OS" = xsolaris && test "x$LIBCXX" = x; then
-    LIBCXX="/usr/lib${LEGACY_HOST_CPU3}/libCrun.so.1"
-fi
-
-# TODO better (platform agnostic) test
-if test "x$HOST_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
-    LIBCXX="-lstdc++"
-fi
-
-AC_SUBST(LIBCXX)
-
 ###############################################################################
 
-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 ' '`"
-AC_SUBST(OS_VERSION_MAJOR)
-AC_SUBST(OS_VERSION_MINOR)
-AC_SUBST(OS_VERSION_MICRO)
-
-###############################################################################
-#
-# Misc
-#
-
-# The name of the Service Agent jar.
-SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
-if test "x$HOST_OS" = "xwindows"; then
-    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
-fi
-AC_SUBST(SALIB_NAME)
-
-# Control wether Hotspot runs Queens test after build.
-AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build],
-	[enable running of Queens test after Hotspot build (not yet available) @<:@disabled@:>@])],,
-    [enable_hotspot_test_in_build=no])
-if test "x$enable_hotspot_test_in_build" = "xyes"; then
-    TEST_IN_BUILD=true
-else
-    TEST_IN_BUILD=false
-fi
-AC_SUBST(TEST_IN_BUILD)
+# Check for some common pitfalls
+BASIC_TEST_USABILITY_ISSUES
 
-###############################################################################
-#
-# Choose cacerts source file
-#
-AC_ARG_WITH(cacerts-file, [AS_HELP_STRING([--with-cacerts-file],
-    [specify alternative cacerts file])])
-if test "x$with_cacerts_file" != x; then
-    CACERTS_FILE=$with_cacerts_file
-else
-    if test "x$OPENJDK" = "xtrue"; then
-        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
-    else
-        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
-    fi
-fi
-AC_SUBST(CACERTS_FILE)
+# At the end, call the closed hook. (Dummy macro if no closed sources available)
+CLOSED_HOOK
 
-# Check if build directory is on local disk.
-# return 0 if it is on local disk, non-0 if on remote disk or failure
-function is_directory_on_local_disk {
-	# df -l lists only local disks; if the given directory is not found then
-	# a non-zero exit code is given
-	$DF -l $1 > /dev/null 2>&1
-}
-
-AC_MSG_CHECKING([if build directory is on local disk])
-if is_directory_on_local_disk $OUTPUT_ROOT; then
-	OUTPUT_DIR_IS_LOCAL="yes"
-else
-	OUTPUT_DIR_IS_LOCAL="no"
-fi
-AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL)
-
-# We're messing a bit with internal autoconf variables to put the config.status in the
-# output directory instead of the current directory.
-CONFIG_STATUS=$OUTPUT_ROOT/config.status
-
-# Now create the actual output files, after this, the main work of configure is done
+# We're messing a bit with internal autoconf variables to put the config.status
+# in the output directory instead of the current directory.
+CONFIG_STATUS="$OUTPUT_ROOT/config.status"
+# Create the actual output files. Now the main work of configure is done.
 AC_OUTPUT
 
 # Finally output some useful information to the user
-
-if test "x$CCACHE_FOUND" != x; then
-	if  test "x$HAS_GOOD_CCACHE" = x; then
-		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
-		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
-	else
-		CCACHE_STATUS="installed and in use"
-	fi
-else
-	if test "x$GCC" = xyes; then
-		CCACHE_STATUS="not installed (consider installing)"
-		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
-	else
-		CCACHE_STATUS="not available for your system"
-	fi
-fi
-
-printf "\n"
-printf "====================================================\n"
-printf "A new configuration has been successfully created in\n"
-printf "$OUTPUT_ROOT\n"
-if test "x$CONFIGURE_COMMAND_LINE" != x; then
-	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
-else
-	printf "using default settings.\n"
-fi
-
-printf "\n"
-printf "Configuration summary:\n"
-printf "* Debug level:  $DEBUG_LEVEL\n"
-printf "* JDK variant:  $JDK_VARIANT\n"
-printf "* JVM variants: $with_jvm_variants\n"
-printf "* Host info:    OS: $HOST_OS, CPU architecture: $HOST_CPU_ARCH, address length: $HOST_CPU_BITS\n"
-printf "* Boot JDK:     $BOOT_JDK\n"
-
-printf "\n"
-printf "Build performance summary:\n"
-printf "* Cores to use:  $NUM_CORES\n"
-printf "* Memory limit:  $MEMORY_SIZE MB\n"
-printf "* ccache status: $CCACHE_STATUS\n"
-
-if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
-	printf "\n"
-	printf "WARNING: Your build output directory is not on a local disk.\n"
-	printf "This will severely degrade build performance!\n"
-	printf "It is recommended that you create an output directory on a local disk,\n"
-	printf "and run the configure script again from that directory.\n"
-fi
-
-if test "x$CCACHE_HELP_MSG" != x; then
-	printf "\n"
-	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
-	printf "$CCACHE_HELP_MSG\n"
-
-    help_on_build_dependency ccache
-    printf "$HELP_MSG\n"
-fi
+HELP_PRINT_SUMMARY_AND_WARNINGS
--- a/common/autoconf/cores.m4	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-#
-# 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([CHECK_CORES],
-[
-    AC_MSG_CHECKING([for number of cores])
-    NUM_CORES=1
-    FOUND_CORES=no
-    
-    if test -f /proc/cpuinfo; then
-        # Looks like a Linux system
-        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
-        FOUND_CORES=yes
-    fi
-
-    if test -x /usr/sbin/psrinfo; then
-        # Looks like a Solaris system
-        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
-        FOUND_CORES=yes
-    fi
-
-    if test -x /usr/sbin/system_profiler; then
-        # Looks like a MacOSX system
-        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print [$]5}'`
-        FOUND_CORES=yes
-    fi
-
-    if test "x$build_os" = xwindows; then
-        NUM_CORES=4
-    fi
-
-    # For c/c++ code we run twice as many concurrent build
-    # jobs than we have cores, otherwise we will stall on io.
-    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
-
-    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!])
-    fi 
-
-])
-
-AC_DEFUN([CHECK_MEMORY_SIZE],
-[
-    AC_MSG_CHECKING([for memory size])
-    # Default to 1024MB
-    MEMORY_SIZE=1024
-    FOUND_MEM=no
-    
-    if test -f /proc/cpuinfo; then
-        # Looks like a Linux system
-        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print [$]2}'`
-        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
-        FOUND_MEM=yes
-    fi
-
-    if test -x /usr/sbin/prtconf; then
-        # Looks like a Solaris system
-        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print [$]3 }'`
-        FOUND_MEM=yes
-    fi
-
-    if test -x /usr/sbin/system_profiler; then
-        # Looks like a MacOSX system
-        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print [$]2}'`
-        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
-        FOUND_MEM=yes
-    fi
-
-    if test "x$build_os" = xwindows; then
-        MEMORY_SIZE=`systeminfo | grep 'Total Physical Memory:' | awk '{ print [$]4 }' | sed 's/,//'`
-        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 1024MB!])
-    fi 
-])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/generated-configure.sh	Wed Jul 05 18:16:12 2017 +0200
@@ -0,0 +1,18054 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.67 for openjdk jdk8.
+#
+# Report bugs to <build-dev@openjdk.java.net>.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  as_found=:
+  case $as_dir in #(
+	 /*)
+	   for as_base in sh bash ksh sh5; do
+	     # Try only shells that exist, to save several forks.
+	     as_shell=$as_dir/$as_base
+	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
+	   done;;
+       esac
+  as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+      if test "x$CONFIG_SHELL" != x; then :
+  # We cannot yet assume a decent shell, so we have to provide a
+	# neutralization value for shells without unset; and this also
+	# works around shells that cannot unset nonexistent variables.
+	BASH_ENV=/dev/null
+	ENV=/dev/null
+	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+	export CONFIG_SHELL
+	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+  else
+    $as_echo "$0: Please tell bug-autoconf@gnu.org and
+$0: build-dev@openjdk.java.net about your system, including
+$0: any error possibly output before this message. Then
+$0: install a modern shell, or manually run the script
+$0: under such a shell if you do have one."
+  fi
+  exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
+  fi
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+	test -d "$1/.";
+      else
+	case $1 in #(
+	-*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='openjdk'
+PACKAGE_TARNAME='openjdk'
+PACKAGE_VERSION='jdk8'
+PACKAGE_STRING='openjdk jdk8'
+PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
+PACKAGE_URL=''
+
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+CCACHE
+USE_PRECOMPILED_HEADER
+ENABLE_SJAVAC
+JAVAC_USE_MODE
+JAVAC_USE_DEPS
+JAVAC_SERVER_CORES
+JAVAC_SERVERS
+JAVAC_USE_REMOTE
+SERVER_JAVA
+MEMORY_SIZE
+CONCURRENT_BUILD_JOBS
+NUM_CORES
+SALIB_NAME
+HOTSPOT_MAKE_ARGS
+LIBCXX
+LIBDL
+LIBM
+LIBZIP_CAN_USE_MMAP
+USE_EXTERNAL_LIBZ
+USE_EXTERNAL_LIBGIF
+USE_EXTERNAL_LIBJPEG
+ALSA_LIBS
+ALSA_CFLAGS
+FREETYPE2_LIB_PATH
+USING_SYSTEM_FT_LIB
+FREETYPE2_LIBS
+FREETYPE2_CFLAGS
+CUPS_LIBS
+CUPS_CFLAGS
+OPENWIN_HOME
+X_EXTRA_LIBS
+X_LIBS
+X_PRE_LIBS
+X_CFLAGS
+XMKMF
+CXXFLAGS_DEBUG_SYMBOLS
+CFLAGS_DEBUG_SYMBOLS
+ZIP_DEBUGINFO_FILES
+ENABLE_DEBUG_SYMBOLS
+UNCYGDRIVE
+LDFLAGS_JDKEXE_SUFFIX
+LDFLAGS_JDKLIB_SUFFIX
+LDFLAGS_JDKEXE
+LDFLAGS_JDKLIB
+CXXFLAGS_JDKEXE
+CXXFLAGS_JDKLIB
+CFLAGS_JDKEXE
+CFLAGS_JDKLIB
+PACKAGE_PATH
+CXX_FLAG_DEPS
+C_FLAG_DEPS
+CXX_O_FLAG_NONE
+CXX_O_FLAG_NORM
+CXX_O_FLAG_HI
+CXX_O_FLAG_HIGHEST
+C_O_FLAG_NONE
+C_O_FLAG_NORM
+C_O_FLAG_HI
+C_O_FLAG_HIGHEST
+POST_MCS_CMD
+POST_STRIP_CMD
+SET_SHARED_LIBRARY_ORIGIN
+CXX_FLAG_REORDER
+C_FLAG_REORDER
+SET_SHARED_LIBRARY_MAPFILE
+SET_SHARED_LIBRARY_NAME
+SHARED_LIBRARY_FLAGS
+EXE_SUFFIX
+STATIC_LIBRARY_SUFFIX
+SHARED_LIBRARY_SUFFIX
+LIBRARY_PREFIX
+STATIC_LIBRARY
+SHARED_LIBRARY
+OBJ_SUFFIX
+ENDIAN
+ARCH_DATA_MODEL
+LP64
+OBJCOPY
+MCS
+STRIP
+NM
+ASFLAGS
+AS
+CXXCPP
+CPP
+COMPILER_TYPE
+RC_FLAGS
+DUMPBIN
+WINAR
+RC
+MT
+WINLD
+ARFLAGS
+AR
+LDEXECXX
+LDCXX
+LDEXE
+LD
+ac_ct_OBJC
+OBJCFLAGS
+OBJC
+ac_ct_CXX
+CXXFLAGS
+CXX
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+HOSTLD
+HOSTCXX
+HOSTCC
+DEFINE_CROSS_COMPILE_ARCH
+MSVCR100DLL
+CHECK_FOR_VCINSTALLDIR
+SETUPDEVENV
+AR_OUT_OPTION
+LD_OUT_OPTION
+EXE_OUT_OPTION
+CC_OUT_OPTION
+SYS_ROOT
+HOTSPOT_DIST
+JAXWS_DIST
+JAXP_DIST
+CORBA_DIST
+LANGTOOLS_DIST
+IMAGES_OUTPUTDIR
+JDK_OUTPUTDIR
+HOTSPOT_OUTPUTDIR
+JAXWS_OUTPUTDIR
+JAXP_OUTPUTDIR
+CORBA_OUTPUTDIR
+LANGTOOLS_OUTPUTDIR
+OVERRIDE_SRC_ROOT
+ADD_SRC_ROOT
+JDK_TOPDIR
+HOTSPOT_TOPDIR
+JAXWS_TOPDIR
+JAXP_TOPDIR
+CORBA_TOPDIR
+LANGTOOLS_TOPDIR
+BOOT_JDK_JVMARGS
+NATIVE2ASCII
+RMIC
+JAR
+JAVAH
+JAVAC_FLAGS
+JAVAC
+BOOT_JDK_SOURCETARGET
+JAVA
+BOOT_TOOLSJAR
+BOOT_RTJAR
+BOOT_JDK
+JAVA_CHECK
+JAVAC_CHECK
+OUTPUT_ROOT
+CONF_NAME
+SPEC
+COOKED_BUILD_NUMBER
+FULL_VERSION
+RELEASE
+JDK_VERSION
+RUNTIME_NAME
+COPYRIGHT_YEAR
+COMPANY_NAME
+JDK_RC_PLATFORM_NAME
+PRODUCT_SUFFIX
+PRODUCT_NAME
+LAUNCHER_NAME
+MILESTONE
+JDK_BUILD_NUMBER
+JDK_UPDATE_VERSION
+JDK_MICRO_VERSION
+JDK_MINOR_VERSION
+JDK_MAJOR_VERSION
+ENABLE_JFR
+COMPRESS_JARS
+CACERTS_FILE
+TEST_IN_BUILD
+DISABLE_NIMBUS
+GENERATE_DOCS
+ENABLE_DOCS
+BUILD_HEADLESS_ONLY
+BUILD_HEADLESS
+SUPPORT_HEADFUL
+SUPPORT_HEADLESS
+JIGSAW
+SET_OPENJDK
+BUILD_VARIANT_RELEASE
+DEBUG_CLASSFILES
+FASTDEBUG
+VARIANT
+DEBUG_LEVEL
+JVM_VARIANT_ZEROSHARK
+JVM_VARIANT_ZERO
+JVM_VARIANT_KERNEL
+JVM_VARIANT_CLIENT
+JVM_VARIANT_SERVER
+JVM_VARIANTS
+JDK_VARIANT
+MINIMIZE_RAM_USAGE
+JAVASE_EMBEDDED
+PATH_SEP
+CYGPATH
+OS_VERSION_MICRO
+OS_VERSION_MINOR
+OS_VERSION_MAJOR
+REQUIRED_OS_VERSION
+REQUIRED_OS_NAME
+LEGACY_OPENJDK_BUILD_CPU3
+LEGACY_OPENJDK_BUILD_CPU2
+LEGACY_OPENJDK_BUILD_CPU1
+OPENJDK_BUILD_CPU_ENDIAN
+OPENJDK_BUILD_CPU_BITS
+OPENJDK_BUILD_CPU_ARCH
+OPENJDK_BUILD_CPU
+LEGACY_OPENJDK_BUILD_OS_API
+OPENJDK_BUILD_OS_API
+OPENJDK_BUILD_OS_FAMILY
+OPENJDK_BUILD_OS
+LEGACY_OPENJDK_TARGET_CPU3
+LEGACY_OPENJDK_TARGET_CPU2
+LEGACY_OPENJDK_TARGET_CPU1
+OPENJDK_TARGET_CPU_ENDIAN
+OPENJDK_TARGET_CPU_BITS
+OPENJDK_TARGET_CPU_ARCH
+OPENJDK_TARGET_CPU
+LEGACY_OPENJDK_TARGET_OS_API
+OPENJDK_TARGET_OS_API
+OPENJDK_TARGET_OS_FAMILY
+OPENJDK_TARGET_OS
+OPENJDK_BUILD_SYSTEM
+OPENJDK_TARGET_SYSTEM
+target_os
+target_vendor
+target_cpu
+target
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+PKG_CONFIG
+BDEPS_FTP
+BDEPS_UNZIP
+HG
+FILE
+EXPR
+READELF
+OTOOL
+LDD
+UNZIP
+ZIP
+XARGS
+WC
+TOUCH
+TR
+TEE
+TAIL
+TAR
+SORT
+SH
+SED
+RM
+THEPWDCMD
+PRINTF
+NAWK
+MV
+MKDIR
+MAKE
+LS
+LN
+HEAD
+FIND_DELETE
+FIND
+FGREP
+EGREP
+GREP
+ECHO
+DIFF
+DF
+DATE
+CUT
+CPIO
+CP
+CHMOD
+CAT
+AWK
+PKGHANDLER
+BUILD_LOG_WRAPPER
+BUILD_LOG_PREVIOUS
+BUILD_LOG
+SRC_ROOT
+READLINK
+DATE_WHEN_CONFIGURED
+CONFIGURE_COMMAND_LINE
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+with_builddeps_conf
+with_builddeps_server
+with_builddeps_dir
+with_builddeps_group
+enable_list_builddeps
+with_target_bits
+with_jdk_variant
+with_jvm_variants
+enable_debug
+with_debug_level
+enable_openjdk_only
+enable_jigsaw
+enable_headful
+enable_docs
+enable_nimbus
+enable_hotspot_test_in_build
+with_cacerts_file
+enable_jfr
+with_conf_name
+with_boot_jdk
+with_boot_jdk_jvmargs
+with_add_source_root
+with_override_source_root
+with_adds_and_overrides
+with_override_langtools
+with_override_corba
+with_override_jaxp
+with_override_jaxws
+with_override_hotspot
+with_override_jdk
+with_msvcr100dll
+with_sys_root
+with_tools_dir
+with_devkit
+with_extra_cflags
+with_extra_cxxflags
+with_extra_ldflags
+enable_debug_symbols
+enable_zip_debug_info
+enable_macosx_runtime_support
+with_x
+with_cups
+with_cups_include
+with_cups_lib
+with_freetype
+with_alsa
+with_alsa_include
+with_alsa_lib
+with_zlib
+enable_static_link_stdc__
+with_num_cores
+with_memory_size
+with_server_java
+enable_javac_server
+with_javac_server_cores
+enable_javac_deps
+enable_javac_multi_core
+enable_sjavac
+enable_precompiled_headers
+enable_ccache
+with_ccache_dir
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+PKG_CONFIG
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CXX
+CXXFLAGS
+CCC
+OBJC
+OBJCFLAGS
+CPP
+CXXCPP
+XMKMF
+FREETYPE2_CFLAGS
+FREETYPE2_LIBS
+ALSA_CFLAGS
+ALSA_LIBS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    case $ac_envvar in #(
+      '' | [0-9]* | *[!_$as_cr_alnum]* )
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+    esac
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+  esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used" >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_myself" : 'X\(//\)[^/]' \| \
+	 X"$as_myself" : 'X\(//\)$' \| \
+	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # 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.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking ...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+
+X features:
+  --x-includes=DIR    X include files are in DIR
+  --x-libraries=DIR   X library files are in DIR
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+  --target=TARGET   configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of openjdk jdk8:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --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]
+  --enable-docs           enable generation of Javadoc documentation
+                          [disabled]
+  --disable-nimbus        disable Nimbus L&F [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])
+  --disable-zip-debug-info
+                          don't zip debug-info files ([enabled@:@)
+  --disable-macosx-runtime-support
+                          disable the use of MacOSX Java runtime support
+                          framework [enabled]
+  --disable-static-link-stdc++
+                          disable static linking of the C++ runtime on Linux
+                          [enabled]
+  --enable-javac-server   enable the shared javac server during the build
+                          process [disabled]
+  --enable-javac-deps     enable the dependency tracking between Java packages
+                          [disabled]
+  --enable-javac-multi-core
+                          compile Java packages concurrently [disabled]
+  --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]
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --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-target-bits      build 32-bit or 64-bit binaries (for platforms that
+                          support it), e.g. --with-target-bits=32 [guessed]
+  --with-jdk-variant      JDK variant to build (normal, embedded) [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-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
+                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
+                          -enableassertions"
+  --with-add-source-root  for each and every source directory, look in this
+                          additional source root for the same directory; if it
+                          exists and have files in it, include it in the build
+  --with-override-source-root
+                          for each and every source directory, look in this
+                          override source root for the same directory; if it
+                          exists, use that directory instead and ignore the
+                          directory in the original source root
+  --with-adds-and-overrides
+                          use the subdirs 'adds' and 'overrides' in the
+                          specified directory as add-source-root and
+                          override-source-root
+  --with-override-langtools
+                          use this langtools dir for the build
+  --with-override-corba   use this corba dir for the build
+  --with-override-jaxp    use this jaxp dir for the build
+  --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-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 compilers and tools
+  --with-devkit           use this directory as base for tools-dir and
+                          sys-root
+  --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)
+  --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)
+  --with-alsa             specify prefix directory for the alsa package
+                          (expecting the libraries under PATH/lib and the
+                          headers under PATH/include)
+  --with-alsa-include     specify directory for the alsa include files
+  --with-alsa-lib         specify directory for the alsa library
+  --with-zlib             use zlib from build system or OpenJDK source
+                          (system, bundled) [bundled]
+  --with-num-cores        number of cores in the build system, e.g.
+                          --with-num-cores=8 [probed]
+  --with-memory-size      memory (in MB) available in the build system, e.g.
+                          --with-memory-size=1024 [probed]
+  --with-server-java      use this java binary for running the javac
+                          background server and other long running java tasks
+                          in the build process, e.g.
+                          ---with-server-java="/opt/jrockit/bin/java -server"
+  --with-javac-server-cores
+                          use at most this number of concurrent threads on the
+                          javac server [probed]
+  --with-ccache-dir       where to store ccache files [~/.ccache]
+
+Some influential environment variables:
+  PKG_CONFIG  path to pkg-config utility
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  OBJC        Objective C compiler command
+  OBJCFLAGS   Objective C compiler flags
+  CPP         C preprocessor
+  CXXCPP      C++ preprocessor
+  XMKMF       Path to xmkmf, Makefile generator for X Window System
+  FREETYPE2_CFLAGS
+              C compiler flags for FREETYPE2, overriding pkg-config
+  FREETYPE2_LIBS
+              linker flags for FREETYPE2, overriding pkg-config
+  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
+  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <build-dev@openjdk.java.net>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+openjdk configure jdk8
+generated by GNU Autoconf 2.67
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_cxx_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_compile
+
+# ac_fn_objc_try_compile LINENO
+# -----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_objc_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_objc_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_objc_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } > conftest.i && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_cxx_try_cpp LINENO
+# ------------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } > conftest.i && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_cpp
+
+# ac_fn_cxx_try_run LINENO
+# ------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_cxx_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_run
+
+# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
+# ----------------------------------------------
+# Tries to find the compile-time value of EXPR in a program that includes
+# INCLUDES, setting VAR accordingly. Returns whether the value could be
+# computed
+ac_fn_cxx_compute_int ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if test "$cross_compiling" = yes; then
+    # Depending upon the size, compute the lo and hi bounds.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_hi=$ac_mid; break
+else
+  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+			if test $ac_lo -le $ac_mid; then
+			  ac_lo= ac_hi=
+			  break
+			fi
+			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) < 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_lo=$ac_mid; break
+else
+  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+			if test $ac_mid -le $ac_hi; then
+			  ac_lo= ac_hi=
+			  break
+			fi
+			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  ac_lo= ac_hi=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_hi=$ac_mid
+else
+  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in #((
+?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
+'') ac_retval=1 ;;
+esac
+  else
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+static long int longval () { return $2; }
+static unsigned long int ulongval () { return $2; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    return 1;
+  if (($2) < 0)
+    {
+      long int i = longval ();
+      if (i != ($2))
+	return 1;
+      fprintf (f, "%ld", i);
+    }
+  else
+    {
+      unsigned long int i = ulongval ();
+      if (i != ($2))
+	return 1;
+      fprintf (f, "%lu", i);
+    }
+  /* Do not output a trailing newline, as this causes \r\n confusion
+     on some platforms.  */
+  return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_run "$LINENO"; then :
+  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
+else
+  ac_retval=1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest.val
+
+  fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_compute_int
+
+# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
+# ---------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_cxx_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_cxx_check_header_compile
+
+# ac_fn_cxx_try_link LINENO
+# -------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_link
+
+# ac_fn_cxx_check_func LINENO FUNC VAR
+# ------------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_cxx_check_func ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_cxx_check_func
+
+# ac_fn_c_check_header_mongrel 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 ()
+{
+  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
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=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_cxx_check_header_mongrel 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_cxx_check_header_mongrel ()
+{
+  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
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=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_cxx_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_cxx_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_cxx_check_header_mongrel
+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
+generated by GNU Autoconf 2.67.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    $as_echo "PATH: $as_dir"
+  done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+    2)
+      as_fn_append ac_configure_args1 " '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      as_fn_append ac_configure_args " '$ac_arg'"
+      ;;
+    esac
+  done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+	"s/'\''/'\''\\\\'\'''\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	$as_echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+  test "x$ac_site_file" = xNONE && continue
+  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5 ; }
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special files
+  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
+  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	# differences in whitespace do not lead to failure.
+	ac_old_val_w=`echo x $ac_old_val`
+	ac_new_val_w=`echo x $ac_new_val`
+	if test "$ac_old_val_w" != "$ac_new_val_w"; then
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	  ac_cache_corrupted=:
+	else
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+	  eval $ac_var=\$ac_old_val
+	fi
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+# Do not change or remove the following line, it is needed for consistency checks:
+# DATE_WHEN_GENERATED: 1341161875
+
+ac_aux_dir=
+for ac_dir in build-aux "$srcdir"/build-aux; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+#
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program 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 for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists.  Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+
+
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+# PKG_CHECK_MODULES
+
+
+# Include these first...
+#
+# 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.
+#
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#%%% Simple tools %%%
+
+
+
+
+
+
+
+
+
+
+
+
+# Check if build directory is on local disk.
+# 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)
+
+
+
+
+#
+# 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.
+#
+
+
+
+
+
+
+
+
+
+
+
+# ... then the rest
+#
+# 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.
+#
+
+# Fixes paths on windows to be mixed mode short.
+
+
+
+
+###############################################################################
+#
+# We need a Boot JDK to bootstrap the build.
+#
+
+
+
+
+
+#
+# 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.
+#
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# 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.
+#
+
+
+
+
+
+apt_help() {
+    case $1 in
+    devkit)
+        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
+    openjdk)
+        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
+    alsa)
+        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
+    cups)
+        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
+    freetype2)
+        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
+    pulse)
+        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
+    x11)
+        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
+    ccache)
+        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
+    * )
+       break ;;
+    esac
+}
+
+yum_help() {
+    case $1 in
+    devkit)
+        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
+    openjdk)
+        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
+    alsa)
+        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
+    cups)
+        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
+    freetype2)
+        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
+    pulse)
+        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
+    x11)
+        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
+    ccache)
+        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
+    * )
+       break ;;
+    esac
+}
+
+port_help() {
+    PKGHANDLER_COMMAND=""
+}
+
+pkgutil_help() {
+    PKGHANDLER_COMMAND=""
+}
+
+pkgadd_help() {
+    PKGHANDLER_COMMAND=""
+}
+
+
+
+#
+# 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.
+#
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# 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.
+#
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# 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.
+#
+
+
+
+
+
+
+
+
+
+
+
+
+
+#%%% Build and target systems %%%
+
+
+
+
+
+
+
+
+
+
+#
+# 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.
+#
+
+
+
+
+
+
+
+
+#
+# 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.
+#
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# This line needs to be here, verbatim, after all includes.
+# It is replaced with closed functionality when building
+# closed sources.
+
+
+###############################################################################
+#
+# Initialization
+#
+###############################################################################
+
+# Basic initialization that must happen first of all
+
+# Save the original command line. This is passed to us by the wrapper configure script.
+
+DATE_WHEN_CONFIGURED=`LANG=C date`
+
+
+# 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
+            SRC_ROOT=`$CYGPATH -s -m -a "$SRC_ROOT"`
+            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
+            CURDIR=`$CYGPATH -s -m -a "$CURDIR"`
+            CURDIR=`$CYGPATH -u "$CURDIR"`
+        else
+            as_fn_error $? "You cannot have spaces in the path to the current directory! \"$CURDIR\"" "$LINENO" 5
+        fi
+    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}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_GREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+
+# 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.
+for ac_prog in gawk mawk nawk awk
+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_AWK+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # 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_AWK="$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
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+    # Test that variable AWK is not empty.
+    if test "" = "$AWK"; then as_fn_error $? "Could not find awk !" "$LINENO" 5 ; fi
+
+# Extract the first word of "cat", so it can be a program name with args.
+set dummy cat; 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_CAT+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $CAT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CAT="$CAT" # 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_CAT="$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
+CAT=$ac_cv_path_CAT
+if test -n "$CAT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
+$as_echo "$CAT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Test that variable CAT is not empty.
+    if test "" = "$CAT"; then as_fn_error $? "Could not find cat !" "$LINENO" 5 ; fi
+
+# Extract the first word of "chmod", so it can be a program name with args.
+set dummy chmod; 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_CHMOD+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $CHMOD in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CHMOD="$CHMOD" # 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_CHMOD="$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
+CHMOD=$ac_cv_path_CHMOD
+if test -n "$CHMOD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
+$as_echo "$CHMOD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Test that variable CHMOD is not empty.
+    if test "" = "$CHMOD"; then as_fn_error $? "Could not find chmod !" "$LINENO" 5 ; fi
+
+# Extract the first word of "cp", so it can be a program name with args.
+set dummy cp; 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_CP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $CP in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CP="$CP" # 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_CP="$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
+CP=$ac_cv_path_CP
+if test -n "$CP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
+$as_echo "$CP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Test that variable CP is not empty.
+    if test "" = "$CP"; then as_fn_error $? "Could not find cp !" "$LINENO" 5 ; fi
+
+# Extract the first word of "cpio", so it can be a program name with args.
+set dummy cpio; 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 that variable CPIO is not empty.
+    if test "" = "$CPIO"; then as_fn_error $? "Could not find cpio !" "$LINENO" 5 ; fi
+
+# Extract the first word of "cut", so it can be a program name with args.
+set dummy cut; 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_CUT+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $CUT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CUT="$CUT" # 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_CUT="$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
+CUT=$ac_cv_path_CUT
+if test -n "$CUT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
+$as_echo "$CUT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Test that variable CUT is not empty.
+    if test "" = "$CUT"; then as_fn_error $? "Could not find cut !" "$LINENO" 5 ; fi
+
+# Extract the first word of "date", so it can be a program name with args.
+set dummy date; 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_DATE+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $DATE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_DATE="$DATE" # 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_DATE="$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
+DATE=$ac_cv_path_DATE
+if test -n "$DATE"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
+$as_echo "$DATE" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Test that variable DATE is not empty.
+    if test "" = "$DATE"; then as_fn_error $? "Could not find date !" "$LINENO" 5 ; 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
+
+
+
+    # Test that variable DF is not empty.
+    if test "" = "$DF"; then as_fn_error $? "Could not find df !" "$LINENO" 5 ; fi
+
+# Extract the first word of "diff", so it can be a program name with args.
+set dummy diff; 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_DIFF+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $DIFF in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_DIFF="$DIFF" # 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_DIFF="$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
+DIFF=$ac_cv_path_DIFF
+if test -n "$DIFF"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
+$as_echo "$DIFF" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Test that variable DIFF is not empty.
+    if test "" = "$DIFF"; then as_fn_error $? "Could not find diff !" "$LINENO" 5 ; fi
+
+# Warning echo is really, really unportable!!!!! Different
+# behaviour in bash and dash and in a lot of other shells!
+# Use printf for serious work!
+# Extract the first word of "echo", so it can be a program name with args.
+set dummy echo; 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_ECHO+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ECHO in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ECHO="$ECHO" # 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_ECHO="$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
+ECHO=$ac_cv_path_ECHO
+if test -n "$ECHO"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
+$as_echo "$ECHO" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Test that variable ECHO is not empty.
+    if test "" = "$ECHO"; then as_fn_error $? "Could not find echo !" "$LINENO" 5 ; fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_EGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+   fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+
+    # Test that variable EGREP is not empty.
+    if test "" = "$EGREP"; then as_fn_error $? "Could not find egrep !" "$LINENO" 5 ; fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if test "${ac_cv_path_FGREP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+   then ac_cv_path_FGREP="$GREP -F"
+   else
+     if test -z "$FGREP"; then
+  ac_path_FGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in fgrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+  # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'FGREP' >> "conftest.nl"
+    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_FGREP="$ac_path_FGREP"
+      ac_path_FGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_FGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_FGREP"; then
+    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_FGREP=$FGREP
+fi
+
+   fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+$as_echo "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+
+    # Test that variable FGREP is not empty.
+    if test "" = "$FGREP"; then as_fn_error $? "Could not find fgrep !" "$LINENO" 5 ; fi
+
+
+# Extract the first word of "find", so it can be a program name with args.
+set dummy find; 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_FIND+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $FIND in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_FIND="$FIND" # 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_FIND="$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
+FIND=$ac_cv_path_FIND
+if test -n "$FIND"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
+$as_echo "$FIND" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Test that variable FIND is not empty.
+    if test "" = "$FIND"; then as_fn_error $? "Could not find find !" "$LINENO" 5 ; fi
+
+
+    # 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
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_GREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+
+    # Test that variable GREP is not empty.
+    if test "" = "$GREP"; then as_fn_error $? "Could not find grep !" "$LINENO" 5 ; fi
+
+# Extract the first word of "head", so it can be a program name with args.
+set dummy head; 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_HEAD+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $HEAD in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_HEAD="$HEAD" # 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_HEAD="$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
+HEAD=$ac_cv_path_HEAD
+if test -n "$HEAD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
+$as_echo "$HEAD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Test that variable HEAD is not empty.
+    if test "" = "$HEAD"; then as_fn_error $? "Could not find head !" "$LINENO" 5 ; fi
+
+# Extract the first word of "ln", so it can be a program name with args.
+set dummy ln; 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_LN+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $LN in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_LN="$LN" # 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_LN="$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
+LN=$ac_cv_path_LN
+if test -n "$LN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
+$as_echo "$LN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Test that variable LN is not empty.
+    if test "" = "$LN"; then as_fn_error $? "Could not find ln !" "$LINENO" 5 ; fi
+
+# Extract the first word of "ls", so it can be a program name with args.
+set dummy ls; 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_LS+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $LS in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_LS="$LS" # 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_LS="$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
+LS=$ac_cv_path_LS
+if test -n "$LS"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
+$as_echo "$LS" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Test that variable LS is not empty.
+    if test "" = "$LS"; then as_fn_error $? "Could not find ls !" "$LINENO" 5 ; fi
+
+for ac_prog in gmake 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_MAKE+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $MAKE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MAKE="$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_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
+MAKE=$ac_cv_path_MAKE
+if test -n "$MAKE"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
+$as_echo "$MAKE" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$MAKE" && break
+done
+
+
+    # Test that variable MAKE is not empty.
+    if test "" = "$MAKE"; then as_fn_error $? "Could not find make !" "$LINENO" 5 ; fi
+
+MAKE_VERSION=`$MAKE --version | head -n 1 | grep '3.8[12346789]'`
+if test "x$MAKE_VERSION" = x; then
+    as_fn_error $? "You must use 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
+# Extract the first word of "mkdir", so it can be a program name with args.
+set dummy mkdir; 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_MKDIR+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $MKDIR in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MKDIR="$MKDIR" # 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_MKDIR="$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
+MKDIR=$ac_cv_path_MKDIR
+if test -n "$MKDIR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
+$as_echo "$MKDIR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Test that variable MKDIR is not empty.
+    if test "" = "$MKDIR"; then as_fn_error $? "Could not find mkdir !" "$LINENO" 5 ; fi
+
+# Extract the first word of "mv", so it can be a program name with args.
+set dummy mv; 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_MV+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $MV in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MV="$MV" # 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_MV="$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
+MV=$ac_cv_path_MV
+if test -n "$MV"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
+$as_echo "$MV" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Test that variable MV is not empty.
+    if test "" = "$MV"; then as_fn_error $? "Could not find mv !" "$LINENO" 5 ; fi
+
+for ac_prog in nawk gawk awk
+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_NAWK+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $NAWK in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_NAWK="$NAWK" # 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_NAWK="$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
+NAWK=$ac_cv_path_NAWK
+if test -n "$NAWK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
+$as_echo "$NAWK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$NAWK" && break
+done
+
+
+    # Test that variable NAWK is not empty.
+    if test "" = "$NAWK"; then as_fn_error $? "Could not find nawk !" "$LINENO" 5 ; fi
+
+# Extract the first word of "printf", so it can be a program name with args.
+set dummy printf; 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_PRINTF+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PRINTF in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PRINTF="$PRINTF" # 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_PRINTF="$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
+PRINTF=$ac_cv_path_PRINTF
+if test -n "$PRINTF"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
+$as_echo "$PRINTF" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Test that variable PRINTF is not empty.
+    if test "" = "$PRINTF"; then as_fn_error $? "Could not find printf !" "$LINENO" 5 ; fi
+
+# 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 "rm", so it can be a program name with args.
+set dummy rm; 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 that variable RM is not empty.
+    if test "" = "$RM"; then as_fn_error $? "Could not find rm !" "$LINENO" 5 ; fi
+
+RM="$RM -f"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if test "${ac_cv_path_SED+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+     for ac_i in 1 2 3 4 5 6 7; do
+       ac_script="$ac_script$as_nl$ac_script"
+     done
+     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+     { ac_script=; unset ac_script;}
+     if test -z "$SED"; then
+  ac_path_SED_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  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_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+  # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo '' >> "conftest.nl"
+    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_SED_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_SED="$ac_path_SED"
+      ac_path_SED_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_SED_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_SED"; then
+    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+  fi
+else
+  ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+  rm -f conftest.sed
+
+
+    # Test that variable SED is not empty.
+    if test "" = "$SED"; then as_fn_error $? "Could not find sed !" "$LINENO" 5 ; fi
+
+# Extract the first word of "sh", so it can be a program name with args.
+set dummy sh; 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_SH+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $SH in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_SH="$SH" # 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_SH="$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
+SH=$ac_cv_path_SH
+if test -n "$SH"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
+$as_echo "$SH" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Test that variable SH is not empty.
+    if test "" = "$SH"; then as_fn_error $? "Could not find sh !" "$LINENO" 5 ; fi
+
+# Extract the first word of "sort", so it can be a program name with args.
+set dummy sort; 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_SORT+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $SORT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_SORT="$SORT" # 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_SORT="$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
+SORT=$ac_cv_path_SORT
+if test -n "$SORT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
+$as_echo "$SORT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Test that variable SORT is not empty.
+    if test "" = "$SORT"; then as_fn_error $? "Could not find sort !" "$LINENO" 5 ; fi
+
+# Extract the first word of "tar", so it can be a program name with args.
+set dummy tar; 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_TAR+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $TAR in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_TAR="$TAR" # 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_TAR="$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
+TAR=$ac_cv_path_TAR
+if test -n "$TAR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
+$as_echo "$TAR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Test that variable TAR is not empty.
+    if test "" = "$TAR"; then as_fn_error $? "Could not find tar !" "$LINENO" 5 ; fi
+
+# Extract the first word of "tail", so it can be a program name with args.
+set dummy tail; 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_TAIL+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $TAIL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_TAIL="$TAIL" # 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_TAIL="$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
+TAIL=$ac_cv_path_TAIL
+if test -n "$TAIL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
+$as_echo "$TAIL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Test that variable TAIL is not empty.
+    if test "" = "$TAIL"; then as_fn_error $? "Could not find tail !" "$LINENO" 5 ; fi
+
+# Extract the first word of "tee", so it can be a program name with args.
+set dummy tee; 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_TEE+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $TEE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_TEE="$TEE" # 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_TEE="$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
+TEE=$ac_cv_path_TEE
+if test -n "$TEE"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
+$as_echo "$TEE" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Test that variable TEE is not empty.
+    if test "" = "$TEE"; then as_fn_error $? "Could not find tee !" "$LINENO" 5 ; fi
+
+# Extract the first word of "tr", so it can be a program name with args.
+set dummy tr; 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_TR+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $TR in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_TR="$TR" # 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_TR="$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
+TR=$ac_cv_path_TR
+if test -n "$TR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
+$as_echo "$TR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Test that variable TR is not empty.
+    if test "" = "$TR"; then as_fn_error $? "Could not find tr !" "$LINENO" 5 ; fi
+
+# Extract the first word of "touch", so it can be a program name with args.
+set dummy touch; 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_TOUCH+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $TOUCH in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_TOUCH="$TOUCH" # 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_TOUCH="$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
+TOUCH=$ac_cv_path_TOUCH
+if test -n "$TOUCH"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
+$as_echo "$TOUCH" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Test that variable TOUCH is not empty.
+    if test "" = "$TOUCH"; then as_fn_error $? "Could not find touch !" "$LINENO" 5 ; fi
+
+# Extract the first word of "wc", so it can be a program name with args.
+set dummy wc; 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_WC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $WC in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_WC="$WC" # 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_WC="$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
+WC=$ac_cv_path_WC
+if test -n "$WC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
+$as_echo "$WC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Test that variable WC is not empty.
+    if test "" = "$WC"; then as_fn_error $? "Could not find wc !" "$LINENO" 5 ; fi
+
+# Extract the first word of "xargs", so it can be a program name with args.
+set dummy xargs; 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_XARGS+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $XARGS in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_XARGS="$XARGS" # 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_XARGS="$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
+XARGS=$ac_cv_path_XARGS
+if test -n "$XARGS"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
+$as_echo "$XARGS" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Test that variable XARGS is not empty.
+    if test "" = "$XARGS"; then as_fn_error $? "Could not find xargs !" "$LINENO" 5 ; fi
+
+# Extract the first word of "zip", so it can be a program name with args.
+set dummy zip; 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 that variable ZIP is not empty.
+    if test "" = "$ZIP"; then as_fn_error $? "Could not find zip !" "$LINENO" 5 ; fi
+
+# Extract the first word of "unzip", so it can be a program name with args.
+set dummy unzip; 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 that variable UNZIP is not empty.
+    if test "" = "$UNZIP"; then as_fn_error $? "Could not find unzip !" "$LINENO" 5 ; 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
+# Extract the first word of "readelf", so it can be a program name with args.
+set dummy readelf; 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
+
+
+# Extract the first word of "expr", so it can be a program name with args.
+set dummy expr; 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_EXPR+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $EXPR in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_EXPR="$EXPR" # 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_EXPR="$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
+EXPR=$ac_cv_path_EXPR
+if test -n "$EXPR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
+$as_echo "$EXPR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Test that variable EXPR is not empty.
+    if test "" = "$EXPR"; then as_fn_error $? "Could not find expr !" "$LINENO" 5 ; fi
+
+# Extract the first word of "file", so it can be a program name with args.
+set dummy file; 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_FILE+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $FILE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_FILE="$FILE" # 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_FILE="$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
+FILE=$ac_cv_path_FILE
+if test -n "$FILE"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
+$as_echo "$FILE" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Test that variable FILE is not empty.
+    if test "" = "$FILE"; then as_fn_error $? "Could not find file !" "$LINENO" 5 ; fi
+
+# 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
+
+
+
+
+# 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_SYSTEM} | tr '-' '_' | tr '.' '_'`
+        target_var=`echo ${OPENJDK_TARGET_SYSTEM} | 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_SYSTEM}
+            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_SYSTEM}
+            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
+
+
+
+# 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
+
+###############################################################################
+#
+# Determine OpenJDK build and target platforms.
+#
+###############################################################################
+
+# 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.
+
+
+
+
+
+# Check whether --with-target-bits was given.
+if test "${with_target_bits+set}" = set; then :
+  withval=$with_target_bits;
+fi
+
+
+if test "x$with_target_bits" != x && \
+   test "x$with_target_bits" != x32 && \
+   test "x$with_target_bits" != x64 ; then
+    as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
+fi
+# Translate the standard cpu-vendor-kernel-os quadruplets into
+# the new TARGET_.... and BUILD_... and the legacy names used by
+# the openjdk build.
+# It uses $host_os $host_cpu $build_os $build_cpu and $with_target_bits
+
+    # Expects $host_os $host_cpu $build_os and $build_cpu
+    # and $with_target_bits to have been setup!
+    #
+    # Translate the standard triplet(quadruplet) definition
+    # of the target/build system into
+    # OPENJDK_TARGET_OS=aix,bsd,hpux,linux,macosx,solaris,windows
+    # OPENJDK_TARGET_OS_FAMILY=bsd,gnu,sysv,win32,wince
+    # OPENJDK_TARGET_OS_API=posix,winapi
+    #
+    # OPENJDK_TARGET_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64
+    # OPENJDK_TARGET_CPU_ARCH=x86,sparc,pcc,arm
+    # OPENJDK_TARGET_CPU_BITS=32,64
+    # OPENJDK_TARGET_CPU_ENDIAN=big,little
+    #
+    # The same values are setup for BUILD_...
+    #
+    # And the legacy variables, for controlling the old makefiles.
+    # LEGACY_OPENJDK_TARGET_CPU1=i586,amd64/x86_64,sparc,sparcv9,arm,arm64...
+    # LEGACY_OPENJDK_TARGET_CPU2=i386,amd64,sparc,sparcv9,arm,arm64...
+    # LEGACY_OPENJDK_TARGET_CPU3=sparcv9,amd64 (but only on solaris)
+    # LEGACY_OPENJDK_TARGET_OS_API=solaris,windows
+    #
+    # We also copy the autoconf trip/quadruplet
+    # verbatim to OPENJDK_TARGET_SYSTEM (from the autoconf "host") and OPENJDK_BUILD_SYSTEM
+    OPENJDK_TARGET_SYSTEM="$host"
+    OPENJDK_BUILD_SYSTEM="$build"
+
+
+
+
+
+  case "$host_os" in
+    *linux*)
+      VAR_OS=linux
+      VAR_OS_API=posix
+      VAR_OS_FAMILY=gnu
+      ;;
+    *solaris*)
+      VAR_OS=solaris
+      VAR_OS_API=posix
+      VAR_OS_FAMILY=sysv
+      ;;
+    *darwin*)
+      VAR_OS=macosx
+      VAR_OS_API=posix
+      VAR_OS_FAMILY=bsd
+      ;;
+    *bsd*)
+      VAR_OS=bsd
+      VAR_OS_API=posix
+      VAR_OS_FAMILY=bsd
+      ;;
+    *cygwin*|*windows*)
+      VAR_OS=windows
+      VAR_OS_API=winapi
+      VAR_OS_FAMILY=windows
+      ;;
+    *)
+      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
+      ;;
+  esac
+
+    OPENJDK_TARGET_OS="$VAR_OS"
+    OPENJDK_TARGET_OS_FAMILY="$VAR_OS_FAMILY"
+    OPENJDK_TARGET_OS_API="$VAR_OS_API"
+
+
+
+
+
+    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
+        LEGACY_OPENJDK_TARGET_OS_API="solaris"
+    fi
+    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
+        LEGACY_OPENJDK_TARGET_OS_API="windows"
+    fi
+
+
+
+
+  # First argument is the cpu name from the trip/quad
+  case "$host_cpu" in
+    x86_64)
+      VAR_CPU=x64
+      VAR_CPU_ARCH=x86
+      VAR_CPU_BITS=64
+      VAR_CPU_ENDIAN=little
+      VAR_LEGACY_CPU=amd64
+      ;;
+    i?86)
+      VAR_CPU=ia32
+      VAR_CPU_ARCH=x86
+      VAR_CPU_BITS=32
+      VAR_CPU_ENDIAN=little
+      VAR_LEGACY_CPU=i586
+      ;;
+    alpha*)
+      VAR_CPU=alpha
+      VAR_CPU_ARCH=alpha
+      VAR_CPU_BITS=64
+      VAR_CPU_ENDIAN=big
+      VAR_LEGACY_CPU=alpha
+      ;;
+    arm*)
+      VAR_CPU=arm
+      VAR_CPU_ARCH=arm
+      VAR_CPU_BITS=32
+      VAR_CPU_ENDIAN=little
+      VAR_LEGACY_CPU=arm
+      ;;
+    mips)
+      VAR_CPU=mips
+      VAR_CPU_ARCH=mips
+      VAR_CPU_BITS=woot
+      VAR_CPU_ENDIAN=woot
+      VAR_LEGACY_CPU=mips
+       ;;
+    mipsel)
+      VAR_CPU=mipsel
+      VAR_CPU_ARCH=mips
+      VAR_CPU_BITS=woot
+      VAR_CPU_ENDIAN=woot
+      VAR_LEGACY_CPU=mipsel
+       ;;
+    powerpc)
+      VAR_CPU=ppc
+      VAR_CPU_ARCH=ppc
+      VAR_CPU_BITS=32
+      VAR_CPU_ENDIAN=big
+      VAR_LEGACY_CPU=ppc
+       ;;
+    powerpc64)
+      VAR_CPU=ppc64
+      VAR_CPU_ARCH=ppc
+      VAR_CPU_BITS=64
+      VAR_CPU_ENDIAN=big
+      VAR_LEGACY_CPU=ppc64
+       ;;
+    sparc)
+      VAR_CPU=sparc
+      VAR_CPU_ARCH=sparc
+      VAR_CPU_BITS=32
+      VAR_CPU_ENDIAN=big
+      VAR_LEGACY_CPU=sparc
+       ;;
+    sparc64)
+      VAR_CPU=sparcv9
+      VAR_CPU_ARCH=sparc
+      VAR_CPU_BITS=64
+      VAR_CPU_ENDIAN=big
+      VAR_LEGACY_CPU=sparcv9
+       ;;
+    s390)
+      VAR_CPU=s390
+      VAR_CPU_ARCH=s390
+      VAR_CPU_BITS=32
+      VAR_CPU_ENDIAN=woot
+      VAR_LEGACY_CPU=s390
+      VAR_LEGACY_CPU=s390
+       ;;
+    s390x)
+      VAR_CPU=s390x
+      VAR_CPU_ARCH=s390
+      VAR_CPU_BITS=64
+      VAR_CPU_ENDIAN=woot
+      VAR_LEGACY_CPU=s390x
+       ;;
+    *)
+      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
+      ;;
+  esac
+
+  # Workaround cygwin not knowing about 64 bit.
+  if test "x$VAR_OS" = "xwindows"; then
+      if test "x$PROCESSOR_IDENTIFIER" != "x"; then
+          PROC_ARCH=`echo $PROCESSOR_IDENTIFIER | $CUT -f1 -d' '`
+          case "$PROC_ARCH" in
+            intel64|Intel64|INTEL64|em64t|EM64T|amd64|AMD64|8664|x86_64)
+              VAR_CPU=x64
+              VAR_CPU_BITS=64
+              VAR_LEGACY_CPU=amd64
+              ;;
+          esac
+      fi
+  fi
+
+  # on solaris x86...default seems to be 32-bit
+  if test "x$VAR_OS" = "xsolaris" && \
+     test "x$with_target_bits" = "x" && \
+     test "x$VAR_CPU_ARCH" = "xx86"
+  then
+      with_target_bits=32
+  fi
+
+  if test "x$VAR_CPU_ARCH" = "xx86"; then
+      if test "x$with_target_bits" = "x64"; then
+          VAR_CPU=x64
+          VAR_CPU_BITS=64
+          VAR_LEGACY_CPU=amd64
+      fi
+      if test "x$with_target_bits" = "x32"; then
+          VAR_CPU=ia32
+          VAR_CPU_BITS=32
+          VAR_LEGACY_CPU=i586
+      fi
+  fi
+
+  if test "x$VAR_CPU_ARCH" = "xsparc"; then
+      if test "x$with_target_bits" = "x64"; then
+          VAR_CPU=sparcv9
+          VAR_CPU_BITS=64
+          VAR_LEGACY_CPU=sparcv9
+      fi
+  fi
+
+    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"
+
+
+
+
+
+
+    # Also store the legacy naming of the cpu.
+    # Ie i586 and amd64 instead of ia32 and x64
+    LEGACY_OPENJDK_TARGET_CPU1="$VAR_LEGACY_CPU"
+
+
+    # And the second legacy naming of the cpu.
+    # Ie i386 and amd64 instead of ia32 and x64.
+    LEGACY_OPENJDK_TARGET_CPU2="$LEGACY_OPENJDK_TARGET_CPU1"
+    if test "x$LEGACY_OPENJDK_TARGET_CPU1" = xi586; then
+        LEGACY_OPENJDK_TARGET_CPU2=i386
+    fi
+
+
+    # And the third legacy naming of the cpu.
+    # Ie only amd64 or sparcv9, used for the ISA_DIR on Solaris.
+    LEGACY_OPENJDK_TARGET_CPU3=""
+    if test "x$OPENJDK_TARGET_CPU" = xx64; then
+        LEGACY_OPENJDK_TARGET_CPU3=amd64
+    fi
+    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
+        LEGACY_OPENJDK_TARGET_CPU3=sparcv9
+    fi
+
+
+
+
+
+  case "$build_os" in
+    *linux*)
+      VAR_OS=linux
+      VAR_OS_API=posix
+      VAR_OS_FAMILY=gnu
+      ;;
+    *solaris*)
+      VAR_OS=solaris
+      VAR_OS_API=posix
+      VAR_OS_FAMILY=sysv
+      ;;
+    *darwin*)
+      VAR_OS=macosx
+      VAR_OS_API=posix
+      VAR_OS_FAMILY=bsd
+      ;;
+    *bsd*)
+      VAR_OS=bsd
+      VAR_OS_API=posix
+      VAR_OS_FAMILY=bsd
+      ;;
+    *cygwin*|*windows*)
+      VAR_OS=windows
+      VAR_OS_API=winapi
+      VAR_OS_FAMILY=windows
+      ;;
+    *)
+      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
+      ;;
+  esac
+
+    OPENJDK_BUILD_OS="$VAR_OS"
+    OPENJDK_BUILD_OS_FAMILY="$VAR_OS_FAMILY"
+    OPENJDK_BUILD_OS_API="$VAR_OS_API"
+
+
+
+
+
+    if test "x$OPENJDK_BUILD_OS_API" = xposix; then
+        LEGACY_OPENJDK_BUILD_OS_API="solaris"
+    fi
+    if test "x$OPENJDK_BUILD_OS_API" = xwinapi; then
+        LEGACY_OPENJDK_BUILD_OS_API="windows"
+    fi
+
+
+
+
+  # First argument is the cpu name from the trip/quad
+  case "$build_cpu" in
+    x86_64)
+      VAR_CPU=x64
+      VAR_CPU_ARCH=x86
+      VAR_CPU_BITS=64
+      VAR_CPU_ENDIAN=little
+      VAR_LEGACY_CPU=amd64
+      ;;
+    i?86)
+      VAR_CPU=ia32
+      VAR_CPU_ARCH=x86
+      VAR_CPU_BITS=32
+      VAR_CPU_ENDIAN=little
+      VAR_LEGACY_CPU=i586
+      ;;
+    alpha*)
+      VAR_CPU=alpha
+      VAR_CPU_ARCH=alpha
+      VAR_CPU_BITS=64
+      VAR_CPU_ENDIAN=big
+      VAR_LEGACY_CPU=alpha
+      ;;
+    arm*)
+      VAR_CPU=arm
+      VAR_CPU_ARCH=arm
+      VAR_CPU_BITS=32
+      VAR_CPU_ENDIAN=little
+      VAR_LEGACY_CPU=arm
+      ;;
+    mips)
+      VAR_CPU=mips
+      VAR_CPU_ARCH=mips
+      VAR_CPU_BITS=woot
+      VAR_CPU_ENDIAN=woot
+      VAR_LEGACY_CPU=mips
+       ;;
+    mipsel)
+      VAR_CPU=mipsel
+      VAR_CPU_ARCH=mips
+      VAR_CPU_BITS=woot
+      VAR_CPU_ENDIAN=woot
+      VAR_LEGACY_CPU=mipsel
+       ;;
+    powerpc)
+      VAR_CPU=ppc
+      VAR_CPU_ARCH=ppc
+      VAR_CPU_BITS=32
+      VAR_CPU_ENDIAN=big
+      VAR_LEGACY_CPU=ppc
+       ;;
+    powerpc64)
+      VAR_CPU=ppc64
+      VAR_CPU_ARCH=ppc
+      VAR_CPU_BITS=64
+      VAR_CPU_ENDIAN=big
+      VAR_LEGACY_CPU=ppc64
+       ;;
+    sparc)
+      VAR_CPU=sparc
+      VAR_CPU_ARCH=sparc
+      VAR_CPU_BITS=32
+      VAR_CPU_ENDIAN=big
+      VAR_LEGACY_CPU=sparc
+       ;;
+    sparc64)
+      VAR_CPU=sparcv9
+      VAR_CPU_ARCH=sparc
+      VAR_CPU_BITS=64
+      VAR_CPU_ENDIAN=big
+      VAR_LEGACY_CPU=sparcv9
+       ;;
+    s390)
+      VAR_CPU=s390
+      VAR_CPU_ARCH=s390
+      VAR_CPU_BITS=32
+      VAR_CPU_ENDIAN=woot
+      VAR_LEGACY_CPU=s390
+      VAR_LEGACY_CPU=s390
+       ;;
+    s390x)
+      VAR_CPU=s390x
+      VAR_CPU_ARCH=s390
+      VAR_CPU_BITS=64
+      VAR_CPU_ENDIAN=woot
+      VAR_LEGACY_CPU=s390x
+       ;;
+    *)
+      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
+      ;;
+  esac
+
+  # Workaround cygwin not knowing about 64 bit.
+  if test "x$VAR_OS" = "xwindows"; then
+      if test "x$PROCESSOR_IDENTIFIER" != "x"; then
+          PROC_ARCH=`echo $PROCESSOR_IDENTIFIER | $CUT -f1 -d' '`
+          case "$PROC_ARCH" in
+            intel64|Intel64|INTEL64|em64t|EM64T|amd64|AMD64|8664|x86_64)
+              VAR_CPU=x64
+              VAR_CPU_BITS=64
+              VAR_LEGACY_CPU=amd64
+              ;;
+          esac
+      fi
+  fi
+
+  # on solaris x86...default seems to be 32-bit
+  if test "x$VAR_OS" = "xsolaris" && \
+     test "x$with_target_bits" = "x" && \
+     test "x$VAR_CPU_ARCH" = "xx86"
+  then
+      with_target_bits=32
+  fi
+
+  if test "x$VAR_CPU_ARCH" = "xx86"; then
+      if test "x$with_target_bits" = "x64"; then
+          VAR_CPU=x64
+          VAR_CPU_BITS=64
+          VAR_LEGACY_CPU=amd64
+      fi
+      if test "x$with_target_bits" = "x32"; then
+          VAR_CPU=ia32
+          VAR_CPU_BITS=32
+          VAR_LEGACY_CPU=i586
+      fi
+  fi
+
+  if test "x$VAR_CPU_ARCH" = "xsparc"; then
+      if test "x$with_target_bits" = "x64"; then
+          VAR_CPU=sparcv9
+          VAR_CPU_BITS=64
+          VAR_LEGACY_CPU=sparcv9
+      fi
+  fi
+
+    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"
+
+
+
+
+
+
+    # Also store the legacy naming of the cpu.
+    # Ie i586 and amd64 instead of ia32 and x64
+    LEGACY_OPENJDK_BUILD_CPU1="$VAR_LEGACY_CPU"
+
+
+    # And the second legacy naming of the cpu.
+    # Ie i386 and amd64 instead of ia32 and x64.
+    LEGACY_OPENJDK_BUILD_CPU2="$LEGACY_OPENJDK_BUILD_CPU1"
+    if test "x$LEGACY_OPENJDK_BUILD_CPU1" = xi586; then
+        LEGACY_OPENJDK_BUILD_CPU2=i386
+    fi
+
+
+    # And the third legacy naming of the cpu.
+    # Ie only amd64 or sparcv9, used for the ISA_DIR on Solaris.
+    LEGACY_OPENJDK_BUILD_CPU3=""
+    if test "x$OPENJDK_BUILD_CPU" = xx64; then
+        LEGACY_OPENJDK_BUILD_CPU3=amd64
+    fi
+    if test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
+        LEGACY_OPENJDK_BUILD_CPU3=sparcv9
+    fi
+
+
+
+    if test "x$OPENJDK_TARGET_OS" != xsolaris; then
+        LEGACY_OPENJDK_TARGET_CPU3=""
+        LEGACY_OPENJDK_BUILD_CPU3=""
+    fi
+
+    # On MacOSX and MacOSX only, we have a different name for the x64 CPU in ARCH (LEGACY_OPENJDK_TARGET_CPU1) ...
+    if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$OPENJDK_TARGET_CPU" = xx64; then
+        LEGACY_OPENJDK_TARGET_CPU1="x86_64"
+    fi
+
+
+    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
+        REQUIRED_OS_VERSION=5.1
+    fi
+    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
+        REQUIRED_OS_NAME=Darwin
+        REQUIRED_OS_VERSION=11.2
+    fi
+
+
+
+
+
+
+# The LEGACY_OPENJDK_TARGET_CPU3 is the setting for ISA_DIR.
+if test "x$LEGACY_OPENJDK_TARGET_CPU3" != x; then
+   LEGACY_OPENJDK_TARGET_CPU3="/${LEGACY_OPENJDK_TARGET_CPU3}"
+fi
+
+# Now the following vars are defined.
+# OPENJDK_TARGET_OS=aix,bsd,hpux,linux,macosx,solaris,windows
+# OPENJDK_TARGET_OS_FAMILY=bsd,gnu,sysv,win32,wince
+# OPENJDK_TARGET_OS_API=posix,winapi
+#
+# OPENJDK_TARGET_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64
+# OPENJDK_TARGET_CPU_ARCH=x86,sparc,pcc,arm
+# OPENJDK_TARGET_CPU_BITS=32,64
+# OPENJDK_TARGET_CPU_ENDIAN=big,little
+#
+# There is also a:
+# LEGACY_OPENJDK_TARGET_CPU1=i586,amd64,....  # used to set the old var ARCH
+# LEGACY_OPENJDK_TARGET_CPU2=i386,amd64,.... # used to set the old var LIBARCH
+# LEGACY_OPENJDK_TARGET_CPU3=only sparcv9,amd64 # used to set the ISA_DIR on Solaris
+# There was also a BUILDARCH that had i486,amd64,... but we do not use that
+# in the new build.
+# LEGACY_OPENJDK_TARGET_OS_API=solaris,windows # used to select source roots
+
+
+###############################################################################
+
+# 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 ' '`"
+
+
+
+
+
+# With knowledge of the build platform, setup more basic things.
+
+# 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
+
+
+
+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
+
+
+###############################################################################
+#
+# Determine OpenJDK variants, options and version numbers.
+#
+###############################################################################
+
+# We need build & target for this.
+
+###############################################################################
+#
+# Check which variant of the JDK that we want to build.
+# Currently we have:
+#    normal:   standard edition
+#    embedded: cut down to a smaller footprint
+#
+# Effectively the JDK variant gives a name to a specific set of
+# modules to compile into the JDK. In the future, these modules
+# might even be Jigsaw modules.
+#
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
+$as_echo_n "checking which variant of the JDK to build... " >&6; }
+
+# Check whether --with-jdk-variant was given.
+if test "${with_jdk_variant+set}" = set; then :
+  withval=$with_jdk_variant;
+fi
+
+
+if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
+    JAVASE_EMBEDDED=""
+    MINIMIZE_RAM_USAGE=""
+    JDK_VARIANT="normal"
+elif test "x$with_jdk_variant" = xembedded; then
+    JAVASE_EMBEDDED="JAVASE_EMBEDDED:=true"
+    MINIMIZE_RAM_USAGE="MINIMIZE_RAM_USAGE:=true"
+    JDK_VARIANT="embedded"
+else
+    as_fn_error $? "The available JDK variants are: normal, embedded" "$LINENO" 5
+fi
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
+$as_echo "$JDK_VARIANT" >&6; }
+
+
+
+###############################################################################
+#
+# Check which variants of the JVM that we want to build.
+# Currently we have:
+#    server: normal interpreter and a tiered C1/C2 compiler
+#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
+#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
+#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
+#    zero: no machine code interpreter, no compiler
+#    zeroshark: zero interpreter and shark/llvm compiler backend
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM that should be built" >&5
+$as_echo_n "checking which variants of the JVM that should be built... " >&6; }
+
+# Check whether --with-jvm-variants was given.
+if test "${with_jvm_variants+set}" = set; then :
+  withval=$with_jvm_variants;
+fi
+
+
+if test "x$with_jvm_variants" = x; then
+    if test "x$JDK_VARIANT" = xembedded; then
+        with_jvm_variants="client"
+    else
+        with_jvm_variants="server"
+    fi
+fi
+
+JVM_VARIANTS=",$with_jvm_variants,"
+TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
+
+if test "x$TEST_VARIANTS" != "x,"; then
+   as_fn_error $? "The available JVM variants are: server, client, kernel, zero, zeroshark" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
+$as_echo "$with_jvm_variants" >&6; }
+
+JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
+JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
+JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
+JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
+JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
+
+if test "x$JVM_VARIANT_CLIENT" = xtrue; then
+    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
+    fi
+fi
+if test "x$JVM_VARIANT_KERNEL" = xtrue; then
+    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
+    fi
+fi
+
+# Replace the commas with AND for use in the build directory name.
+ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
+COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
+if test "x$COUNT_VARIANTS" != "x,1"; then
+    BUILDING_MULTIPLE_JVM_VARIANTS=yes
+else
+    BUILDING_MULTIPLE_JVM_VARIANTS=no
+fi
+
+
+
+
+
+
+
+
+
+
+
+###############################################################################
+#
+# Set the debug level
+#    release: no debug information, all optimizations, no asserts.
+#    fastdebug: debug information (-g), all optimizations, all asserts
+#    slowdebug: debug information (-g), no optimizations, all asserts
+#
+DEBUG_LEVEL="release"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
+$as_echo_n "checking which debug level to use... " >&6; }
+# Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then :
+  enableval=$enable_debug;
+        ENABLE_DEBUG="${enableval}"
+        DEBUG_LEVEL="fastdebug"
+
+else
+  ENABLE_DEBUG="no"
+fi
+
+
+
+# Check whether --with-debug-level was given.
+if test "${with_debug_level+set}" = set; then :
+  withval=$with_debug_level;
+        DEBUG_LEVEL="${withval}"
+        if test "x$ENABLE_DEBUG" = xyes; then
+			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
+        fi
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
+$as_echo "$DEBUG_LEVEL" >&6; }
+
+if test "x$DEBUG_LEVEL" != xrelease && \
+   test "x$DEBUG_LEVEL" != xfastdebug && \
+   test "x$DEBUG_LEVEL" != xslowdebug; then
+   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
+fi
+
+
+###############################################################################
+#
+# Setup legacy vars/targets and new vars to deal with different debug levels.
+#
+
+case $DEBUG_LEVEL in
+      release )
+          VARIANT="OPT"
+          FASTDEBUG="false"
+          DEBUG_CLASSFILES="false"
+          BUILD_VARIANT_RELEASE=""
+          HOTSPOT_DEBUG_LEVEL="product"
+          HOTSPOT_EXPORT="product"
+           ;;
+      fastdebug )
+          VARIANT="DBG"
+          FASTDEBUG="true"
+          DEBUG_CLASSFILES="true"
+          BUILD_VARIANT_RELEASE="-fastdebug"
+          HOTSPOT_DEBUG_LEVEL="fastdebug"
+          HOTSPOT_EXPORT="fastdebug"
+           ;;
+      slowdebug )
+          VARIANT="DBG"
+          FASTDEBUG="false"
+          DEBUG_CLASSFILES="true"
+          BUILD_VARIANT_RELEASE="-debug"
+          HOTSPOT_DEBUG_LEVEL="jvmg"
+          HOTSPOT_EXPORT="debug"
+           ;;
+esac
+
+#####
+# Generate the legacy makefile targets for hotspot.
+# The hotspot api for selecting the build artifacts, really, needs to be improved.
+#
+HOTSPOT_TARGET=""
+
+if test "x$JVM_VARIANT_SERVER" = xtrue; then
+    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
+fi
+
+if test "x$JVM_VARIANT_CLIENT" = xtrue; then
+    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
+fi
+
+if test "x$JVM_VARIANT_KERNEL" = xtrue; then
+    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
+fi
+
+if test "x$JVM_VARIANT_ZERO" = xtrue; then
+    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
+fi
+
+if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
+    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
+fi
+
+HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
+
+#####
+
+
+
+
+
+
+
+
+
+###############################################################################
+#
+# Should we build only OpenJDK even if closed sources are present?
+#
+# Check whether --enable-openjdk-only was given.
+if test "${enable_openjdk_only+set}" = set; then :
+  enableval=$enable_openjdk_only;
+fi
+
+
+if test "x$enable_openjdk_only" = "xyes"; then
+    OPENJDK=true
+elif test "x$enable_openjdk_only" = "xno"; then
+    OPENJDK=false
+elif test -d "$SRC_ROOT/jdk/src/closed"; then
+    OPENJDK=false
+else
+    OPENJDK=true
+fi
+
+if test "x$OPENJDK" = "xtrue"; then
+    SET_OPENJDK=OPENJDK=true
+fi
+
+
+
+###############################################################################
+#
+# JIGSAW or not.  The JIGSAW variable is used during the intermediate
+# stage when we are building both the old style JDK and the new style modularized JDK.
+# When the modularized JDK is finalized, this option will go away.
+#
+# Check whether --enable-jigsaw was given.
+if test "${enable_jigsaw+set}" = set; then :
+  enableval=$enable_jigsaw;
+fi
+
+
+if test "x$enable_jigsaw" = "xyes"; then
+    JIGSAW=true
+else
+    JIGSAW=false
+fi
+
+
+###############################################################################
+#
+# Should we build a JDK/JVM with headful support (ie a graphical ui)?
+# We always build headless support.
+#
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
+$as_echo_n "checking headful support... " >&6; }
+# Check whether --enable-headful was given.
+if test "${enable_headful+set}" = set; then :
+  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
+else
+  SUPPORT_HEADFUL=yes
+fi
+
+
+SUPPORT_HEADLESS=yes
+BUILD_HEADLESS="BUILD_HEADLESS:=true"
+
+if test "x$SUPPORT_HEADFUL" = xyes; then
+    # We are building both headful and headless.
+    BUILD_HEADLESS_ONLY=""
+    headful_msg="inlude support for both headful and headless"
+fi
+
+if test "x$SUPPORT_HEADFUL" = xno; then
+    # Thus we are building headless only.
+    BUILD_HEADLESS="BUILD_HEADLESS:=true"
+    BUILD_HEADLESS_ONLY="BUILD_HEADLESS_ONLY:=true"
+    headful_msg="headless only"
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
+$as_echo "$headful_msg" >&6; }
+
+
+
+
+
+
+###############################################################################
+#
+# Should we run the painfully slow javadoc tool?
+#
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build documentation" >&5
+$as_echo_n "checking whether to build documentation... " >&6; }
+# Check whether --enable-docs was given.
+if test "${enable_docs+set}" = set; then :
+  enableval=$enable_docs; ENABLE_DOCS="${enableval}"
+else
+  ENABLE_DOCS='no'
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DOCS" >&5
+$as_echo "$ENABLE_DOCS" >&6; }
+
+GENERATE_DOCS=false
+if test "x$ENABLE_DOCS" = xyes; then
+    GENERATE_DOCS=true
+fi
+
+
+###############################################################################
+#
+# Should we compile nimbus swing L&F? We can probably remove this option
+# since nimbus is officially part of javax now.
+#
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build nimbus L&F" >&5
+$as_echo_n "checking whether to build nimbus L&F... " >&6; }
+# Check whether --enable-nimbus was given.
+if test "${enable_nimbus+set}" = set; then :
+  enableval=$enable_nimbus; ENABLE_NIMBUS="${enableval}"
+else
+  ENABLE_NIMBUS='yes'
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_NIMBUS" >&5
+$as_echo "$ENABLE_NIMBUS" >&6; }
+DISABLE_NIMBUS=
+if test "x$ENABLE_NIMBUS" = xno; then
+    DISABLE_NIMBUS=true
+fi
+
+
+# Control wether Hotspot runs Queens test after build.
+# Check whether --enable-hotspot-test-in-build was given.
+if test "${enable_hotspot_test_in_build+set}" = set; then :
+  enableval=$enable_hotspot_test_in_build;
+else
+  enable_hotspot_test_in_build=no
+fi
+
+if test "x$enable_hotspot_test_in_build" = "xyes"; then
+    TEST_IN_BUILD=true
+else
+    TEST_IN_BUILD=false
+fi
+
+
+###############################################################################
+#
+# Choose cacerts source file
+#
+
+# Check whether --with-cacerts-file was given.
+if test "${with_cacerts_file+set}" = set; then :
+  withval=$with_cacerts_file;
+fi
+
+if test "x$with_cacerts_file" != x; then
+    CACERTS_FILE=$with_cacerts_file
+else
+    if test "x$OPENJDK" = "xtrue"; then
+        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
+    else
+        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
+    fi
+fi
+
+
+###############################################################################
+#
+# Compress jars
+#
+COMPRESS_JARS=false
+
+# default for embedded is yes...
+if test "x$JDK_VARIANT" = "xembedded"; then
+   COMPRESS_JARS=true
+fi
+
+
+###############################################################################
+#
+# Should we compile JFR
+#   default no, except for on closed-jdk and !embedded
+#
+ENABLE_JFR=no
+
+# Is the JFR source present
+
+#
+# For closed && !embedded default is yes if the source is present
+#
+if test "x${OPENJDK}" != "xtrue" && test "x$JDK_VARIANT" != "xembedded" && test -d "$SRC_ROOT/jdk/src/closed/share/native/oracle/jfr"; then
+   ENABLE_JFR=yes
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build jfr" >&5
+$as_echo_n "checking whether to build jfr... " >&6; }
+# Check whether --enable-jfr was given.
+if test "${enable_jfr+set}" = set; then :
+  enableval=$enable_jfr;
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ENABLE_JFR}" >&5
+$as_echo "${ENABLE_JFR}" >&6; }
+
+if test "x$ENABLE_JFR" = "xyes"; then
+    ENABLE_JFR=true
+elif test "x$ENABLE_JFR" = "xno"; then
+    ENABLE_JFR=false
+else
+   as_fn_error $? "Invalid argument to --enable-jfr" "$LINENO" 5
+fi
+
+
+
+
+# Source the version numbers
+. $AUTOCONF_DIR/version.numbers
+if test "x$OPENJDK" = "xfalse"; then
+    . $AUTOCONF_DIR/closed.version.numbers
+fi
+# Now set the JDK version, milestone, build number etc.
+
+
+
+
+
+
+
+
+
+
+
+
+COPYRIGHT_YEAR=`date +'%Y'`
+
+
+RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
+
+
+if test "x$JDK_UPDATE_VERSION" != x; then
+    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
+else
+    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
+fi
+
+
+if test "x$MILESTONE" != x; then
+    RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
+else
+    RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
+fi
+
+
+if test "x$JDK_BUILD_NUMBER" != x; then
+    FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
+else
+    JDK_BUILD_NUMBER=b00
+    BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
+    # Avoid [:alnum:] since it depends on the locale.
+    CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
+    USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
+    FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
+fi
+
+COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
+
+
+
+# To properly create a configuration name, we need to have the OpenJDK target
+# and options (variants and debug level) parsed.
+
+
+
+# Check whether --with-conf-name was given.
+if test "${with_conf_name+set}" = set; then :
+  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
+fi
+
+
+# Test from where we are running configure, in or outside of src root.
+if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
+    # We are running configure from the src root.
+    # Create a default ./build/target-variant-debuglevel output root.
+    if test "x${CONF_NAME}" = x; then
+        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"
+    if test ! -d "$OUTPUT_ROOT"; then
+        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
+    fi
+else
+    # We are running configure from outside of the src dir.
+    # Then use the current directory as output dir!
+    # If configuration is situated in normal build directory, just use the build
+    # directory name as configuration name, otherwise use the complete path.
+    if test "x${CONF_NAME}" = x; then
+        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
+    fi
+    OUTPUT_ROOT="$CURDIR"
+fi
+
+
+    # Fail with message the path to the output root if var OUTPUT_ROOT contains a path with no spaces in it.
+    # Unless on Windows, where we can rewrite the path.
+    HAS_SPACE=`echo "$OUTPUT_ROOT" | grep " "`
+    if test "x$HAS_SPACE" != x; then
+        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+            OUTPUT_ROOT=`$CYGPATH -s -m -a "$OUTPUT_ROOT"`
+            OUTPUT_ROOT=`$CYGPATH -u "$OUTPUT_ROOT"`
+        else
+            as_fn_error $? "You cannot have spaces in the path to the output root! \"$OUTPUT_ROOT\"" "$LINENO" 5
+        fi
+    fi
+
+
+SPEC=$OUTPUT_ROOT/spec.gmk
+
+CONF_NAME=$CONF_NAME
+
+OUTPUT_ROOT=$OUTPUT_ROOT
+
+
+# Most of the probed defines are put into config.h
+ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
+
+# The spec.gmk file contains all variables for the make system.
+ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
+
+# The spec.sh file contains variables for compare{images|-objects}.sh scrips.
+ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
+
+# The generated Makefile knows where the spec.gmk is and where the source is.
+# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
+# which will look for generated configurations
+ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
+
+
+# Save the arguments given to us
+echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
+
+
+###############################################################################
+#
+# Setup BootJDK, used to bootstrap the build.
+#
+###############################################################################
+
+
+BOOT_JDK_FOUND=no
+
+# Check whether --with-boot-jdk was given.
+if test "${with_boot_jdk+set}" = set; then :
+  withval=$with_boot_jdk;
+fi
+
+
+if test "x$with_boot_jdk" != x; then
+    BOOT_JDK=$with_boot_jdk
+    BOOT_JDK_FOUND=yes
+fi
+if test "x$BOOT_JDK_FOUND" = xno; then
+
+
+    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
+        # Source the builddeps file again, to make sure it uses the latest variables!
+        . $builddepsfile
+        # Look for a target and build machine specific resource!
+        eval resource=\${builddep_boot-jdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
+        if test "x$resource" = x; then
+            # Ok, lets instead look for a target specific resource
+            eval resource=\${builddep_boot-jdk_TARGET_${rewritten_target_var}}
+        fi
+        if test "x$resource" = x; then
+            # Ok, lets instead look for a build specific resource
+            eval resource=\${builddep_boot-jdk_BUILD_${rewritten_build_var}}
+        fi
+        if test "x$resource" = x; then
+            # Ok, lets instead look for a generic resource
+            # (The boot-jdk comes from M4 and not the shell, thus no need for eval here.)
+            resource=${builddep_boot-jdk}
+        fi
+        if test "x$resource" != x; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for boot-jdk" >&5
+$as_echo "$as_me: Using builddeps $resource for boot-jdk" >&6;}
+	    # If the resource in the builddeps.conf file is an existing directory,
+	    # for example /java/linux/cups
+	    if test -d ${resource}; then
+	       depdir=${resource}
+	    else
+
+# boot-jdk is for example mymodule
+# $resource is for example libs/general/libmymod_1_2_3.zip
+# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
+# $with_builddeps_dir is for example /localhome/builddeps
+# depdir is the name of the variable into which we store the depdir, eg MYMOD
+# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
+# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
+    filename=`basename $resource`
+    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
+    filebase=${filename%%.*}
+    extension=${filename#*.}
+    installdir=$with_builddeps_dir/$filebase
+    if test ! -f $installdir/$filename.unpacked; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency boot-jdk from $with_builddeps_server/$resource and installing into $installdir" >&5
+$as_echo "$as_me: Downloading build dependency boot-jdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
+        if test ! -d $installdir; then
+            mkdir -p $installdir
+        fi
+        if test ! -d $installdir; then
+            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
+        fi
+        tmpfile=`mktemp $installdir/boot-jdk.XXXXXXXXX`
+        touch $tmpfile
+        if test ! -f $tmpfile; then
+            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
+        fi
+
+    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
+    # $tmpfile is the local file name for the downloaded file.
+    VALID_TOOL=no
+    if test "x$BDEPS_FTP" = xwget; then
+       VALID_TOOL=yes
+       wget -O $tmpfile $with_builddeps_server/$resource
+    fi
+    if test "x$BDEPS_FTP" = xlftp; then
+       VALID_TOOL=yes
+       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
+    fi
+    if test "x$BDEPS_FTP" = xftp; then
+        VALID_TOOL=yes
+        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
+        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
+        FTPUSERPWD=${FTPSERVER%%@*}
+        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
+            FTPUSER=${userpwd%%:*}
+            FTPPWD=${userpwd#*@}
+            FTPSERVER=${FTPSERVER#*@}
+        else
+            FTPUSER=ftp
+            FTPPWD=ftp
+        fi
+        # the "pass" command does not work on some
+        # ftp clients (read ftp.exe) but if it works,
+        # passive mode is better!
+        (\
+            echo "user $FTPUSER $FTPPWD"        ;\
+            echo "pass"                         ;\
+            echo "bin"                          ;\
+            echo "get $FTPPATH $tmpfile"              ;\
+        ) | ftp -in $FTPSERVER
+    fi
+    if test "x$VALID_TOOL" != xyes; then
+       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
+    fi
+
+        mv $tmpfile $installdir/$filename
+        if test ! -s $installdir/$filename; then
+            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
+        fi
+        case "$extension" in
+            zip)  echo "Unzipping $installdir/$filename..."
+               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
+            ;;
+            tar.gz) echo "Untaring $installdir/$filename..."
+               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
+            ;;
+            tgz) echo "Untaring $installdir/$filename..."
+               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
+            ;;
+            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
+            ;;
+        esac
+    fi
+    if test -f $installdir/$filename.unpacked; then
+        depdir=$installdir
+    fi
+
+	    fi
+            # Source the builddeps file again, because in the previous command, the depdir
+            # was updated to point at the current build dependency install directory.
+            . $builddepsfile
+            # Now extract variables from the builddeps.conf files.
+            theroot=${builddep_boot-jdk_ROOT}
+            thecflags=${builddep_boot-jdk_CFLAGS}
+            thelibs=${builddep_boot-jdk_LIBS}
+            if test "x$depdir" = x; then
+                as_fn_error $? "Could not download build dependency boot-jdk" "$LINENO" 5
+            fi
+            BOOT_JDK=$depdir
+            if test "x$theroot" != x; then
+               BOOT_JDK="$theroot"
+            fi
+            if test "x$thecflags" != x; then
+               BOOT_JDK_CFLAGS="$thecflags"
+            fi
+            if test "x$thelibs" != x; then
+               BOOT_JDK_LIBS="$thelibs"
+            fi
+            BOOT_JDK_FOUND=yes
+            else BOOT_JDK_FOUND=no
+
+        fi
+        else BOOT_JDK_FOUND=no
+
+    fi
+
+fi
+
+if test "x$BOOT_JDK_FOUND" = xno; then
+    if test "x$JAVA_HOME" != x; then
+        if test ! -d "$JAVA_HOME"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
+$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
+$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+
+        fi
+        # Aha, the user has set a JAVA_HOME
+        # let us use that as the Boot JDK.
+        BOOT_JDK="$JAVA_HOME"
+        BOOT_JDK_FOUND=yes
+        # To be on the safe side, lets check that it is a JDK.
+        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
+            JAVAC="$BOOT_JDK/bin/javac"
+            JAVA="$BOOT_JDK/bin/java"
+            BOOT_JDK_FOUND=yes
+        else
+            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a JRE! The build needs a JDK! Please point JAVA_HOME to a JDK. JAVA_HOME=$JAVA_HOME" >&5
+$as_echo "$as_me: Your JAVA_HOME points to a JRE! The build needs a JDK! Please point JAVA_HOME to a JDK. JAVA_HOME=$JAVA_HOME" >&6;}
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
+$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+
+        fi
+    fi
+fi
+
+if test "x$BOOT_JDK_FOUND" = xno; then
+    # Extract the first word of "javac", so it can be a program name with args.
+set dummy javac; 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_JAVAC_CHECK+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $JAVAC_CHECK in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # 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_JAVAC_CHECK="$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
+JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
+if test -n "$JAVAC_CHECK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
+$as_echo "$JAVAC_CHECK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    # Extract the first word of "java", so it can be a program name with args.
+set dummy java; 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_JAVA_CHECK+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $JAVA_CHECK in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # 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_JAVA_CHECK="$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
+JAVA_CHECK=$ac_cv_path_JAVA_CHECK
+if test -n "$JAVA_CHECK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
+$as_echo "$JAVA_CHECK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    BINARY="$JAVAC_CHECK"
+    if test "x$JAVAC_CHECK" = x; then
+        BINARY="$JAVA_CHECK"
+    fi
+    if test "x$BINARY" != x; then
+        # So there is a java(c) binary, it might be part of a JDK.
+        # 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.
+
+    # Translate long cygdrive or C:\sdfsf path
+    # into a short mixed mode path that has no
+    # spaces in it.
+    tmp="$BINARY"
+
+    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+        tmp=`$CYGPATH -u "$BINARY"`
+        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
+    BINARY="$tmp"
+
+
+    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
+            BINARY=`$READLINK -f $BINARY`
+        else
+            STARTDIR=$PWD
+            COUNTER=0
+            DIR=`dirname $BINARY`
+            FIL=`basename $BINARY`
+            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
+            BINARY=$DIR/$FIL
+        fi
+    fi
+
+        BOOT_JDK=`dirname $BINARY`
+        BOOT_JDK=`cd $BOOT_JDK/..; pwd`
+        if test -x $BOOT_JDK/bin/javac && test -x $BOOT_JDK/bin/java; then
+            JAVAC=$BOOT_JDK/bin/javac
+            JAVA=$BOOT_JDK/bin/java
+            BOOT_JDK_FOUND=yes
+        fi
+    fi
+fi
+
+if test "x$BOOT_JDK_FOUND" = xno; then
+    # Try the MacOSX way.
+    if test -x /usr/libexec/java_home; then
+        BOOT_JDK=`/usr/libexec/java_home`
+        if test -x $BOOT_JDK/bin/javac && test -x $BOOT_JDK/bin/java; then
+            JAVAC=$BOOT_JDK/bin/javac
+            JAVA=$BOOT_JDK/bin/java
+            BOOT_JDK_FOUND=yes
+        fi
+    fi
+fi
+
+if test "x$BOOT_JDK_FOUND" = xno; then
+    # Extract the first word of "java", so it can be a program name with args.
+set dummy java; 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_JAVA_CHECK+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $JAVA_CHECK in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # 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_JAVA_CHECK="$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
+JAVA_CHECK=$ac_cv_path_JAVA_CHECK
+if test -n "$JAVA_CHECK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
+$as_echo "$JAVA_CHECK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    if test "x$JAVA_CHECK" != x; then
+        # There is a java in the path. But apparently we have not found a javac
+        # in the path, since that would have been tested earlier.
+        if test "x$OPENJDK_TARGET_OS" = xwindows; then
+            # Now if this is a windows platform. The default installation of a JDK
+            # actually puts the JRE in the path and keeps the JDK out of the path!
+            # Go look in the default installation location.
+            BOOT_JDK=/cygdrive/c/Program\ Files/Java/`ls /cygdrive/c/Program\ Files/Java | grep jdk | sort -r | head --lines 1`
+            if test -d "$BOOT_JDK"; then
+                BOOT_JDK_FOUND=yes
+            fi
+        fi
+        if test "x$BOOT_JDK_FOUND" = xno; then
+
+    # Print a helpful message on how to acquire the necessary build dependency.
+    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
+    MISSING_DEPENDENCY=openjdk
+    PKGHANDLER_COMMAND=
+
+    case $PKGHANDLER in
+	apt-get)
+                apt_help     $MISSING_DEPENDENCY ;;
+    yum)
+                yum_help     $MISSING_DEPENDENCY ;;
+	port)
+                port_help    $MISSING_DEPENDENCY ;;
+	pkgutil)
+                pkgutil_help $MISSING_DEPENDENCY ;;
+	pkgadd)
+                pkgadd_help  $MISSING_DEPENDENCY ;;
+    * )
+      break ;;
+    esac
+
+    if test "x$PKGHANDLER_COMMAND" != x; then
+        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+    fi
+
+            { $as_echo "$as_me:${as_lineno-$LINENO}: Found a JRE, not not a JDK! Please remove the JRE from your path and put a JDK there instead. $HELP_MSG" >&5
+$as_echo "$as_me: Found a JRE, not not a JDK! Please remove the JRE from your path and put a JDK there instead. $HELP_MSG" >&6;}
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
+$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+
+        fi
+    else
+
+    # Print a helpful message on how to acquire the necessary build dependency.
+    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
+    MISSING_DEPENDENCY=openjdk
+    PKGHANDLER_COMMAND=
+
+    case $PKGHANDLER in
+	apt-get)
+                apt_help     $MISSING_DEPENDENCY ;;
+    yum)
+                yum_help     $MISSING_DEPENDENCY ;;
+	port)
+                port_help    $MISSING_DEPENDENCY ;;
+	pkgutil)
+                pkgutil_help $MISSING_DEPENDENCY ;;
+	pkgadd)
+                pkgadd_help  $MISSING_DEPENDENCY ;;
+    * )
+      break ;;
+    esac
+
+    if test "x$PKGHANDLER_COMMAND" != x; then
+        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+    fi
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a JDK. $HELP_MSG" >&5
+$as_echo "$as_me: Could not find a JDK. $HELP_MSG" >&6;}
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
+$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+
+    fi
+fi
+
+
+    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+        # 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
+
+
+        tmp="$BOOT_JDK"
+        # Convert to C:/ mixed style path without spaces.
+        tmp=`$CYGPATH -s -m "$tmp"`
+        BOOT_JDK="$tmp"
+    fi
+
+
+# Now see if we can find the rt.jar, or its nearest equivalent.
+BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
+
+    # Fail with message the path to the Boot JDK rt.jar (or nearest equivalent) if var BOOT_RTJAR contains a path with no spaces in it.
+    # Unless on Windows, where we can rewrite the path.
+    HAS_SPACE=`echo "$BOOT_RTJAR" | grep " "`
+    if test "x$HAS_SPACE" != x; then
+        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+            BOOT_RTJAR=`$CYGPATH -s -m -a "$BOOT_RTJAR"`
+            BOOT_RTJAR=`$CYGPATH -u "$BOOT_RTJAR"`
+        else
+            as_fn_error $? "You cannot have spaces in the path to the Boot JDK rt.jar (or nearest equivalent)! \"$BOOT_RTJAR\"" "$LINENO" 5
+        fi
+    fi
+
+
+BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
+
+    # Fail with message the path to the Boot JDK tools.jar (or nearest equivalent) if var BOOT_TOOLSJAR contains a path with no spaces in it.
+    # Unless on Windows, where we can rewrite the path.
+    HAS_SPACE=`echo "$BOOT_TOOLSJAR" | grep " "`
+    if test "x$HAS_SPACE" != x; then
+        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+            BOOT_TOOLSJAR=`$CYGPATH -s -m -a "$BOOT_TOOLSJAR"`
+            BOOT_TOOLSJAR=`$CYGPATH -u "$BOOT_TOOLSJAR"`
+        else
+            as_fn_error $? "You cannot have spaces in the path to the Boot JDK tools.jar (or nearest equivalent)! \"$BOOT_TOOLSJAR\"" "$LINENO" 5
+        fi
+    fi
+
+
+if test ! -f $BOOT_RTJAR; then
+    # On MacOSX it is called classes.jar
+    BOOT_RTJAR=$BOOT_JDK/../Classes/classes.jar
+    if test ! -f $BOOT_RTJAR; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot find the rt.jar or its equivalent!" >&5
+$as_echo "$as_me: Cannot find the rt.jar or its equivalent!" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: This typically means that configure failed to automatically find a suitable Boot JDK" >&5
+$as_echo "$as_me: This typically means that configure failed to automatically find a suitable Boot JDK" >&6;}
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
+$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+
+    fi
+    # Remove the ..
+    BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
+    # The tools.jar is part of classes.jar
+    BOOT_TOOLSJAR="$BOOT_RTJAR"
+fi
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
+$as_echo_n "checking for Boot JDK... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
+$as_echo "$BOOT_JDK" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot rt.jar" >&5
+$as_echo_n "checking for Boot rt.jar... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_RTJAR" >&5
+$as_echo "$BOOT_RTJAR" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot tools.jar" >&5
+$as_echo_n "checking for Boot tools.jar... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_TOOLSJAR" >&5
+$as_echo "$BOOT_TOOLSJAR" >&6; }
+
+# Use the java tool from the Boot JDK.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
+$as_echo_n "checking for java in Boot JDK... " >&6; }
+JAVA=$BOOT_JDK/bin/java
+if test ! -x $JAVA; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a working java" >&5
+$as_echo "$as_me: Could not find a working java" >&6;}
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
+$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+
+fi
+BOOT_JDK_VERSION=`$JAVA -version 2>&1 | head -n 1`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes $BOOT_JDK_VERSION" >&5
+$as_echo "yes $BOOT_JDK_VERSION" >&6; }
+
+
+# Extra M4 quote needed to protect [] in grep expression.
+FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
+if test "x$FOUND_VERSION_78" = x; then
+
+    # Print a helpful message on how to acquire the necessary build dependency.
+    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
+    MISSING_DEPENDENCY=openjdk
+    PKGHANDLER_COMMAND=
+
+    case $PKGHANDLER in
+	apt-get)
+                apt_help     $MISSING_DEPENDENCY ;;
+    yum)
+                yum_help     $MISSING_DEPENDENCY ;;
+	port)
+                port_help    $MISSING_DEPENDENCY ;;
+	pkgutil)
+                pkgutil_help $MISSING_DEPENDENCY ;;
+	pkgadd)
+                pkgadd_help  $MISSING_DEPENDENCY ;;
+    * )
+      break ;;
+    esac
+
+    if test "x$PKGHANDLER_COMMAND" != x; then
+        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+    fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Your boot-jdk must be version 7 or 8. $HELP_MSG" >&5
+$as_echo "$as_me: Your boot-jdk must be version 7 or 8. $HELP_MSG" >&6;}
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
+$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+
+fi
+
+# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
+BOOT_JDK_SOURCETARGET="-source 7 -target 7"
+
+
+# Use the javac tool from the Boot JDK.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
+$as_echo_n "checking for javac in Boot JDK... " >&6; }
+JAVAC=$BOOT_JDK/bin/javac
+if test ! -x $JAVAC; then
+    as_fn_error $? "Could not find a working javac" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+
+
+# Use the javah tool from the Boot JDK.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
+$as_echo_n "checking for javah in Boot JDK... " >&6; }
+JAVAH=$BOOT_JDK/bin/javah
+if test ! -x $JAVAH; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a working javah" >&5
+$as_echo "$as_me: Could not find a working javah" >&6;}
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
+$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+
+# Use the jar tool from the Boot JDK.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
+$as_echo_n "checking for jar in Boot JDK... " >&6; }
+JAR=$BOOT_JDK/bin/jar
+if test ! -x $JAR; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a working jar" >&5
+$as_echo "$as_me: Could not find a working jar" >&6;}
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
+$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+# Use the rmic tool from the Boot JDK.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
+$as_echo_n "checking for rmic in Boot JDK... " >&6; }
+RMIC=$BOOT_JDK/bin/rmic
+if test ! -x $RMIC; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a working rmic" >&5
+$as_echo "$as_me: Could not find a working rmic" >&6;}
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
+$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+# Use the native2ascii tool from the Boot JDK.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
+$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
+NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
+if test ! -x $NATIVE2ASCII; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a working native2ascii" >&5
+$as_echo "$as_me: Could not find a working native2ascii" >&6;}
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
+$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
+    as_fn_error $? "Cannot continue" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+
+
+##############################################################################
+#
+# Specify options for anything that is run with the Boot JDK.
+#
+
+# Check whether --with-boot-jdk-jvmargs was given.
+if test "${with_boot_jdk_jvmargs+set}" = set; then :
+  withval=$with_boot_jdk_jvmargs;
+fi
+
+
+if test "x$with_boot_jdk_jvmargs" = x; then
+    # Not all JVM:s accept the same arguments on the command line.
+    # OpenJDK specific increase in thread stack for JDK build,
+    # well more specifically, when running javac.
+    if test "x$BUILD_NUM_BITS" = x32; then
+       STACK_SIZE=768
+    else
+       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
+       # since 64-bit pointers are pushed on the stach. Apparently, we need
+       # to increase the stack space when javacing the JDK....
+       STACK_SIZE=1536
+    fi
+
+    # Minimum amount of heap memory.
+
+    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
+    # If so, then append -Xms64M to boot_jdk_jvmargs
+    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
+    fi
+
+    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
+        # Why does macosx need more heap? Its the huge JDK batch.
+
+    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
+    # If so, then append -Xmx1600M to boot_jdk_jvmargs
+    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
+    fi
+
+    else
+
+    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
+    # If so, then append -Xmx1100M to boot_jdk_jvmargs
+    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
+    fi
+
+    fi
+    # When is adding -client something that speeds up the JVM?
+    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
+
+    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
+    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
+    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
+    fi
+
+
+    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
+    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
+    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
+    fi
+
+
+    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
+    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
+    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
+    fi
+
+    # Disable special log output when a debug build is used as Boot JDK...
+
+    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
+    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
+    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
+    fi
+
+fi
+
+BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
+
+
+
+###############################################################################
+#
+# Configure the sources to use. We can add or override individual directories.
+#
+###############################################################################
+
+
+
+# Where are the sources. Any of these can be overridden
+# using --with-override-corba and the likes.
+LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
+CORBA_TOPDIR="$SRC_ROOT/corba"
+JAXP_TOPDIR="$SRC_ROOT/jaxp"
+JAXWS_TOPDIR="$SRC_ROOT/jaxws"
+HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
+JDK_TOPDIR="$SRC_ROOT/jdk"
+
+
+
+
+
+
+
+
+
+###############################################################################
+#
+# Pickup additional source for a component from outside of the source root
+# or override source for a component.
+#
+
+# Check whether --with-add-source-root was given.
+if test "${with_add_source_root+set}" = set; then :
+  withval=$with_add_source_root;
+fi
+
+
+
+# Check whether --with-override-source-root was given.
+if test "${with_override_source_root+set}" = set; then :
+  withval=$with_override_source_root;
+fi
+
+
+
+# Check whether --with-adds-and-overrides was given.
+if test "${with_adds_and_overrides+set}" = set; then :
+  withval=$with_adds_and_overrides;
+fi
+
+
+if test "x$with_adds_and_overrides" != x; then
+    with_add_source_root="$with_adds_and_overrides/adds"
+    with_override_source_root="$with_adds_and_overrides/overrides"
+fi
+
+if test "x$with_add_source_root" != x; then
+    if ! test -d $with_add_source_root; then
+       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
+    fi
+    CURDIR="$PWD"
+    cd "$with_add_source_root"
+    ADD_SRC_ROOT="`pwd`"
+    cd "$CURDIR"
+    # Verify that the addon source root does not have any root makefiles.
+    # If it does, then it is usually an error, prevent this.
+    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
+       test -f $with_add_source_root/langtools/make/Makefile; then
+        as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
+    fi
+    if test -f $with_add_source_root/corba/makefiles/Makefile || \
+       test -f $with_add_source_root/corba/make/Makefile; then
+        as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
+    fi
+    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
+       test -f $with_add_source_root/jaxp/make/Makefile; then
+        as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
+    fi
+    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
+       test -f $with_add_source_root/jaxws/make/Makefile; then
+        as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
+    fi
+    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
+       test -f $with_add_source_root/hotspot/make/Makefile; then
+        as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
+    fi
+    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
+       test -f $with_add_source_root/jdk/make/Makefile; then
+        as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
+    fi
+fi
+
+
+if test "x$with_override_source_root" != x; then
+    if ! test -d $with_override_source_root; then
+       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
+    fi
+    CURDIR="$PWD"
+    cd "$with_override_source_root"
+    OVERRIDE_SRC_ROOT="`pwd`"
+    cd "$CURDIR"
+    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
+       test -f $with_override_source_root/langtools/make/Makefile; then
+        as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
+    fi
+    if test -f $with_override_source_root/corba/makefiles/Makefile || \
+       test -f $with_override_source_root/corba/make/Makefile; then
+        as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
+    fi
+    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
+       test -f $with_override_source_root/jaxp/make/Makefile; then
+        as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
+    fi
+    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
+       test -f $with_override_source_root/jaxws/make/Makefile; then
+        as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
+    fi
+    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
+       test -f $with_override_source_root/hotspot/make/Makefile; then
+        as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
+    fi
+    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
+       test -f $with_override_source_root/jdk/make/Makefile; then
+        as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
+    fi
+fi
+
+
+###############################################################################
+#
+# Override a repo completely, this is used for example when you have 3 small
+# development sandboxes of the langtools sources and want to avoid having 3 full
+# OpenJDK sources checked out on disk.
+#
+# Assuming that the 3 langtools sandboxes are located here:
+# /home/fredrik/sandbox1/langtools
+# /home/fredrik/sandbox2/langtools
+# /home/fredrik/sandbox3/langtools
+#
+# From the source root you create build subdirs manually:
+#     mkdir -p build1 build2 build3
+# in each build directory run:
+#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
+#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
+#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
+#
+
+
+# Check whether --with-override-langtools was given.
+if test "${with_override_langtools+set}" = set; then :
+  withval=$with_override_langtools;
+fi
+
+
+
+# Check whether --with-override-corba was given.
+if test "${with_override_corba+set}" = set; then :
+  withval=$with_override_corba;
+fi
+
+
+
+# Check whether --with-override-jaxp was given.
+if test "${with_override_jaxp+set}" = set; then :
+  withval=$with_override_jaxp;
+fi
+
+
+
+# Check whether --with-override-jaxws was given.
+if test "${with_override_jaxws+set}" = set; then :
+  withval=$with_override_jaxws;
+fi
+
+
+
+# Check whether --with-override-hotspot was given.
+if test "${with_override_hotspot+set}" = set; then :
+  withval=$with_override_hotspot;
+fi
+
+
+
+# Check whether --with-override-jdk was given.
+if test "${with_override_jdk+set}" = set; then :
+  withval=$with_override_jdk;
+fi
+
+
+if test "x$with_override_langtools" != x; then
+    CURDIR="$PWD"
+    cd "$with_override_langtools"
+    LANGTOOLS_TOPDIR="`pwd`"
+    cd "$CURDIR"
+    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
+        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
+$as_echo_n "checking if langtools should be overridden... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
+$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
+fi
+if test "x$with_override_corba" != x; then
+    CURDIR="$PWD"
+    cd "$with_override_corba"
+    CORBA_TOPDIR="`pwd`"
+    cd "$CURDIR"
+    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
+        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
+$as_echo_n "checking if corba should be overridden... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
+$as_echo "yes with $CORBA_TOPDIR" >&6; }
+fi
+if test "x$with_override_jaxp" != x; then
+    CURDIR="$PWD"
+    cd "$with_override_jaxp"
+    JAXP_TOPDIR="`pwd`"
+    cd "$CURDIR"
+    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
+        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
+$as_echo_n "checking if jaxp should be overridden... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
+$as_echo "yes with $JAXP_TOPDIR" >&6; }
+fi
+if test "x$with_override_jaxws" != x; then
+    CURDIR="$PWD"
+    cd "$with_override_jaxws"
+    JAXWS_TOPDIR="`pwd`"
+    cd "$CURDIR"
+    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
+        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
+$as_echo_n "checking if jaxws should be overridden... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
+$as_echo "yes with $JAXWS_TOPDIR" >&6; }
+fi
+if test "x$with_override_hotspot" != x; then
+    CURDIR="$PWD"
+    cd "$with_override_hotspot"
+    HOTSPOT_TOPDIR="`pwd`"
+    cd "$CURDIR"
+    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
+       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
+        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
+$as_echo_n "checking if hotspot should be overridden... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
+$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
+fi
+if test "x$with_override_jdk" != x; then
+    CURDIR="$PWD"
+    cd "$with_override_jdk"
+    JDK_TOPDIR="`pwd`"
+    cd "$CURDIR"
+    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
+        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
+$as_echo_n "checking if JDK should be overridden... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
+$as_echo "yes with $JDK_TOPDIR" >&6; }
+fi
+
+
+
+LANGTOOLS_OUTPUTDIR="$OUTPUT_ROOT/langtools"
+CORBA_OUTPUTDIR="$OUTPUT_ROOT/corba"
+JAXP_OUTPUTDIR="$OUTPUT_ROOT/jaxp"
+JAXWS_OUTPUTDIR="$OUTPUT_ROOT/jaxws"
+HOTSPOT_OUTPUTDIR="$OUTPUT_ROOT/hotspot"
+JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
+IMAGES_OUTPUTDIR="$OUTPUT_ROOT/images"
+
+
+
+
+
+
+
+
+
+LANGTOOLS_DIST="$OUTPUT_ROOT/langtools/dist"
+CORBA_DIST="$OUTPUT_ROOT/corba/dist"
+JAXP_DIST="$OUTPUT_ROOT/jaxp/dist"
+JAXWS_DIST="$OUTPUT_ROOT/jaxws/dist"
+HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
+
+
+
+
+
+
+
+
+###############################################################################
+#
+# Setup the toolchain (compilers etc), i.e. the tools that need to be
+# cross-compilation aware.
+#
+###############################################################################
+
+
+###############################################################################
+#
+# Configure the development tool paths and potential sysroot.
+#
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+DEVKIT=
+SYS_ROOT=/
+
+
+# The option used to specify the target .o,.a or .so file.
+# When compiling, how to specify the to be created object file.
+CC_OUT_OPTION='-o$(SPACE)'
+# When linking, how to specify the to be created executable.
+EXE_OUT_OPTION='-o$(SPACE)'
+# When linking, how to specify the to be created dynamically linkable library.
+LD_OUT_OPTION='-o$(SPACE)'
+# When archiving, how to specify the to be create static archive for object files.
+AR_OUT_OPTION='rcs$(SPACE)'
+
+
+
+
+
+
+
+# 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.
+SETUPDEVENV="# No special vars"
+if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+    # If vcvarsall.bat has been run, then VCINSTALLDIR is set.
+    if test "x$VCINSTALLDIR" != x; then
+        # No further setup is needed. The build will happen from this kind
+        # of shell.
+        SETUPDEVENV="# This spec file expects that you are running bash from within a VS command prompt."
+        # Make sure to remind you, if you forget to run make from a cygwin bash shell
+        # that is spawned "bash -l" from a VS command prompt.
+        CHECK_FOR_VCINSTALLDIR=yes
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if you are running from within a VS command prompt" >&5
+$as_echo_n "checking if you are running from within a VS command prompt... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+    else
+        # Ah, we have not yet run vcvarsall.bat/vsvars32.bat/vsvars64.bat. Lets do that. First find it.
+        if test "x$VS100COMNTOOLS" != x; then
+            VARSBAT=`find "$VS100COMNTOOLS/../.." -name vcvarsall.bat`
+	    SEARCH_ROOT="$VS100COMNTOOLS"
+        else
+            VARSBAT=`find "$PROGRAMFILES" -name vcvarsall.bat`
+	    SEARCH_ROOT="$PROGRAMFILES"
+        fi
+        VCPATH=`dirname "$VARSBAT"`
+        VCPATH=`cygpath -w "$VCPATH"`
+	if test "x$VARSBAT" = x || test ! -d "$VCPATH"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can find the VS installation" >&5
+$as_echo_n "checking if we can find the VS installation... " >&6; }
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+            as_fn_error $? "Tried to find a VS installation using both $SEARCH_ROOT but failed. Please run \"c:\\cygwin\\bin\\bash.exe -l\" from a VS command prompt and then run configure/make from there." "$LINENO" 5
+        fi
+        case "$LEGACY_OPENJDK_TARGET_CPU1" in
+          i?86)
+            VARSBAT_ARCH=x86
+            ;;
+          *)
+            VARSBAT_ARCH=$LEGACY_OPENJDK_TARGET_CPU1
+            ;;
+        esac
+        # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
+        cd $OUTPUT_ROOT
+        bash $SRC_ROOT/common/bin/extractvcvars.sh "$VARSBAT" "$VARSBAT_ARCH"
+	cd $CURDIR
+	if test ! -s $OUTPUT_ROOT/localdevenv.sh || test ! -s $OUTPUT_ROOT/localdevenv.gmk; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can extract the needed env variables" >&5
+$as_echo_n "checking if we can extract the needed env variables... " >&6; }
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+            as_fn_error $? "Could not succesfully extract the env variables needed for the VS setup. Please run \"c:\\cygwin\\bin\\bash.exe -l\" from a VS command prompt and then run configure/make from there." "$LINENO" 5
+        fi
+        # Now set all paths and other env variables. This will allow the rest of
+        # the configure script to find and run the compiler in the proper way.
+        . $OUTPUT_ROOT/localdevenv.sh
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can find the VS installation" >&5
+$as_echo_n "checking if we can find the VS installation... " >&6; }
+	if test "x$VCINSTALLDIR" != x; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VCINSTALLDIR" >&5
+$as_echo "$VCINSTALLDIR" >&6; }
+        else
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+            as_fn_error $? "Could not find VS installation. Please install. If you are sure you have installed VS, then please run \"c:\\cygwin\\bin\\bash.exe -l\" from a VS command prompt and then run configure/make from there." "$LINENO" 5
+        fi
+        CHECK_FOR_VCINSTALLDIR=no
+	SETUPDEVENV="include $OUTPUT_ROOT/localdevenv.gmk"
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
+$as_echo_n "checking for msvcr100.dll... " >&6; }
+
+# Check whether --with-msvcr100dll was given.
+if test "${with_msvcr100dll+set}" = set; then :
+  withval=$with_msvcr100dll;
+fi
+
+        if test "x$with_msvcr100dll" != x; then
+            MSVCR100DLL="$with_msvcr100dll"
+        else
+            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+                MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x64 | head --lines 1`
+            else
+                MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
+                if test "x$MSVCR100DLL" = x; then
+                    MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | head --lines 1`
+                fi
+            fi
+        fi
+	if test "x$MSVCR100DLL" = x; then
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	   as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
+        fi
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR100DLL" >&5
+$as_echo "$MSVCR100DLL" >&6; }
+
+    # Fail with message the path to msvcr100.dll if var MSVCR100DLL contains a path with no spaces in it.
+    # Unless on Windows, where we can rewrite the path.
+    HAS_SPACE=`echo "$MSVCR100DLL" | grep " "`
+    if test "x$HAS_SPACE" != x; then
+        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+            MSVCR100DLL=`$CYGPATH -s -m -a "$MSVCR100DLL"`
+            MSVCR100DLL=`$CYGPATH -u "$MSVCR100DLL"`
+        else
+            as_fn_error $? "You cannot have spaces in the path to msvcr100.dll! \"$MSVCR100DLL\"" "$LINENO" 5
+        fi
+    fi
+
+    fi
+fi
+
+
+
+
+# Locate the actual tools
+
+# If --build AND --host is set, then the configure script will find any
+# cross compilation tools in the PATH. Cross compilation tools
+# follows the cross compilation standard where they are prefixed with ${host}.
+# For example the binary i686-sun-solaris2.10-gcc
+# will cross compile for i686-sun-solaris2.10
+# If neither of build and host is not set, then build=host and the
+# default compiler found in the path will be used.
+# Setting only --host, does not seem to be really supported.
+# Please set both --build and --host if you want to cross compile.
+
+DEFINE_CROSS_COMPILE_ARCH=""
+HOSTCC=""
+HOSTCXX=""
+HOSTLD=""
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if this is a cross compile" >&5
+$as_echo_n "checking if this is a cross compile... " >&6; }
+if test "x$OPENJDK_BUILD_SYSTEM" != "x$OPENJDK_TARGET_SYSTEM"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, from $OPENJDK_BUILD_SYSTEM to $OPENJDK_TARGET_SYSTEM" >&5
+$as_echo "yes, from $OPENJDK_BUILD_SYSTEM to $OPENJDK_TARGET_SYSTEM" >&6; }
+    # We have detected a cross compile!
+    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$LEGACY_OPENJDK_TARGET_CPU1"
+    # Now we to find a C/C++ compiler that can build executables for the build
+    # platform. We can't use the AC_PROG_CC macro, since it can only be used
+    # once.
+    for ac_prog in cl cc gcc
+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_HOSTCC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $HOSTCC in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_HOSTCC="$HOSTCC" # 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_HOSTCC="$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
+HOSTCC=$ac_cv_path_HOSTCC
+if test -n "$HOSTCC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HOSTCC" >&5
+$as_echo "$HOSTCC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$HOSTCC" && break
+done
+
+
+    # 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="$HOSTCC"
+    car="${tmp%% *}"
+    tmp="$HOSTCC 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
+        HOSTCC="$car ${cdr% *}"
+    else
+        HOSTCC="$car"
+    fi
+
+    for ac_prog in cl CC g++
+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_HOSTCXX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $HOSTCXX in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_HOSTCXX="$HOSTCXX" # 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_HOSTCXX="$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
+HOSTCXX=$ac_cv_path_HOSTCXX
+if test -n "$HOSTCXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HOSTCXX" >&5
+$as_echo "$HOSTCXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$HOSTCXX" && break
+done
+
+
+    # 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="$HOSTCXX"
+    car="${tmp%% *}"
+    tmp="$HOSTCXX 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
+        HOSTCXX="$car ${cdr% *}"
+    else
+        HOSTCXX="$car"
+    fi
+
+    # Extract the first word of "ld", so it can be a program name with args.
+set dummy ld; 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_HOSTLD+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $HOSTLD in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_HOSTLD="$HOSTLD" # 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_HOSTLD="$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
+HOSTLD=$ac_cv_path_HOSTLD
+if test -n "$HOSTLD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HOSTLD" >&5
+$as_echo "$HOSTLD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # 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="$HOSTLD"
+    car="${tmp%% *}"
+    tmp="$HOSTLD 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
+        HOSTLD="$car ${cdr% *}"
+    else
+        HOSTLD="$car"
+    fi
+
+    # Building for the build platform should be easy. Therefore
+    # we do not need any linkers or assemblers etc.
+else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+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
+fi
+
+# If a devkit is found on the builddeps server, then prepend its path to the
+# PATH variable. If there are cross compilers available in the devkit, these
+# will be found by AC_PROG_CC et al.
+
+
+    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
+        # Source the builddeps file again, to make sure it uses the latest variables!
+        . $builddepsfile
+        # Look for a target and build machine specific resource!
+        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
+        if test "x$resource" = x; then
+            # Ok, lets instead look for a target specific resource
+            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
+        fi
+        if test "x$resource" = x; then
+            # Ok, lets instead look for a build specific resource
+            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
+        fi
+        if test "x$resource" = x; then
+            # Ok, lets instead look for a generic resource
+            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
+            resource=${builddep_devkit}
+        fi
+        if test "x$resource" != x; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
+$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
+	    # If the resource in the builddeps.conf file is an existing directory,
+	    # for example /java/linux/cups
+	    if test -d ${resource}; then
+	       depdir=${resource}
+	    else
+
+# devkit is for example mymodule
+# $resource is for example libs/general/libmymod_1_2_3.zip
+# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
+# $with_builddeps_dir is for example /localhome/builddeps
+# depdir is the name of the variable into which we store the depdir, eg MYMOD
+# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
+# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
+    filename=`basename $resource`
+    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
+    filebase=${filename%%.*}
+    extension=${filename#*.}
+    installdir=$with_builddeps_dir/$filebase
+    if test ! -f $installdir/$filename.unpacked; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
+$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
+        if test ! -d $installdir; then
+            mkdir -p $installdir
+        fi
+        if test ! -d $installdir; then
+            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
+        fi
+        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
+        touch $tmpfile
+        if test ! -f $tmpfile; then
+            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
+        fi
+
+    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
+    # $tmpfile is the local file name for the downloaded file.
+    VALID_TOOL=no
+    if test "x$BDEPS_FTP" = xwget; then
+       VALID_TOOL=yes
+       wget -O $tmpfile $with_builddeps_server/$resource
+    fi
+    if test "x$BDEPS_FTP" = xlftp; then
+       VALID_TOOL=yes
+       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
+    fi
+    if test "x$BDEPS_FTP" = xftp; then
+        VALID_TOOL=yes
+        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
+        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
+        FTPUSERPWD=${FTPSERVER%%@*}
+        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
+            FTPUSER=${userpwd%%:*}
+            FTPPWD=${userpwd#*@}
+            FTPSERVER=${FTPSERVER#*@}
+        else
+            FTPUSER=ftp
+            FTPPWD=ftp
+        fi
+        # the "pass" command does not work on some
+        # ftp clients (read ftp.exe) but if it works,
+        # passive mode is better!
+        (\
+            echo "user $FTPUSER $FTPPWD"        ;\
+            echo "pass"                         ;\
+            echo "bin"                          ;\
+            echo "get $FTPPATH $tmpfile"              ;\
+        ) | ftp -in $FTPSERVER
+    fi
+    if test "x$VALID_TOOL" != xyes; then
+       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
+    fi
+
+        mv $tmpfile $installdir/$filename
+        if test ! -s $installdir/$filename; then
+            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
+        fi
+        case "$extension" in
+            zip)  echo "Unzipping $installdir/$filename..."
+               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
+            ;;
+            tar.gz) echo "Untaring $installdir/$filename..."
+               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
+            ;;
+            tgz) echo "Untaring $installdir/$filename..."
+               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
+            ;;
+            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
+            ;;
+        esac
+    fi
+    if test -f $installdir/$filename.unpacked; then
+        depdir=$installdir
+    fi
+
+	    fi
+            # Source the builddeps file again, because in the previous command, the depdir
+            # was updated to point at the current build dependency install directory.
+            . $builddepsfile
+            # Now extract variables from the builddeps.conf files.
+            theroot=${builddep_devkit_ROOT}
+            thecflags=${builddep_devkit_CFLAGS}
+            thelibs=${builddep_devkit_LIBS}
+            if test "x$depdir" = x; then
+                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
+            fi
+            DEVKIT=$depdir
+            if test "x$theroot" != x; then
+               DEVKIT="$theroot"
+            fi
+            if test "x$thecflags" != x; then
+               DEVKIT_CFLAGS="$thecflags"
+            fi
+            if test "x$thelibs" != x; then
+               DEVKIT_LIBS="$thelibs"
+            fi
+            # Found devkit
+                     PATH="$DEVKIT/bin:$PATH"
+                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
+                     if test "x$x_includes" = "xNONE"; then
+                         x_includes="$SYS_ROOT/usr/include/X11"
+                     fi
+                     if test "x$x_libraries" = "xNONE"; then
+                         x_libraries="$SYS_ROOT/usr/lib"
+                     fi
+
+
+        fi
+
+    fi
+
+
+if test "x$SYS_ROOT" != "x/" ; then
+    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
+    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
+    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
+    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
+    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
+    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
+fi
+
+# Store the CFLAGS etal passed to the configure script.
+ORG_CFLAGS="$CFLAGS"
+ORG_CXXFLAGS="$CXXFLAGS"
+ORG_OBJCFLAGS="$OBJCFLAGS"
+
+
+# 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
+
+
+# autoconf magic only relies on PATH, so update it if tools dir is specified
+OLD_PATH="$PATH"
+if test "x$TOOLS_DIR" != x; then
+  PATH=$TOOLS_DIR:$PATH
+fi
+
+# gcc is almost always present, but on Windows we
+# prefer cl.exe and on Solaris we prefer CC.
+# Thus test for them in this order.
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl cc gcc
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$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_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # 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_CC="$ac_tool_prefix$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
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl cc gcc
+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_ac_ct_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # 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_ac_ct_CC="$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
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  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
+    CC=$ac_ct_CC
+  fi
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5 ; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+	then :; else
+	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	fi
+	# We set ac_cv_exeext here because the later test for it is not
+	# safe: cross compilers may not add the suffix if given an `-o'
+	# argument, so we may need to know it at that point already.
+	# Even if this section looks crufty: it has the advantage of
+	# actually working.
+	break;;
+    * )
+	break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+  ac_file=''
+fi
+if test -z "$ac_file"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5 ; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  break;;
+    * ) break;;
+  esac
+done
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5 ; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+  { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+  if { ac_try='./conftest$ac_cv_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5 ; }
+    fi
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if test "${ac_cv_objext+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5 ; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+if test "x$CC" = x; then
+
+    # Print a helpful message on how to acquire the necessary build dependency.
+    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
+    MISSING_DEPENDENCY=devkit
+    PKGHANDLER_COMMAND=
+
+    case $PKGHANDLER in
+	apt-get)
+                apt_help     $MISSING_DEPENDENCY ;;
+    yum)
+                yum_help     $MISSING_DEPENDENCY ;;
+	port)
+                port_help    $MISSING_DEPENDENCY ;;
+	pkgutil)
+                pkgutil_help $MISSING_DEPENDENCY ;;
+	pkgadd)
+                pkgadd_help  $MISSING_DEPENDENCY ;;
+    * )
+      break ;;
+    esac
+
+    if test "x$PKGHANDLER_COMMAND" != x; then
+        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+    fi
+
+    as_fn_error $? "Could not find a compiler. $HELP_MSG" "$LINENO" 5
+fi
+if test "x$CC" = xcc && test "x$OPENJDK_BUILD_OS" = xmacosx; then
+    # Do not use cc on MacOSX use gcc instead.
+    CC="gcc"
+fi
+
+    # 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="$CC"
+    car="${tmp%% *}"
+    tmp="$CC 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
+        CC="$car ${cdr% *}"
+    else
+        CC="$car"
+    fi
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl CC g++
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$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_CXX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # 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_CXX="$ac_tool_prefix$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
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in cl CC g++
+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_ac_ct_CXX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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_ac_ct_CXX="$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
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CXX" && break
+done
+
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  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
+    CXX=$ac_ct_CXX
+  fi
+fi
+
+  fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GXX=yes
+else
+  GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if test "${ac_cv_prog_cxx_g+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+else
+  CXXFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+if test "x$CXX" = xCC && test "x$OPENJDK_BUILD_OS" = xmacosx; then
+    # The found CC, even though it seems to be a g++ derivate, cannot compile
+    # c++ code. Override.
+    CXX="g++"
+fi
+
+    # 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="$CXX"
+    car="${tmp%% *}"
+    tmp="$CXX 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
+        CXX="$car ${cdr% *}"
+    else
+        CXX="$car"
+    fi
+
+
+if test "x$CXX" = x || test "x$CC" = x; then
+
+    # Print a helpful message on how to acquire the necessary build dependency.
+    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
+    MISSING_DEPENDENCY=devkit
+    PKGHANDLER_COMMAND=
+
+    case $PKGHANDLER in
+	apt-get)
+                apt_help     $MISSING_DEPENDENCY ;;
+    yum)
+                yum_help     $MISSING_DEPENDENCY ;;
+	port)
+                port_help    $MISSING_DEPENDENCY ;;
+	pkgutil)
+                pkgutil_help $MISSING_DEPENDENCY ;;
+	pkgadd)
+                pkgadd_help  $MISSING_DEPENDENCY ;;
+    * )
+      break ;;
+    esac
+
+    if test "x$PKGHANDLER_COMMAND" != x; then
+        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+    fi
+
+    as_fn_error $? "Could not find the needed compilers! $HELP_MSG " "$LINENO" 5
+fi
+
+if test "x$OPENJDK_BUILD_OS" != xwindows; then
+    ac_ext=m
+ac_cpp='$OBJCPP $CPPFLAGS'
+ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_objc_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in gcc objcc objc cc CC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$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_OBJC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OBJC"; then
+  ac_cv_prog_OBJC="$OBJC" # 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_OBJC="$ac_tool_prefix$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
+OBJC=$ac_cv_prog_OBJC
+if test -n "$OBJC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
+$as_echo "$OBJC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$OBJC" && break
+  done
+fi
+if test -z "$OBJC"; then
+  ac_ct_OBJC=$OBJC
+  for ac_prog in gcc objcc objc cc CC
+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_ac_ct_OBJC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OBJC"; then
+  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # 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_ac_ct_OBJC="$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
+ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
+if test -n "$ac_ct_OBJC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
+$as_echo "$ac_ct_OBJC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_OBJC" && break
+done
+
+  if test "x$ac_ct_OBJC" = x; then
+    OBJC="gcc"
+  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
+    OBJC=$ac_ct_OBJC
+  fi
+fi
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
+$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
+if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_objc_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_objc_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
+$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GOBJC=yes
+else
+  GOBJC=
+fi
+ac_test_OBJCFLAGS=${OBJCFLAGS+set}
+ac_save_OBJCFLAGS=$OBJCFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
+$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
+if test "${ac_cv_prog_objc_g+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_objc_werror_flag=$ac_objc_werror_flag
+   ac_objc_werror_flag=yes
+   ac_cv_prog_objc_g=no
+   OBJCFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_objc_try_compile "$LINENO"; then :
+  ac_cv_prog_objc_g=yes
+else
+  OBJCFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_objc_try_compile "$LINENO"; then :
+
+else
+  ac_objc_werror_flag=$ac_save_objc_werror_flag
+	 OBJCFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_objc_try_compile "$LINENO"; then :
+  ac_cv_prog_objc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_objc_werror_flag=$ac_save_objc_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
+$as_echo "$ac_cv_prog_objc_g" >&6; }
+if test "$ac_test_OBJCFLAGS" = set; then
+  OBJCFLAGS=$ac_save_OBJCFLAGS
+elif test $ac_cv_prog_objc_g = yes; then
+  if test "$GOBJC" = yes; then
+    OBJCFLAGS="-g -O2"
+  else
+    OBJCFLAGS="-g"
+  fi
+else
+  if test "$GOBJC" = yes; then
+    OBJCFLAGS="-O2"
+  else
+    OBJCFLAGS=
+  fi
+fi
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+    # 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="$OBJC"
+    car="${tmp%% *}"
+    tmp="$OBJC 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
+        OBJC="$car ${cdr% *}"
+    else
+        OBJC="$car"
+    fi
+
+else
+    OBJC=
+fi
+
+# Restore the flags to the user specified values.
+# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
+CFLAGS="$ORG_CFLAGS"
+CXXFLAGS="$ORG_CXXFLAGS"
+OBJCFLAGS="$ORG_OBJCFLAGS"
+
+# If we are not cross compiling, use the same compilers for
+# building the build platform executables.
+if test "x$DEFINE_CROSS_COMPILE_ARCH" = x; then
+    HOSTCC="$CC"
+    HOSTCXX="$CXX"
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ld; 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_LD+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$LD"; then
+  ac_cv_prog_LD="$LD" # 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_LD="${ac_tool_prefix}ld"
+    $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
+LD=$ac_cv_prog_LD
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LD"; then
+  ac_ct_LD=$LD
+  # Extract the first word of "ld", so it can be a program name with args.
+set dummy ld; 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_ac_ct_LD+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_LD"; then
+  ac_cv_prog_ac_ct_LD="$ac_ct_LD" # 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_ac_ct_LD="ld"
+    $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
+ac_ct_LD=$ac_cv_prog_ac_ct_LD
+if test -n "$ac_ct_LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LD" >&5
+$as_echo "$ac_ct_LD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_LD" = x; then
+    LD=""
+  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
+    LD=$ac_ct_LD
+  fi
+else
+  LD="$ac_cv_prog_LD"
+fi
+
+
+    # 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="$LD"
+    car="${tmp%% *}"
+    tmp="$LD 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
+        LD="$car ${cdr% *}"
+    else
+        LD="$car"
+    fi
+
+LD="$CC"
+LDEXE="$CC"
+LDCXX="$CXX"
+LDEXECXX="$CXX"
+# LDEXE is the linker to use, when creating executables.
+
+# Linking C++ libraries.
+
+# Linking C++ executables.
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; 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_AR+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # 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_AR="${ac_tool_prefix}ar"
+    $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
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; 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_ac_ct_AR+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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_ac_ct_AR="ar"
+    $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
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_AR" = x; then
+    AR=""
+  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
+    AR=$ac_ct_AR
+  fi
+else
+  AR="$ac_cv_prog_AR"
+fi
+
+
+    # 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="$AR"
+    car="${tmp%% *}"
+    tmp="$AR 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
+        AR="$car ${cdr% *}"
+    else
+        AR="$car"
+    fi
+
+if test "x$OPENJDK_BUILD_OS" = xmacosx; then
+    ARFLAGS="-r"
+else
+    ARFLAGS=""
+fi
+
+
+COMPILER_NAME=gcc
+COMPILER_TYPE=CC
+if test "x$OPENJDK_BUILD_OS" = xwindows; then :
+
+    # For now, assume that we are always compiling using cl.exe.
+    CC_OUT_OPTION=-Fo
+    EXE_OUT_OPTION=-out:
+    LD_OUT_OPTION=-out:
+    AR_OUT_OPTION=-out:
+    # On Windows, reject /usr/bin/link, which is a cygwin
+    # program for something completely different.
+    # Extract the first word of "link", so it can be a program name with args.
+set dummy link; 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_WINLD+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$WINLD"; then
+  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
+else
+  ac_prog_rejected=no
+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
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/link"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_WINLD="link"
+    $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
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_WINLD
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set WINLD to just the basename; use the full file name.
+    shift
+    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+WINLD=$ac_cv_prog_WINLD
+if test -n "$WINLD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
+$as_echo "$WINLD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    # Since we must ignore the first found link, WINLD will contain
+    # the full path to the link.exe program.
+
+    # Translate long cygdrive or C:\sdfsf path
+    # into a short mixed mode path that has no
+    # spaces in it.
+    tmp="$WINLD"
+
+    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+        tmp=`$CYGPATH -u "$WINLD"`
+        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
+    WINLD="$tmp"
+
+    LD="$WINLD"
+    LDEXE="$WINLD"
+    LDCXX="$WINLD"
+    LDEXECXX="$WINLD"
+    # Set HOSTLD to same as LD until we fully support cross compilation
+    # on windows.
+    HOSTLD="$WINLD"
+
+    # Extract the first word of "mt", so it can be a program name with args.
+set dummy mt; 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_MT+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$MT"; then
+  ac_cv_prog_MT="$MT" # Let the user override the test.
+else
+  ac_prog_rejected=no
+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
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_MT="mt"
+    $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
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_MT
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set MT to just the basename; use the full file name.
+    shift
+    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+MT=$ac_cv_prog_MT
+if test -n "$MT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
+$as_echo "$MT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Translate long cygdrive or C:\sdfsf path
+    # into a short mixed mode path that has no
+    # spaces in it.
+    tmp="$MT"
+
+    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+        tmp=`$CYGPATH -u "$MT"`
+        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
+    MT="$tmp"
+
+    # The resource compiler
+    # Extract the first word of "rc", so it can be a program name with args.
+set dummy rc; 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_RC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RC"; then
+  ac_cv_prog_RC="$RC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+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
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_RC="rc"
+    $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
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_RC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set RC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+RC=$ac_cv_prog_RC
+if test -n "$RC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
+$as_echo "$RC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Translate long cygdrive or C:\sdfsf path
+    # into a short mixed mode path that has no
+    # spaces in it.
+    tmp="$RC"
+
+    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+        tmp=`$CYGPATH -u "$RC"`
+        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
+    RC="$tmp"
+
+
+    RC_FLAGS="-nologo /l 0x409 /r"
+    if test "x$VARIANT" = xOPT; then :
+
+        RC_FLAGS="$RC_FLAGS -d NDEBUG"
+
+fi
+    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
+    if test "x$JDK_UPDATE_VERSION" = x; then :
+
+        JDK_UPDATE_VERSION_NOTNULL=0
+
+fi
+    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
+    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
+    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
+    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
+    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
+    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
+    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
+
+    # lib.exe is used to create static libraries.
+    # Extract the first word of "lib", so it can be a program name with args.
+set dummy lib; 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_WINAR+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$WINAR"; then
+  ac_cv_prog_WINAR="$WINAR" # 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_WINAR="lib"
+    $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
+WINAR=$ac_cv_prog_WINAR
+if test -n "$WINAR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
+$as_echo "$WINAR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Translate long cygdrive or C:\sdfsf path
+    # into a short mixed mode path that has no
+    # spaces in it.
+    tmp="$WINAR"
+
+    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+        tmp=`$CYGPATH -u "$WINAR"`
+        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
+    WINAR="$tmp"
+
+    AR="$WINAR"
+    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
+
+    # Extract the first word of "dumpbin", so it can be a program name with args.
+set dummy dumpbin; 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_DUMPBIN+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DUMPBIN"; then
+  ac_cv_prog_DUMPBIN="$DUMPBIN" # 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_DUMPBIN="dumpbin"
+    $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
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # Translate long cygdrive or C:\sdfsf path
+    # into a short mixed mode path that has no
+    # spaces in it.
+    tmp="$DUMPBIN"
+
+    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+        tmp=`$CYGPATH -u "$DUMPBIN"`
+        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
+    DUMPBIN="$tmp"
+
+
+    COMPILER_TYPE=CL
+    CCXXFLAGS="$CCXXFLAGS -nologo"
+
+fi
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5 ; }
+fi
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+    # 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="$CPP"
+    car="${tmp%% *}"
+    tmp="$CPP 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
+        CPP="$car ${cdr% *}"
+    else
+        CPP="$car"
+    fi
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
+$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
+if test -z "$CXXCPP"; then
+  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+  break
+fi
+
+    done
+    ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
+$as_echo "$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5 ; }
+fi
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+    # 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="$CXXCPP"
+    car="${tmp%% *}"
+    tmp="$CXXCPP 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
+        CXXCPP="$car ${cdr% *}"
+    else
+        CXXCPP="$car"
+    fi
+
+
+# for solaris we really need solaris tools, and not gnu equivalent
+#   these seems to normally reside in /usr/ccs/bin so add that to path before
+#   starting to probe
+#
+#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
+#         so that it can be overriden --with-tools-dir
+if test "x$OPENJDK_BUILD_OS" = xsolaris; then
+    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
+fi
+
+# Find the right assembler.
+if test "x$OPENJDK_BUILD_OS" = xsolaris; then
+    # Extract the first word of "as", so it can be a program name with args.
+set dummy as; 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_AS+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $AS in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_AS="$AS" # 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_AS="$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
+AS=$ac_cv_path_AS
+if test -n "$AS"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+$as_echo "$AS" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # 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="$AS"
+    car="${tmp%% *}"
+    tmp="$AS 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
+        AS="$car ${cdr% *}"
+    else
+        AS="$car"
+    fi
+
+    ASFLAGS=" "
+else
+    AS="$CC -c"
+    ASFLAGS=" "
+fi
+
+
+
+if test "x$OPENJDK_BUILD_OS" = xsolaris; then
+    # Extract the first word of "nm", so it can be a program name with args.
+set dummy nm; 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_NM+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $NM in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_NM="$NM" # 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_NM="$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
+NM=$ac_cv_path_NM
+if test -n "$NM"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
+$as_echo "$NM" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # 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="$NM"
+    car="${tmp%% *}"
+    tmp="$NM 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
+        NM="$car ${cdr% *}"
+    else
+        NM="$car"
+    fi
+
+    # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; 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_STRIP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $STRIP in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_STRIP="$STRIP" # 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_STRIP="$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
+STRIP=$ac_cv_path_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # 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="$STRIP"
+    car="${tmp%% *}"
+    tmp="$STRIP 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
+        STRIP="$car ${cdr% *}"
+    else
+        STRIP="$car"
+    fi
+
+    # Extract the first word of "mcs", so it can be a program name with args.
+set dummy mcs; 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_MCS+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $MCS in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MCS="$MCS" # 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_MCS="$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
+MCS=$ac_cv_path_MCS
+if test -n "$MCS"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
+$as_echo "$MCS" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+    # 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="$MCS"
+    car="${tmp%% *}"
+    tmp="$MCS 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
+        MCS="$car ${cdr% *}"
+    else
+        MCS="$car"
+    fi
+
+else
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nm; 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_NM+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$NM"; then
+  ac_cv_prog_NM="$NM" # 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_NM="${ac_tool_prefix}nm"
+    $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
+NM=$ac_cv_prog_NM
+if test -n "$NM"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
+$as_echo "$NM" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_NM"; then
+  ac_ct_NM=$NM
+  # Extract the first word of "nm", so it can be a program name with args.
+set dummy nm; 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_ac_ct_NM+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_NM"; then
+  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # 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_ac_ct_NM="nm"
+    $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
+ac_ct_NM=$ac_cv_prog_ac_ct_NM
+if test -n "$ac_ct_NM"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
+$as_echo "$ac_ct_NM" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_NM" = x; then
+    NM=""
+  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
+    NM=$ac_ct_NM
+  fi
+else
+  NM="$ac_cv_prog_NM"
+fi
+
+
+    # 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="$NM"
+    car="${tmp%% *}"
+    tmp="$NM 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
+        NM="$car ${cdr% *}"
+    else
+        NM="$car"
+    fi
+
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; 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_STRIP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip"
+    $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
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; 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_ac_ct_STRIP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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_ac_ct_STRIP="strip"
+    $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
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=""
+  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
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+
+    # 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="$STRIP"
+    car="${tmp%% *}"
+    tmp="$STRIP 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
+        STRIP="$car ${cdr% *}"
+    else
+        STRIP="$car"
+    fi
+
+fi
+
+###
+#
+# Check for objcopy
+#
+#   but search for gobjcopy first...
+#   since I on solaris found a broken objcopy...buhh
+#
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gobjcopy", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gobjcopy; 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_OBJCOPY+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $OBJCOPY in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_OBJCOPY="$OBJCOPY" # 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_OBJCOPY="$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
+OBJCOPY=$ac_cv_path_OBJCOPY
+if test -n "$OBJCOPY"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
+$as_echo "$OBJCOPY" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_OBJCOPY"; then
+  ac_pt_OBJCOPY=$OBJCOPY
+  # Extract the first word of "gobjcopy", so it can be a program name with args.
+set dummy gobjcopy; 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_OBJCOPY+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_OBJCOPY in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_OBJCOPY="$ac_pt_OBJCOPY" # 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_OBJCOPY="$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_OBJCOPY=$ac_cv_path_ac_pt_OBJCOPY
+if test -n "$ac_pt_OBJCOPY"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_OBJCOPY" >&5
+$as_echo "$ac_pt_OBJCOPY" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_OBJCOPY" = x; then
+    OBJCOPY=""
+  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
+    OBJCOPY=$ac_pt_OBJCOPY
+  fi
+else
+  OBJCOPY="$ac_cv_path_OBJCOPY"
+fi
+
+if test "x$OBJCOPY" = x; then
+   if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}objcopy", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objcopy; 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_OBJCOPY+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $OBJCOPY in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_OBJCOPY="$OBJCOPY" # 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_OBJCOPY="$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
+OBJCOPY=$ac_cv_path_OBJCOPY
+if test -n "$OBJCOPY"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
+$as_echo "$OBJCOPY" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_OBJCOPY"; then
+  ac_pt_OBJCOPY=$OBJCOPY
+  # Extract the first word of "objcopy", so it can be a program name with args.
+set dummy objcopy; 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_OBJCOPY+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_OBJCOPY in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_OBJCOPY="$ac_pt_OBJCOPY" # 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_OBJCOPY="$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_OBJCOPY=$ac_cv_path_ac_pt_OBJCOPY
+if test -n "$ac_pt_OBJCOPY"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_OBJCOPY" >&5
+$as_echo "$ac_pt_OBJCOPY" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_OBJCOPY" = x; then
+    OBJCOPY=""
+  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
+    OBJCOPY=$ac_pt_OBJCOPY
+  fi
+else
+  OBJCOPY="$ac_cv_path_OBJCOPY"
+fi
+
+fi
+
+# Restore old path without tools dir
+PATH="$OLD_PATH"
+
+
+# FIXME: Currently we must test this after paths but before flags. Fix!
+
+# And we can test some aspects on the target using configure macros.
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_run "$LINENO"; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+###############################################################################
+#
+# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
+# (The JVM can use 32 or 64 bit Java pointers but that decision
+# is made at runtime.)
+#
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+OLD_CXXFLAGS="$CXXFLAGS"
+if test "x$OPENJDK_TARGET_OS" != xwindows && test "x$with_target_bits" != x; then
+	CXXFLAGS="-m${with_target_bits} $CXXFLAGS"
+fi
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
+$as_echo_n "checking size of int *... " >&6; }
+if test "${ac_cv_sizeof_int_p+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
+
+else
+  if test "$ac_cv_type_int_p" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (int *)
+See \`config.log' for more details" "$LINENO" 5 ; }
+   else
+     ac_cv_sizeof_int_p=0
+   fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
+$as_echo "$ac_cv_sizeof_int_p" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INT_P $ac_cv_sizeof_int_p
+_ACEOF
+
+
+CXXFLAGS="$OLD_CXXFLAGS"
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+# keep track of c/cxx flags that we added outselves...
+#   to prevent emitting warning...
+ADDED_CFLAGS=
+ADDED_CXXFLAGS=
+ADDED_LDFLAGS=
+
+if test "x$ac_cv_sizeof_int_p" = x0; then
+    # The test failed, lets pick the assumed value.
+    ARCH_DATA_MODEL=$OPENJDK_TARGET_CPU_BITS
+else
+    ARCH_DATA_MODEL=`expr 8 \* $ac_cv_sizeof_int_p`
+
+    if test "x$OPENJDK_TARGET_OS" != xwindows && test "x$with_target_bits" != x; then
+       ADDED_CFLAGS=" -m${with_target_bits}"
+       ADDED_CXXFLAGS=" -m${with_target_bits}"
+       ADDED_LDFLAGS=" -m${with_target_bits}"
+
+       CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
+       CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
+       LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
+
+       CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
+       CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
+       LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
+    fi
+fi
+
+if test "x$ARCH_DATA_MODEL" = x64; then
+    A_LP64="LP64:="
+    ADD_LP64="-D_LP64=1"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
+$as_echo_n "checking for target address size... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARCH_DATA_MODEL bits" >&5
+$as_echo "$ARCH_DATA_MODEL bits" >&6; }
+LP64=$A_LP64
+
+
+
+if test "x$ARCH_DATA_MODEL" != "x$OPENJDK_TARGET_CPU_BITS"; then
+    as_fn_error $? "The tested number of bits in the target ($ARCH_DATA_MODEL) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)" "$LINENO" 5
+fi
+
+#
+# NOTE: check for -mstackrealign needs to be below potential addition of -m32
+#
+if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
+    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
+    # While waiting for a better solution, the current workaround is to use -mstackrealign.
+    CFLAGS="$CFLAGS -mstackrealign"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
+$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int main() { return 0; }
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; 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; }
+	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+###############################################################################
+#
+# Is the target little of big endian?
+#
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
+if test "${ac_cv_c_bigendian+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_bigendian=unknown
+    # See if we're dealing with a universal compiler.
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __APPLE_CC__
+	       not a universal capable compiler
+	     #endif
+	     typedef int dummy;
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+	# Check for potential -arch flags.  It is not universal unless
+	# there are at least two -arch flags with different values.
+	ac_arch=
+	ac_prev=
+	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+	 if test -n "$ac_prev"; then
+	   case $ac_word in
+	     i?86 | x86_64 | ppc | ppc64)
+	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+		 ac_arch=$ac_word
+	       else
+		 ac_cv_c_bigendian=universal
+		 break
+	       fi
+	       ;;
+	   esac
+	   ac_prev=
+	 elif test "x$ac_word" = "x-arch"; then
+	   ac_prev=arch
+	 fi
+       done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if sys/param.h defines the BYTE_ORDER macro.
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+	     #include <sys/param.h>
+
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+		     && LITTLE_ENDIAN)
+	      bogus endian macros
+	     #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+		#include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+		 not big endian
+		#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_c_bigendian=yes
+else
+  ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+	      bogus endian macros
+	     #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  # It does; now see whether it defined to _BIG_ENDIAN or not.
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+
+int
+main ()
+{
+#ifndef _BIG_ENDIAN
+		 not big endian
+		#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_c_bigendian=yes
+else
+  ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # Compile a test program.
+      if test "$cross_compiling" = yes; then :
+  # Try to guess by grepping values from an object file.
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+short int ascii_mm[] =
+		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+		short int ascii_ii[] =
+		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+		int use_ascii (int i) {
+		  return ascii_mm[i] + ascii_ii[i];
+		}
+		short int ebcdic_ii[] =
+		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+		short int ebcdic_mm[] =
+		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+		int use_ebcdic (int i) {
+		  return ebcdic_mm[i] + ebcdic_ii[i];
+		}
+		extern int foo;
+
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+	      ac_cv_c_bigendian=yes
+	    fi
+	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+	      if test "$ac_cv_c_bigendian" = unknown; then
+		ac_cv_c_bigendian=no
+	      else
+		# finding both strings is unlikely to happen, but who knows?
+		ac_cv_c_bigendian=unknown
+	      fi
+	    fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+
+	     /* Are we little or big endian?  From Harbison&Steele.  */
+	     union
+	     {
+	       long int l;
+	       char c[sizeof (long int)];
+	     } u;
+	     u.l = 1;
+	     return u.c[sizeof (long int) - 1] == 1;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_run "$LINENO"; then :
+  ac_cv_c_bigendian=no
+else
+  ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+    fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+$as_echo "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+   yes)
+     ENDIAN="big";; #(
+   no)
+     ENDIAN="little" ;; #(
+   universal)
+     ENDIAN="universal_endianness"
+     ;; #(
+   *)
+     ENDIAN="unknown" ;;
+ esac
+
+
+if test "x$ENDIAN" = xuniversal_endianness; then
+    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
+fi
+if test "x$ENDIAN" = xunknown; then
+    ENDIAN="$OPENJDK_TARGET_CPU_ENDIAN"
+fi
+if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)" >&5
+$as_echo "$as_me: WARNING: The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)" >&2;}
+    ENDIAN="$OPENJDK_TARGET_CPU_ENDIAN"
+fi
+
+
+
+# Configure flags for the tools
+
+
+###############################################################################
+#
+# How to compile shared libraries.
+#
+
+if test "x$GCC" = xyes; then
+    COMPILER_NAME=gcc
+    PICFLAG="-fPIC"
+    LIBRARY_PREFIX=lib
+    SHARED_LIBRARY='lib$1.so'
+    STATIC_LIBRARY='lib$1.a'
+    SHARED_LIBRARY_FLAGS="-shared"
+    SHARED_LIBRARY_SUFFIX='.so'
+    STATIC_LIBRARY_SUFFIX='.a'
+    OBJ_SUFFIX='.o'
+    EXE_SUFFIX=''
+    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
+    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
+    C_FLAG_REORDER=''
+    CXX_FLAG_REORDER=''
+    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN/$1'
+    LD="$CC"
+    LDEXE="$CC"
+    LDCXX="$CXX"
+    LDEXECXX="$CXX"
+    POST_STRIP_CMD="$STRIP -g"
+    if test "x$JDK_VARIANT" = xembedded; then
+        POST_STRIP_CMD="$STRIP --strip-unneeded"
+    fi
+
+    # Linking is different on MacOSX
+    if test "x$OPENJDK_BUILD_OS" = xmacosx; then
+        # Might change in the future to clang.
+        COMPILER_NAME=gcc
+        SHARED_LIBRARY='lib$1.dylib'
+        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
+        SHARED_LIBRARY_SUFFIX='.dylib'
+        EXE_SUFFIX=''
+        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
+        SET_SHARED_LIBRARY_MAPFILE=''
+        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
+        POST_STRIP_CMD="$STRIP -S"
+    fi
+else
+    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
+        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
+        COMPILER_NAME=ossc
+        PICFLAG="-KPIC"
+        LIBRARY_PREFIX=lib
+        SHARED_LIBRARY='lib$1.so'
+        STATIC_LIBRARY='lib$1.a'
+        SHARED_LIBRARY_FLAGS="-z defs -xildoff -ztext -G"
+        SHARED_LIBRARY_SUFFIX='.so'
+        STATIC_LIBRARY_SUFFIX='.a'
+        OBJ_SUFFIX='.o'
+        EXE_SUFFIX=''
+        SET_SHARED_LIBRARY_NAME=''
+        SET_SHARED_LIBRARY_MAPFILE='-M$1'
+	C_FLAG_REORDER='-xF'
+	CXX_FLAG_REORDER='-xF'
+        SET_SHARED_LIBRARY_ORIGIN='-R \$$$$ORIGIN/$1'
+        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
+        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
+        CFLAGS_JDKLIB_EXTRA='-xstrconst'
+        POST_STRIP_CMD="$STRIP -x"
+        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
+    fi
+    if test "x$OPENJDK_BUILD_OS" = xwindows; then
+        # If it is not gcc, then assume it is the MS Visual Studio compiler
+        COMPILER_NAME=cl
+        PICFLAG=""
+        LIBRARY_PREFIX=
+        SHARED_LIBRARY='$1.dll'
+        STATIC_LIBRARY='$1.lib'
+        SHARED_LIBRARY_FLAGS="-LD"
+        SHARED_LIBRARY_SUFFIX='.dll'
+        STATIC_LIBRARY_SUFFIX='.lib'
+        OBJ_SUFFIX='.obj'
+        EXE_SUFFIX='.exe'
+        SET_SHARED_LIBRARY_NAME=''
+        SET_SHARED_LIBRARY_MAPFILE=''
+        SET_SHARED_LIBRARY_ORIGIN=''
+    fi
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# The (cross) compiler is now configured, we can now test capabilities
+# of the target platform.
+
+
+
+###############################################################################
+#
+# Setup the opt flags for different compilers
+# and different operating systems.
+#
+C_FLAG_DEPS="-MMD -MF"
+CXX_FLAG_DEPS="-MMD -MF"
+
+case $COMPILER_TYPE in
+  CC )
+    D_FLAG="-g"
+    case $COMPILER_NAME in
+      gcc )
+      	case $OPENJDK_TARGET_OS in
+	  macosx )
+	    # On MacOSX we optimize for size, something
+	    # we should do for all platforms?
+	    C_O_FLAG_HI="-Os"
+	    C_O_FLAG_NORM="-Os"
+	    C_O_FLAG_NONE=""
+	    ;;
+	  *)
+	    C_O_FLAG_HI="-O3"
+	    C_O_FLAG_NORM="-O2"
+	    C_O_FLAG_NONE="-O0"
+	    CFLAGS_DEBUG_SYMBOLS="-g"
+	    CXXFLAGS_DEBUG_SYMBOLS="-g"
+	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
+	       CFLAGS_DEBUG_SYMBOLS="-g1"
+	       CXXFLAGS_DEBUG_SYMBOLSG="-g1"
+	    fi
+	    ;;
+	esac
+        CXX_O_FLAG_HI="$C_O_FLAG_HI"
+        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
+        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
+        ;;
+      ossc )
+        #
+        # Forte has different names for this with their C++ compiler...
+        #
+	C_FLAG_DEPS="-xMMD -xMF"
+	CXX_FLAG_DEPS="-xMMD -xMF"
+
+# Extra options used with HIGHEST
+#
+# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
+#          done with care, there are some assumptions below that need to
+#          be understood about the use of pointers, and IEEE behavior.
+#
+# Use non-standard floating point mode (not IEEE 754)
+CC_HIGHEST="$CC_HIGHEST -fns"
+# Do some simplification of floating point arithmetic (not IEEE 754)
+CC_HIGHEST="$CC_HIGHEST -fsimple"
+# Use single precision floating point with 'float'
+CC_HIGHEST="$CC_HIGHEST -fsingle"
+# Assume memory references via basic pointer types do not alias
+#   (Source with excessing pointer casting and data access with mixed
+#    pointer types are not recommended)
+CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
+# Use intrinsic or inline versions for math/std functions
+#   (If you expect perfect errno behavior, do not use this)
+CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
+# Loop data dependency optimizations (need -xO3 or higher)
+CC_HIGHEST="$CC_HIGHEST -xdepend"
+# Pointer parameters to functions do not overlap
+#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
+#    If you pass in multiple pointers to the same data, do not use this)
+CC_HIGHEST="$CC_HIGHEST -xrestrict"
+# Inline some library routines
+#   (If you expect perfect errno behavior, do not use this)
+CC_HIGHEST="$CC_HIGHEST -xlibmil"
+# Use optimized math routines
+#   (If you expect perfect errno behavior, do not use this)
+#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
+#CC_HIGHEST="$CC_HIGHEST -xlibmopt"
+
+        case $LEGACY_OPENJDK_TARGET_CPU1 in
+          i586)
+            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xchip=pentium"
+            C_O_FLAG_HI="-xO4 -Wu,-O4~yz"
+            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz"
+            C_O_FLAG_NONE=""
+            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xchip=pentium"
+            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz"
+            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz"
+            CXX_O_FLAG_NONE=""
+            ;;
+          sparc)
+            CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
+            CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
+            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
+            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
+            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
+            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
+            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
+            C_O_FLAG_NONE=""
+            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
+            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
+            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
+            CXX_O_FLAG_NONE=""
+            ;;
+        esac
+
+    CFLAGS_DEBUG_SYMBOLS="-g -xs"
+    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
+    esac
+    ;;
+  CL )
+    D_FLAG=
+    C_O_FLAG_HI="-O2"
+    C_O_FLAG_NORM="-O1"
+    C_O_FLAG_NONE="-Od"
+    CXX_O_FLAG_HI="$C_O_FLAG_HI"
+    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
+    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
+    ;;
+esac
+
+if test -z "$C_O_FLAG_HIGHEST"; then
+   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
+fi
+
+if test -z "$CXX_O_FLAG_HIGHEST"; then
+   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags\"" >&5
+$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags\"" >&2;}
+fi
+
+if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags\"" >&5
+$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags\"" >&2;}
+fi
+
+if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags\"" >&5
+$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags\"" >&2;}
+fi
+
+
+# Check whether --with-extra-cflags was given.
+if test "${with_extra_cflags+set}" = set; then :
+  withval=$with_extra_cflags;
+fi
+
+
+
+# Check whether --with-extra-cxxflags was given.
+if test "${with_extra_cxxflags+set}" = set; then :
+  withval=$with_extra_cxxflags;
+fi
+
+
+
+# Check whether --with-extra-ldflags was given.
+if test "${with_extra_ldflags+set}" = set; then :
+  withval=$with_extra_ldflags;
+fi
+
+
+CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
+CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
+LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
+
+###############################################################################
+#
+# Now setup the CFLAGS and LDFLAGS for the JDK build.
+# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
+#
+case $COMPILER_NAME in
+      gcc )
+      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
+                          -pipe \
+                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
+	  case $OPENJDK_TARGET_CPU_ARCH in
+	  arm )
+            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
+	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
+	  ;;
+	  ppc )
+            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
+	  ;;
+	  * )
+	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
+	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
+          ;;
+	  esac
+          ;;
+      ossc )
+      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -norunpath -xnolib"
+      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX"
+          ;;
+      cl )
+          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
+               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
+	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
+	       -DWIN32 -DIAL"
+          case $LEGACY_OPENJDK_TARGET_CPU1 in
+              i?86 )
+                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
+                  ;;
+              amd64 )
+                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
+                  ;;
+          esac
+          ;;
+esac
+
+###############################################################################
+#
+# Cross-compile arch specific flags
+
+#
+if test "x$JDK_VARIANT" = "xembedded"; then
+   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DJAVASE_EMBEDDED"
+fi
+
+case $OPENJDK_TARGET_CPU_ARCH in
+arm )
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fsigned-char"
+    ;;
+ppc )
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fsigned-char"
+    ;;
+esac
+
+###############################################################################
+
+CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
+
+# The package path is used only on macosx?
+PACKAGE_PATH=/opt/local
+
+
+# Sometimes we use a cpu dir (.../lib/amd64/server)
+# Sometimes not (.../lib/server)
+LIBARCHDIR="$LEGACY_OPENJDK_TARGET_CPU2/"
+if test "x$ENDIAN" = xlittle; then
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
+else
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
+fi
+if test "x$OPENJDK_TARGET_OS" = xlinux; then
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
+fi
+if test "x$OPENJDK_TARGET_OS" = xwindows; then
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
+fi
+if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
+fi
+if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
+    LIBARCHDIR=""
+fi
+if test "x$OPENJDK_TARGET_OS" = xbsd; then
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
+fi
+if test "x$DEBUG_LEVEL" = xrelease; then
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
+else
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
+fi
+
+CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$LEGACY_OPENJDK_TARGET_CPU1\"' -D$LEGACY_OPENJDK_TARGET_CPU1"
+CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
+
+CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
+        -I${JDK_OUTPUTDIR}/include \
+        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
+        -I${JDK_TOPDIR}/src/share/javavm/export \
+        -I${JDK_TOPDIR}/src/$LEGACY_OPENJDK_TARGET_OS_API/javavm/export \
+        -I${JDK_TOPDIR}/src/share/native/common \
+        -I${JDK_TOPDIR}/src/$LEGACY_OPENJDK_TARGET_OS_API/native/common"
+
+# The shared libraries are compiled using the picflag.
+CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
+CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
+
+# Executable flags
+CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
+CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
+
+# Now this is odd. The JDK native libraries have to link against libjvm.so
+# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
+# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
+# is identical for client and server? Yes. Which is picked at runtime (client or server)?
+# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
+# libraries will link to whatever is in memory. Yuck.
+#
+# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
+if test "x$COMPILER_TYPE" = xCL; then
+    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
+    if test "x$LEGACY_OPENJDK_TARGET_CPU1" = xi586; then
+        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
+    fi
+    # TODO: make -debug optional "--disable-full-debug-symbols"
+    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
+    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
+    LDFLAGS_JDKLIB_SUFFIX=""
+    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
+        LDFLAGS_STACK_SIZE=1048576
+    else
+        LDFLAGS_STACK_SIZE=327680
+    fi
+    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
+else
+    # If this is a --hash-style=gnu system, use --hash-style=both, why?
+    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
+    if test -n "$HAS_GNU_HASH"; then
+        # And since we now know that the linker is gnu, then add -z defs, to forbid
+        # undefined symbols in object files.
+        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both -Xlinker -z -Xlinker defs"
+        if test "x$DEBUG_LEVEL" == "xrelease"; then
+            # When building release libraries, tell the linker optimize them.
+            # Should this be supplied to the OSS linker as well?
+            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
+        fi
+    fi
+
+    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
+                    -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}server \
+                    -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}client \
+  	            -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}"
+    LDFLAGS_JDKLIB_SUFFIX="-ljvm -ljava"
+    if test "x$COMPILER_NAME" = xossc; then
+        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
+    fi
+
+    # Only the jli library is explicitly linked when the launchers are built.
+    # The libjvm is then dynamically loaded/linked by the launcher.
+    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
+    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
+       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}jli"
+       LDFLAGS_JDKEXE_SUFFIX="-ljli"
+    fi
+fi
+
+# Adjust flags according to debug level.
+case $DEBUG_LEVEL in
+      fastdebug )
+              CFLAGS="$CFLAGS $D_FLAG"
+              JAVAC_FLAGS="$JAVAC_FLAGS -g"
+              ;;
+      slowdebug )
+              CFLAGS="$CFLAGS $D_FLAG"
+	      C_O_FLAG_HI="$C_O_FLAG_NONE"
+	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
+	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
+	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
+              JAVAC_FLAGS="$JAVAC_FLAGS -g"
+              ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# After we have toolchain, we can compile the uncygdrive helper
+
+# 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
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if uncygdrive can be created" >&5
+$as_echo_n "checking if uncygdrive can be created... " >&6; }
+    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
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+        cat $OUTPUT_ROOT/uncygdrive1.log
+        as_fn_error $? "Could not create $OUTPUT_ROOT/uncygdrive.exe" "$LINENO" 5
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNCYGDRIVE" >&5
+$as_echo "$UNCYGDRIVE" >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if uncygdrive.exe works" >&5
+$as_echo_n "checking if uncygdrive.exe works... " >&6; }
+    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
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+        cat $OUTPUT_ROOT/uncygdrive2.log
+        as_fn_error $? "Uncygdrive did not work!" "$LINENO" 5
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+    rm -f $OUTPUT_ROOT/uncygdrive?.??? $OUTPUT_ROOT/uncygdrive.obj
+fi
+
+
+
+
+
+# Setup debug symbols (need objcopy from the toolchain for that)
+
+#
+# ENABLE_DEBUG_SYMBOLS
+# This must be done after the toolchain is setup, since we're looking at objcopy.
+#
+ENABLE_DEBUG_SYMBOLS=default
+
+# default on macosx is no...
+if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+   ENABLE_DEBUG_SYMBOLS=no
+fi
+
+# default for embedded is no...
+if test "x$JDK_VARIANT" = "xembedded"; then
+   ENABLE_DEBUG_SYMBOLS=no
+fi
+
+# Check whether --enable-debug-symbols was given.
+if test "${enable_debug_symbols+set}" = set; then :
+  enableval=$enable_debug_symbols; ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
+$as_echo_n "checking if we should generate debug symbols... " >&6; }
+
+if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then
+   # explicit enabling of enable-debug-symbols and can't find objcopy
+   #   this is an error
+   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
+fi
+
+if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
+  # Default is on if objcopy is found, otherwise off
+  if test "x$OBJCOPY" != x; then
+     ENABLE_DEBUG_SYMBOLS=yes
+  else
+     ENABLE_DEBUG_SYMBOLS=no
+  fi
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
+$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
+
+#
+# ZIP_DEBUGINFO_FILES
+#
+ZIP_DEBUGINFO_FILES=yes
+
+# Check whether --enable-zip-debug-info was given.
+if test "${enable_zip_debug_info+set}" = set; then :
+  enableval=$enable_zip_debug_info; ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
+$as_echo_n "checking if we should zip debug-info files... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP_DEBUGINFO_FILES" >&5
+$as_echo "$ZIP_DEBUGINFO_FILES" >&6; }
+
+# Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes
+#   use that...
+if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
+   ZIP_DEBUGINFO_FILES=1
+else
+   ZIP_DEBUGINFO_FILES=0
+fi
+
+
+
+
+
+
+
+###############################################################################
+#
+# Check dependencies for external and internal libraries.
+#
+###############################################################################
+
+
+
+###############################################################################
+#
+# OS specific settings that we never will need to probe.
+#
+if test "x$OPENJDK_TARGET_OS" = xlinux; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
+$as_echo_n "checking what is not needed on Linux?... " >&6; }
+    PULSE_NOT_NEEDED=yes
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
+$as_echo "pulse" >&6; }
+fi
+
+if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
+$as_echo_n "checking what is not needed on Solaris?... " >&6; }
+    ALSA_NOT_NEEDED=yes
+    PULSE_NOT_NEEDED=yes
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
+$as_echo "alsa pulse" >&6; }
+fi
+
+if test "x$OPENJDK_TARGET_OS" = xwindows; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
+$as_echo_n "checking what is not needed on Windows?... " >&6; }
+    CUPS_NOT_NEEDED=yes
+    ALSA_NOT_NEEDED=yes
+    PULSE_NOT_NEEDED=yes
+    X11_NOT_NEEDED=yes
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
+$as_echo "alsa cups pulse x11" >&6; }
+fi
+
+if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
+$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
+    ALSA_NOT_NEEDED=yes
+    PULSE_NOT_NEEDED=yes
+    X11_NOT_NEEDED=yes
+    FREETYPE2_NOT_NEEDED=yes
+    # If the java runtime framework is disabled, then we need X11.
+    # This will be adjusted below.
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
+$as_echo "alsa pulse x11" >&6; }
+fi
+
+if test "x$OPENJDK_TARGET_OS" = xbsd; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
+$as_echo_n "checking what is not needed on bsd?... " >&6; }
+    ALSA_NOT_NEEDED=yes
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
+$as_echo "alsa" >&6; }
+fi
+
+if test "x$OPENJDK" = "xfalse"; then
+    FREETYPE2_NOT_NEEDED=yes
+fi
+
+###############################################################################
+#
+# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
+# that uses this API.
+#
+# Check whether --enable-macosx-runtime-support was given.
+if test "${enable_macosx_runtime_support+set}" = set; then :
+  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
+else
+  MACOSX_RUNTIME_SUPPORT="no"
+fi
+
+
+USE_MACOSX_RUNTIME_SUPPORT=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
+$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
+if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
+    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
+        MACOSX_RUNTIME_SUPPORT=yes
+        USE_MACOSX_RUNTIME_SUPPORT=yes
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
+$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
+    else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
+$as_echo "yes, but explicitly disabled." >&6; }
+    fi
+else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
+$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
+    X11_NOT_NEEDED=
+    FREETYPE2_NOT_NEEDED=
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
+$as_echo "alsa pulse" >&6; }
+fi
+
+
+
+
+
+###############################################################################
+#
+# Check for X Windows
+#
+
+# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
+# Make a simple check for the libraries at the sysroot, and setup --x-includes and
+# --x-libraries for the sysroot, if that seems to be correct.
+if test "x$SYS_ROOT" != "x/"; then
+  if test "x$x_includes" = xNONE; then
+    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
+      x_includes="$SYS_ROOT/usr/X11R6/include"
+    fi
+  fi
+  if test "x$x_libraries" = xNONE; then
+    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
+      x_libraries="$SYS_ROOT/usr/X11R6/lib"
+    fi
+  fi
+fi
+
+# Now let autoconf do it's magic
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
+$as_echo_n "checking for X... " >&6; }
+
+
+# Check whether --with-x was given.
+if test "${with_x+set}" = set; then :
+  withval=$with_x;
+fi
+
+# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
+if test "x$with_x" = xno; then
+  # The user explicitly disabled X.
+  have_x=disabled
+else
+  case $x_includes,$x_libraries in #(
+    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
+    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  # One or both of the vars are not set, and there is no cached value.
+ac_x_includes=no ac_x_libraries=no
+rm -f -r conftest.dir
+if mkdir conftest.dir; then
+  cd conftest.dir
+  cat >Imakefile <<'_ACEOF'
+incroot:
+	@echo incroot='${INCROOT}'
+usrlibdir:
+	@echo usrlibdir='${USRLIBDIR}'
+libdir:
+	@echo libdir='${LIBDIR}'
+_ACEOF
+  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
+    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+    for ac_var in incroot usrlibdir libdir; do
+      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
+    done
+    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+    for ac_extension in a so sl dylib la dll; do
+      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
+	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
+	ac_im_usrlibdir=$ac_im_libdir; break
+      fi
+    done
+    # Screen out bogus values from the imake configuration.  They are
+    # bogus both because they are the default anyway, and because
+    # using them would break gcc on systems where it needs fixed includes.
+    case $ac_im_incroot in
+	/usr/include) ac_x_includes= ;;
+	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
+    esac
+    case $ac_im_usrlibdir in
+	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
+	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
+    esac
+  fi
+  cd ..
+  rm -f -r conftest.dir
+fi
+
+# Standard set of common directories for X headers.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+ac_x_header_dirs='
+/usr/X11/include
+/usr/X11R7/include
+/usr/X11R6/include
+/usr/X11R5/include
+/usr/X11R4/include
+
+/usr/include/X11
+/usr/include/X11R7
+/usr/include/X11R6
+/usr/include/X11R5
+/usr/include/X11R4
+
+/usr/local/X11/include
+/usr/local/X11R7/include
+/usr/local/X11R6/include
+/usr/local/X11R5/include
+/usr/local/X11R4/include
+
+/usr/local/include/X11
+/usr/local/include/X11R7
+/usr/local/include/X11R6
+/usr/local/include/X11R5
+/usr/local/include/X11R4
+
+/usr/X386/include
+/usr/x386/include
+/usr/XFree86/include/X11
+
+/usr/include
+/usr/local/include
+/usr/unsupported/include
+/usr/athena/include
+/usr/local/x11r5/include
+/usr/lpp/Xamples/include
+
+/usr/openwin/include
+/usr/openwin/share/include'
+
+if test "$ac_x_includes" = no; then
+  # Guess where to find include files, by looking for Xlib.h.
+  # First, try using that file with no special directory specified.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <X11/Xlib.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+  # We can compile using X headers with no special include directory.
+ac_x_includes=
+else
+  for ac_dir in $ac_x_header_dirs; do
+  if test -r "$ac_dir/X11/Xlib.h"; then
+    ac_x_includes=$ac_dir
+    break
+  fi
+done
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+fi # $ac_x_includes = no
+
+if test "$ac_x_libraries" = no; then
+  # Check for the libraries.
+  # See if we find them without any special options.
+  # Don't add to $LIBS permanently.
+  ac_save_LIBS=$LIBS
+  LIBS="-lX11 $LIBS"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <X11/Xlib.h>
+int
+main ()
+{
+XrmInitialize ()
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  LIBS=$ac_save_LIBS
+# We can link X programs with no special library path.
+ac_x_libraries=
+else
+  LIBS=$ac_save_LIBS
+for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
+do
+  # Don't even attempt the hair of trying to link an X program!
+  for ac_extension in a so sl dylib la dll; do
+    if test -r "$ac_dir/libX11.$ac_extension"; then
+      ac_x_libraries=$ac_dir
+      break 2
+    fi
+  done
+done
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi # $ac_x_libraries = no
+
+case $ac_x_includes,$ac_x_libraries in #(
+  no,* | *,no | *\'*)
+    # Didn't find X, or a directory has "'" in its name.
+    ac_cv_have_x="have_x=no";; #(
+  *)
+    # Record where we found X for the cache.
+    ac_cv_have_x="have_x=yes\
+	ac_x_includes='$ac_x_includes'\
+	ac_x_libraries='$ac_x_libraries'"
+esac
+fi
+;; #(
+    *) have_x=yes;;
+  esac
+  eval "$ac_cv_have_x"
+fi # $with_x != no
+
+if test "$have_x" != yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
+$as_echo "$have_x" >&6; }
+  no_x=yes
+else
+  # If each of the values was on the command line, it overrides each guess.
+  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+  # Update the cache value to reflect the command line values.
+  ac_cv_have_x="have_x=yes\
+	ac_x_includes='$x_includes'\
+	ac_x_libraries='$x_libraries'"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
+$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
+fi
+
+if test "$no_x" = yes; then
+  # Not all programs may use this symbol, but it does not hurt to define it.
+
+$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
+
+  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
+else
+  if test -n "$x_includes"; then
+    X_CFLAGS="$X_CFLAGS -I$x_includes"
+  fi
+
+  # It would also be nice to do this for all -L options, not just this one.
+  if test -n "$x_libraries"; then
+    X_LIBS="$X_LIBS -L$x_libraries"
+    # For Solaris; some versions of Sun CC require a space after -R and
+    # others require no space.  Words are not sufficient . . . .
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
+$as_echo_n "checking whether -R must be followed by a space... " >&6; }
+    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
+    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
+    ac_cxx_werror_flag=yes
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       X_LIBS="$X_LIBS -R$x_libraries"
+else
+  LIBS="$ac_xsave_LIBS -R $x_libraries"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	  X_LIBS="$X_LIBS -R $x_libraries"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
+$as_echo "neither works" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
+    LIBS=$ac_xsave_LIBS
+  fi
+
+  # Check for system-dependent libraries X programs must link with.
+  # Do this before checking for the system-independent R6 libraries
+  # (-lICE), since we may need -lsocket or whatever for X linking.
+
+  if test "$ISC" = yes; then
+    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
+  else
+    # Martyn Johnson says this is needed for Ultrix, if the X
+    # libraries were built with DECnet support.  And Karl Berry says
+    # the Alpha needs dnet_stub (dnet does not exist).
+    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char XOpenDisplay ();
+int
+main ()
+{
+return XOpenDisplay ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
+$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
+if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldnet  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dnet_ntoa ();
+int
+main ()
+{
+return dnet_ntoa ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_dnet_dnet_ntoa=yes
+else
+  ac_cv_lib_dnet_dnet_ntoa=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
+$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
+if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
+fi
+
+    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
+$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
+if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldnet_stub  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dnet_ntoa ();
+int
+main ()
+{
+return dnet_ntoa ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_dnet_stub_dnet_ntoa=yes
+else
+  ac_cv_lib_dnet_stub_dnet_ntoa=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
+$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
+if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
+fi
+
+    fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    LIBS="$ac_xsave_LIBS"
+
+    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
+    # to get the SysV transport functions.
+    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
+    # needs -lnsl.
+    # The nsl library prevents programs from opening the X display
+    # on Irix 5.2, according to T.E. Dickey.
+    # The functions gethostbyname, getservbyname, and inet_addr are
+    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
+    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
+if test "x$ac_cv_func_gethostbyname" = x""yes; then :
+
+fi
+
+    if test $ac_cv_func_gethostbyname = no; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
+$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
+if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+int
+main ()
+{
+return gethostbyname ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_nsl_gethostbyname=yes
+else
+  ac_cv_lib_nsl_gethostbyname=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
+$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
+if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
+fi
+
+      if test $ac_cv_lib_nsl_gethostbyname = no; then
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
+$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
+if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbsd  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+int
+main ()
+{
+return gethostbyname ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_bsd_gethostbyname=yes
+else
+  ac_cv_lib_bsd_gethostbyname=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
+$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
+if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
+fi
+
+      fi
+    fi
+
+    # lieder@skyler.mavd.honeywell.com says without -lsocket,
+    # socket/setsockopt and other routines are undefined under SCO ODT
+    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
+    # on later versions), says Simon Leinen: it contains gethostby*
+    # variants that don't use the name server (or something).  -lsocket
+    # must be given before -lnsl if both are needed.  We assume that
+    # if connect needs -lnsl, so does gethostbyname.
+    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
+if test "x$ac_cv_func_connect" = x""yes; then :
+
+fi
+
+    if test $ac_cv_func_connect = no; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
+$as_echo_n "checking for connect in -lsocket... " >&6; }
+if test "${ac_cv_lib_socket_connect+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char connect ();
+int
+main ()
+{
+return connect ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_socket_connect=yes
+else
+  ac_cv_lib_socket_connect=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
+$as_echo "$ac_cv_lib_socket_connect" >&6; }
+if test "x$ac_cv_lib_socket_connect" = x""yes; then :
+  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
+fi
+
+    fi
+
+    # Guillermo Gomez says -lposix is necessary on A/UX.
+    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
+if test "x$ac_cv_func_remove" = x""yes; then :
+
+fi
+
+    if test $ac_cv_func_remove = no; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
+$as_echo_n "checking for remove in -lposix... " >&6; }
+if test "${ac_cv_lib_posix_remove+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char remove ();
+int
+main ()
+{
+return remove ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_posix_remove=yes
+else
+  ac_cv_lib_posix_remove=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
+$as_echo "$ac_cv_lib_posix_remove" >&6; }
+if test "x$ac_cv_lib_posix_remove" = x""yes; then :
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
+fi
+
+    fi
+
+    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
+if test "x$ac_cv_func_shmat" = x""yes; then :
+
+fi
+
+    if test $ac_cv_func_shmat = no; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
+$as_echo_n "checking for shmat in -lipc... " >&6; }
+if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lipc  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shmat ();
+int
+main ()
+{
+return shmat ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_ipc_shmat=yes
+else
+  ac_cv_lib_ipc_shmat=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
+$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
+if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
+fi
+
+    fi
+  fi
+
+  # Check for libraries that X11R6 Xt/Xaw programs need.
+  ac_save_LDFLAGS=$LDFLAGS
+  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
+  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
+  # check for ICE first), but we must link in the order -lSM -lICE or
+  # we get undefined symbols.  So assume we have SM if we have ICE.
+  # These have to be linked with before -lX11, unlike the other
+  # libraries we check for below, so use a different variable.
+  # John Interrante, Karl Berry
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
+$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
+if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lICE $X_EXTRA_LIBS $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char IceConnectionNumber ();
+int
+main ()
+{
+return IceConnectionNumber ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_ICE_IceConnectionNumber=yes
+else
+  ac_cv_lib_ICE_IceConnectionNumber=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
+$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
+if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
+  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
+fi
+
+  LDFLAGS=$ac_save_LDFLAGS
+
+fi
+
+
+if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
+
+    # Print a helpful message on how to acquire the necessary build dependency.
+    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
+    MISSING_DEPENDENCY=x11
+    PKGHANDLER_COMMAND=
+
+    case $PKGHANDLER in
+	apt-get)
+                apt_help     $MISSING_DEPENDENCY ;;
+    yum)
+                yum_help     $MISSING_DEPENDENCY ;;
+	port)
+                port_help    $MISSING_DEPENDENCY ;;
+	pkgutil)
+                pkgutil_help $MISSING_DEPENDENCY ;;
+	pkgadd)
+                pkgadd_help  $MISSING_DEPENDENCY ;;
+    * )
+      break ;;
+    esac
+
+    if test "x$PKGHANDLER_COMMAND" != x; then
+        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+    fi
+
+    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
+fi
+
+# Some of the old makefiles require a setting of OPENWIN_HOME
+# Since the X11R6 directory has disappeared on later Linuxes,
+# we need to probe for it.
+if test "x$OPENJDK_TARGET_OS" = xlinux; then
+    if test -d "$SYS_ROOT/usr/X11R6"; then
+        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
+    fi
+    if test -d "$SYS_ROOT/usr/include/X11"; then
+        OPENWIN_HOME="$SYS_ROOT/usr"
+    fi
+fi
+if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+    OPENWIN_HOME="/usr/openwin"
+fi
+
+
+
+#
+# Weird Sol10 something check...TODO change to try compile
+#
+if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
+  if test "`uname -r`" = "5.10"; then
+     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
+     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
+     fi
+  fi
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $X_CFLAGS"
+for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ X11_A_OK=yes
+else
+  X11_A_OK=no
+fi
+
+done
+
+CFLAGS="$OLD_CFLAGS"
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
+
+    # Print a helpful message on how to acquire the necessary build dependency.
+    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
+    MISSING_DEPENDENCY=x11
+    PKGHANDLER_COMMAND=
+
+    case $PKGHANDLER in
+	apt-get)
+                apt_help     $MISSING_DEPENDENCY ;;
+    yum)
+                yum_help     $MISSING_DEPENDENCY ;;
+	port)
+                port_help    $MISSING_DEPENDENCY ;;
+	pkgutil)
+                pkgutil_help $MISSING_DEPENDENCY ;;
+	pkgadd)
+                pkgadd_help  $MISSING_DEPENDENCY ;;
+    * )
+      break ;;
+    esac
+
+    if test "x$PKGHANDLER_COMMAND" != x; then
+        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+    fi
+
+    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
+fi
+
+
+
+
+
+
+###############################################################################
+#
+# The common unix printing system cups is used to print from java.
+#
+
+# Check whether --with-cups was given.
+if test "${with_cups+set}" = set; then :
+  withval=$with_cups;
+fi
+
+
+# Check whether --with-cups-include was given.
+if test "${with_cups_include+set}" = set; then :
+  withval=$with_cups_include;
+fi
+
+
+# Check whether --with-cups-lib was given.
+if test "${with_cups_lib+set}" = set; then :
+  withval=$with_cups_lib;
+fi
+
+
+if test "x$CUPS_NOT_NEEDED" = xyes; then
+	if test "x${with_cups}" != x || test "x${with_cups_include}" != x || test "x${with_cups_lib}" != x; then
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
+$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
+	fi
+	CUPS_CFLAGS=
+	CUPS_LIBS=
+else
+	CUPS_FOUND=no
+
+	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno || test "x${with_cups_lib}" = xno; then
+	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
+	fi
+
+	if test "x${with_cups}" != x; then
+	    CUPS_LIBS="-L${with_cups}/lib -lcups"
+	    CUPS_CFLAGS="-I${with_cups}/include"
+	    CUPS_FOUND=yes
+	fi
+	if test "x${with_cups_include}" != x; then
+	    CUPS_CFLAGS="-I${with_cups_include}"
+	    CUPS_FOUND=yes
+	fi
+	if test "x${with_cups_lib}" != x; then
+	    CUPS_LIBS="-L${with_cups_lib} -lcups"
+	    CUPS_FOUND=yes
+	fi
+	if test "x$CUPS_FOUND" = xno; then
+
+
+    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
+        # Source the builddeps file again, to make sure it uses the latest variables!
+        . $builddepsfile
+        # Look for a target and build machine specific resource!
+        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
+        if test "x$resource" = x; then
+            # Ok, lets instead look for a target specific resource
+            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
+        fi
+        if test "x$resource" = x; then
+            # Ok, lets instead look for a build specific resource
+            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
+        fi
+        if test "x$resource" = x; then
+            # Ok, lets instead look for a generic resource
+            # (The cups comes from M4 and not the shell, thus no need for eval here.)
+            resource=${builddep_cups}
+        fi
+        if test "x$resource" != x; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
+$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
+	    # If the resource in the builddeps.conf file is an existing directory,
+	    # for example /java/linux/cups
+	    if test -d ${resource}; then
+	       depdir=${resource}
+	    else
+
+# cups is for example mymodule
+# $resource is for example libs/general/libmymod_1_2_3.zip
+# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
+# $with_builddeps_dir is for example /localhome/builddeps
+# depdir is the name of the variable into which we store the depdir, eg MYMOD
+# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
+# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
+    filename=`basename $resource`
+    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
+    filebase=${filename%%.*}
+    extension=${filename#*.}
+    installdir=$with_builddeps_dir/$filebase
+    if test ! -f $installdir/$filename.unpacked; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
+$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
+        if test ! -d $installdir; then
+            mkdir -p $installdir
+        fi
+        if test ! -d $installdir; then
+            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
+        fi
+        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
+        touch $tmpfile
+        if test ! -f $tmpfile; then
+            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
+        fi
+
+    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
+    # $tmpfile is the local file name for the downloaded file.
+    VALID_TOOL=no
+    if test "x$BDEPS_FTP" = xwget; then
+       VALID_TOOL=yes
+       wget -O $tmpfile $with_builddeps_server/$resource
+    fi
+    if test "x$BDEPS_FTP" = xlftp; then
+       VALID_TOOL=yes
+       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
+    fi
+    if test "x$BDEPS_FTP" = xftp; then
+        VALID_TOOL=yes
+        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
+        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
+        FTPUSERPWD=${FTPSERVER%%@*}
+        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
+            FTPUSER=${userpwd%%:*}
+            FTPPWD=${userpwd#*@}
+            FTPSERVER=${FTPSERVER#*@}
+        else
+            FTPUSER=ftp
+            FTPPWD=ftp
+        fi
+        # the "pass" command does not work on some
+        # ftp clients (read ftp.exe) but if it works,
+        # passive mode is better!
+        (\
+            echo "user $FTPUSER $FTPPWD"        ;\
+            echo "pass"                         ;\
+            echo "bin"                          ;\
+            echo "get $FTPPATH $tmpfile"              ;\
+        ) | ftp -in $FTPSERVER
+    fi
+    if test "x$VALID_TOOL" != xyes; then
+       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
+    fi
+
+        mv $tmpfile $installdir/$filename
+        if test ! -s $installdir/$filename; then
+            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
+        fi
+        case "$extension" in
+            zip)  echo "Unzipping $installdir/$filename..."
+               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
+            ;;
+            tar.gz) echo "Untaring $installdir/$filename..."
+               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
+            ;;
+            tgz) echo "Untaring $installdir/$filename..."
+               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
+            ;;
+            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
+            ;;
+        esac
+    fi
+    if test -f $installdir/$filename.unpacked; then
+        depdir=$installdir
+    fi
+
+	    fi
+            # Source the builddeps file again, because in the previous command, the depdir
+            # was updated to point at the current build dependency install directory.
+            . $builddepsfile
+            # Now extract variables from the builddeps.conf files.
+            theroot=${builddep_cups_ROOT}
+            thecflags=${builddep_cups_CFLAGS}
+            thelibs=${builddep_cups_LIBS}
+            if test "x$depdir" = x; then
+                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
+            fi
+            CUPS=$depdir
+            if test "x$theroot" != x; then
+               CUPS="$theroot"
+            fi
+            if test "x$thecflags" != x; then
+               CUPS_CFLAGS="$thecflags"
+            fi
+            if test "x$thelibs" != x; then
+               CUPS_LIBS="$thelibs"
+            fi
+            CUPS_FOUND=yes
+
+        fi
+
+    fi
+
+	fi
+	if test "x$CUPS_FOUND" = xno; then
+	    # Are the cups headers installed in the default /usr/include location?
+	    for ac_header in cups/cups.h cups/ppd.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ CUPS_FOUND=yes
+	                      CUPS_CFLAGS=
+	                      CUPS_LIBS="-lcups"
+	                      DEFAULT_CUPS=yes
+fi
+
+done
+
+	fi
+	if test "x$CUPS_FOUND" = xno; then
+	    # Getting nervous now? Lets poke around for standard Solaris third-party
+	    # package installation locations.
+	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers and libs" >&5
+$as_echo_n "checking for cups headers and libs... " >&6; }
+	    if test -s /opt/sfw/cups/include/cups/cups.h; then
+	       # An SFW package seems to be installed!
+	       CUPS_FOUND=yes
+	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
+	       CUPS_LIBS="-L/opt/sfw/cups/lib -lcups"
+	    elif test -s /opt/csw/include/cups/cups.h; then
+	       # A CSW package seems to be installed!
+	       CUPS_FOUND=yes
+	       CUPS_CFLAGS="-I/opt/csw/include"
+	       CUPS_LIBS="-L/opt/csw/lib -lcups"
+	    fi
+	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
+$as_echo "$CUPS_FOUND" >&6; }
+	fi
+	if test "x$CUPS_FOUND" = xno; then
+
+    # Print a helpful message on how to acquire the necessary build dependency.
+    # cups is the help tag: freetyp2, cups, pulse, alsa etc
+    MISSING_DEPENDENCY=cups
+    PKGHANDLER_COMMAND=
+
+    case $PKGHANDLER in
+	apt-get)
+                apt_help     $MISSING_DEPENDENCY ;;
+    yum)
+                yum_help     $MISSING_DEPENDENCY ;;
+	port)
+                port_help    $MISSING_DEPENDENCY ;;
+	pkgutil)
+                pkgutil_help $MISSING_DEPENDENCY ;;
+	pkgadd)
+                pkgadd_help  $MISSING_DEPENDENCY ;;
+    * )
+      break ;;
+    esac
+
+    if test "x$PKGHANDLER_COMMAND" != x; then
+        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+    fi
+
+	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
+	fi
+fi
+
+
+
+
+
+
+
+###############################################################################
+#
+# The ubiquitous freetype2 library is used to render fonts.
+#
+
+# Check whether --with-freetype was given.
+if test "${with_freetype+set}" = set; then :
+  withval=$with_freetype;
+fi
+
+
+# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
+USING_SYSTEM_FT_LIB=false
+
+if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
+	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
+$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
+	fi
+	FREETYPE2_CFLAGS=
+	FREETYPE2_LIBS=
+        FREETYPE2_LIB_PATH=
+else
+	FREETYPE2_FOUND=no
+
+	if test "x$with_freetype" != x; then
+
+    # Fail with message the path to freetype if var with_freetype contains a path with no spaces in it.
+    # Unless on Windows, where we can rewrite the path.
+    HAS_SPACE=`echo "$with_freetype" | grep " "`
+    if test "x$HAS_SPACE" != x; then
+        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+            with_freetype=`$CYGPATH -s -m -a "$with_freetype"`
+            with_freetype=`$CYGPATH -u "$with_freetype"`
+        else
+            as_fn_error $? "You cannot have spaces in the path to freetype! \"$with_freetype\"" "$LINENO" 5
+        fi
+    fi
+
+	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
+            if test "x$OPENJDK_TARGET_OS" = xwindows; then
+                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
+            fi
+            FREETYPE2_LIB_PATH="$with_freetype/lib"
+	    FREETYPE2_CFLAGS="-I$with_freetype/include"
+            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
+                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
+            fi
+	    FREETYPE2_FOUND=yes
+   	    if test "x$FREETYPE2_FOUND" = xyes; then
+	        # Verify that the directories exist
+                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
+		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
+		fi
+	        # List the contents of the lib.
+		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
+                if test "x$FREETYPELIB" = x; then
+		   as_fn_error $? "Could not find libfreetype.se nor freetype.dll in $with_freetype/lib" "$LINENO" 5
+		fi
+	        # Check one h-file
+                if ! test -s "$with_freetype/include/ft2build.h"; then
+		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
+		fi
+            fi
+        fi
+	if test "x$FREETYPE2_FOUND" = xno; then
+
+
+    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
+        # Source the builddeps file again, to make sure it uses the latest variables!
+        . $builddepsfile
+        # Look for a target and build machine specific resource!
+        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
+        if test "x$resource" = x; then
+            # Ok, lets instead look for a target specific resource
+            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
+        fi
+        if test "x$resource" = x; then
+            # Ok, lets instead look for a build specific resource
+            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
+        fi
+        if test "x$resource" = x; then
+            # Ok, lets instead look for a generic resource
+            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
+            resource=${builddep_freetype2}
+        fi
+        if test "x$resource" != x; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
+$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
+	    # If the resource in the builddeps.conf file is an existing directory,
+	    # for example /java/linux/cups
+	    if test -d ${resource}; then
+	       depdir=${resource}
+	    else
+
+# freetype2 is for example mymodule
+# $resource is for example libs/general/libmymod_1_2_3.zip
+# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
+# $with_builddeps_dir is for example /localhome/builddeps
+# depdir is the name of the variable into which we store the depdir, eg MYMOD
+# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
+# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
+    filename=`basename $resource`
+    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
+    filebase=${filename%%.*}
+    extension=${filename#*.}
+    installdir=$with_builddeps_dir/$filebase
+    if test ! -f $installdir/$filename.unpacked; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
+$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
+        if test ! -d $installdir; then
+            mkdir -p $installdir
+        fi
+        if test ! -d $installdir; then
+            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
+        fi
+        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
+        touch $tmpfile
+        if test ! -f $tmpfile; then
+            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
+        fi
+
+    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
+    # $tmpfile is the local file name for the downloaded file.
+    VALID_TOOL=no
+    if test "x$BDEPS_FTP" = xwget; then
+       VALID_TOOL=yes
+       wget -O $tmpfile $with_builddeps_server/$resource
+    fi
+    if test "x$BDEPS_FTP" = xlftp; then
+       VALID_TOOL=yes
+       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
+    fi
+    if test "x$BDEPS_FTP" = xftp; then
+        VALID_TOOL=yes
+        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
+        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
+        FTPUSERPWD=${FTPSERVER%%@*}
+        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
+            FTPUSER=${userpwd%%:*}
+            FTPPWD=${userpwd#*@}
+            FTPSERVER=${FTPSERVER#*@}
+        else
+            FTPUSER=ftp
+            FTPPWD=ftp
+        fi
+        # the "pass" command does not work on some
+        # ftp clients (read ftp.exe) but if it works,
+        # passive mode is better!
+        (\
+            echo "user $FTPUSER $FTPPWD"        ;\
+            echo "pass"                         ;\
+            echo "bin"                          ;\
+            echo "get $FTPPATH $tmpfile"              ;\
+        ) | ftp -in $FTPSERVER
+    fi
+    if test "x$VALID_TOOL" != xyes; then
+       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
+    fi
+
+        mv $tmpfile $installdir/$filename
+        if test ! -s $installdir/$filename; then
+            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
+        fi
+        case "$extension" in
+            zip)  echo "Unzipping $installdir/$filename..."
+               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
+            ;;
+            tar.gz) echo "Untaring $installdir/$filename..."
+               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
+            ;;
+            tgz) echo "Untaring $installdir/$filename..."
+               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
+            ;;
+            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
+            ;;
+        esac
+    fi
+    if test -f $installdir/$filename.unpacked; then
+        depdir=$installdir
+    fi
+
+	    fi
+            # Source the builddeps file again, because in the previous command, the depdir
+            # was updated to point at the current build dependency install directory.
+            . $builddepsfile
+            # Now extract variables from the builddeps.conf files.
+            theroot=${builddep_freetype2_ROOT}
+            thecflags=${builddep_freetype2_CFLAGS}
+            thelibs=${builddep_freetype2_LIBS}
+            if test "x$depdir" = x; then
+                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
+            fi
+            FREETYPE2=$depdir
+            if test "x$theroot" != x; then
+               FREETYPE2="$theroot"
+            fi
+            if test "x$thecflags" != x; then
+               FREETYPE2_CFLAGS="$thecflags"
+            fi
+            if test "x$thelibs" != x; then
+               FREETYPE2_LIBS="$thelibs"
+            fi
+            FREETYPE2_FOUND=yes
+            else FREETYPE2_FOUND=no
+
+        fi
+        else FREETYPE2_FOUND=no
+
+    fi
+
+            USING_SYSTEM_FT_LIB=true
+	fi
+	if test "x$FREETYPE2_FOUND" = xno; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
+$as_echo_n "checking for FREETYPE2... " >&6; }
+
+if test -n "$FREETYPE2_CFLAGS"; then
+    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$FREETYPE2_LIBS"; then
+    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
+        else
+	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$FREETYPE2_PKG_ERRORS" >&5
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                FREETYPE2_FOUND=no
+elif test $pkg_failed = untried; then
+	FREETYPE2_FOUND=no
+else
+	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
+	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	FREETYPE2_FOUND=yes
+fi
+            USING_SYSTEM_FT_LIB=true
+	fi
+	if test "x$FREETYPE2_FOUND" = xno; then
+	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
+$as_echo_n "checking for freetype in some standard locations... " >&6; }
+
+	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
+	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
+	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
+	    fi
+	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
+	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
+	        DEFAULT_FREETYPE_LIBS="-lfreetype"
+	    fi
+
+	    PREV_CXXCFLAGS="$CXXFLAGS"
+	    PREV_LDFLAGS="$LDFLAGS"
+	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
+	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
+	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include<ft2build.h>
+	                    #include FT_FREETYPE_H
+	                   int main() { return 0; }
+
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+	                      # Yes, the default cflags and libs did the trick.
+	                      FREETYPE2_FOUND=yes
+	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
+	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
+
+else
+
+	                      FREETYPE2_FOUND=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+            CXXCFLAGS="$PREV_CXXFLAGS"
+	    LDFLAGS="$PREV_LDFLAGS"
+	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
+$as_echo "$FREETYPE2_FOUND" >&6; }
+            USING_SYSTEM_FT_LIB=true
+	fi
+	if test "x$FREETYPE2_FOUND" = xno; then
+
+    # Print a helpful message on how to acquire the necessary build dependency.
+    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
+    MISSING_DEPENDENCY=freetype2
+    PKGHANDLER_COMMAND=
+
+    case $PKGHANDLER in
+	apt-get)
+                apt_help     $MISSING_DEPENDENCY ;;
+    yum)
+                yum_help     $MISSING_DEPENDENCY ;;
+	port)
+                port_help    $MISSING_DEPENDENCY ;;
+	pkgutil)
+                pkgutil_help $MISSING_DEPENDENCY ;;
+	pkgadd)
+                pkgadd_help  $MISSING_DEPENDENCY ;;
+    * )
+      break ;;
+    esac
+
+    if test "x$PKGHANDLER_COMMAND" != x; then
+        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+    fi
+
+		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
+	fi
+fi
+
+
+
+
+
+
+
+
+
+###############################################################################
+#
+# Check for alsa headers and libraries. Used on Linux/GNU systems.
+#
+
+# Check whether --with-alsa was given.
+if test "${with_alsa+set}" = set; then :
+  withval=$with_alsa;
+fi
+
+
+# Check whether --with-alsa-include was given.
+if test "${with_alsa_include+set}" = set; then :
+  withval=$with_alsa_include;
+fi
+
+
+# Check whether --with-alsa-lib was given.
+if test "${with_alsa_lib+set}" = set; then :
+  withval=$with_alsa_lib;
+fi
+
+
+if test "x$ALSA_NOT_NEEDED" = xyes; then
+	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
+$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
+	fi
+	ALSA_CFLAGS=
+	ALSA_LIBS=
+else
+	ALSA_FOUND=no
+
+	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
+	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
+	fi
+
+	if test "x${with_alsa}" != x; then
+	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
+	    ALSA_CFLAGS="-I${with_alsa}/include"
+	    ALSA_FOUND=yes
+	fi
+	if test "x${with_alsa_include}" != x; then
+	    ALSA_CFLAGS="-I${with_alsa_include}"
+	    ALSA_FOUND=yes
+	fi
+	if test "x${with_alsa_lib}" != x; then
+	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
+	    ALSA_FOUND=yes
+	fi
+	if test "x$ALSA_FOUND" = xno; then
+
+
+    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
+        # Source the builddeps file again, to make sure it uses the latest variables!
+        . $builddepsfile
+        # Look for a target and build machine specific resource!
+        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
+        if test "x$resource" = x; then
+            # Ok, lets instead look for a target specific resource
+            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
+        fi
+        if test "x$resource" = x; then
+            # Ok, lets instead look for a build specific resource
+            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
+        fi
+        if test "x$resource" = x; then
+            # Ok, lets instead look for a generic resource
+            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
+            resource=${builddep_alsa}
+        fi
+        if test "x$resource" != x; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
+$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
+	    # If the resource in the builddeps.conf file is an existing directory,
+	    # for example /java/linux/cups
+	    if test -d ${resource}; then
+	       depdir=${resource}
+	    else
+
+# alsa is for example mymodule
+# $resource is for example libs/general/libmymod_1_2_3.zip
+# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
+# $with_builddeps_dir is for example /localhome/builddeps
+# depdir is the name of the variable into which we store the depdir, eg MYMOD
+# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
+# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
+    filename=`basename $resource`
+    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
+    filebase=${filename%%.*}
+    extension=${filename#*.}
+    installdir=$with_builddeps_dir/$filebase
+    if test ! -f $installdir/$filename.unpacked; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
+$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
+        if test ! -d $installdir; then
+            mkdir -p $installdir
+        fi
+        if test ! -d $installdir; then
+            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
+        fi
+        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
+        touch $tmpfile
+        if test ! -f $tmpfile; then
+            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
+        fi
+
+    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
+    # $tmpfile is the local file name for the downloaded file.
+    VALID_TOOL=no
+    if test "x$BDEPS_FTP" = xwget; then
+       VALID_TOOL=yes
+       wget -O $tmpfile $with_builddeps_server/$resource
+    fi
+    if test "x$BDEPS_FTP" = xlftp; then
+       VALID_TOOL=yes
+       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
+    fi
+    if test "x$BDEPS_FTP" = xftp; then
+        VALID_TOOL=yes
+        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
+        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
+        FTPUSERPWD=${FTPSERVER%%@*}
+        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
+            FTPUSER=${userpwd%%:*}
+            FTPPWD=${userpwd#*@}
+            FTPSERVER=${FTPSERVER#*@}
+        else
+            FTPUSER=ftp
+            FTPPWD=ftp
+        fi
+        # the "pass" command does not work on some
+        # ftp clients (read ftp.exe) but if it works,
+        # passive mode is better!
+        (\
+            echo "user $FTPUSER $FTPPWD"        ;\
+            echo "pass"                         ;\
+            echo "bin"                          ;\
+            echo "get $FTPPATH $tmpfile"              ;\
+        ) | ftp -in $FTPSERVER
+    fi
+    if test "x$VALID_TOOL" != xyes; then
+       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
+    fi
+
+        mv $tmpfile $installdir/$filename
+        if test ! -s $installdir/$filename; then
+            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
+        fi
+        case "$extension" in
+            zip)  echo "Unzipping $installdir/$filename..."
+               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
+            ;;
+            tar.gz) echo "Untaring $installdir/$filename..."
+               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
+            ;;
+            tgz) echo "Untaring $installdir/$filename..."
+               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
+            ;;
+            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
+            ;;
+        esac
+    fi
+    if test -f $installdir/$filename.unpacked; then
+        depdir=$installdir
+    fi
+
+	    fi
+            # Source the builddeps file again, because in the previous command, the depdir
+            # was updated to point at the current build dependency install directory.
+            . $builddepsfile
+            # Now extract variables from the builddeps.conf files.
+            theroot=${builddep_alsa_ROOT}
+            thecflags=${builddep_alsa_CFLAGS}
+            thelibs=${builddep_alsa_LIBS}
+            if test "x$depdir" = x; then
+                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
+            fi
+            ALSA=$depdir
+            if test "x$theroot" != x; then
+               ALSA="$theroot"
+            fi
+            if test "x$thecflags" != x; then
+               ALSA_CFLAGS="$thecflags"
+            fi
+            if test "x$thelibs" != x; then
+               ALSA_LIBS="$thelibs"
+            fi
+            ALSA_FOUND=yes
+            else ALSA_FOUND=no
+
+        fi
+        else ALSA_FOUND=no
+
+    fi
+
+	fi
+	if test "x$ALSA_FOUND" = xno; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
+$as_echo_n "checking for ALSA... " >&6; }
+
+if test -n "$ALSA_CFLAGS"; then
+    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$ALSA_LIBS"; then
+    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
+        else
+	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$ALSA_PKG_ERRORS" >&5
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                ALSA_FOUND=no
+elif test $pkg_failed = untried; then
+	ALSA_FOUND=no
+else
+	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
+	ALSA_LIBS=$pkg_cv_ALSA_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	ALSA_FOUND=yes
+fi
+	fi
+	if test "x$ALSA_FOUND" = xno; then
+	    for ac_header in alsa/asoundlib.h
+do :
+  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_ALSA_ASOUNDLIB_H 1
+_ACEOF
+ ALSA_FOUND=yes
+	                      ALSA_CFLAGS=-Iignoreme
+	                      ALSA_LIBS=-lasound
+	                      DEFAULT_ALSA=yes
+else
+  ALSA_FOUND=no
+fi
+
+done
+
+	fi
+	if test "x$ALSA_FOUND" = xno; then
+
+    # Print a helpful message on how to acquire the necessary build dependency.
+    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
+    MISSING_DEPENDENCY=alsa
+    PKGHANDLER_COMMAND=
+
+    case $PKGHANDLER in
+	apt-get)
+                apt_help     $MISSING_DEPENDENCY ;;
+    yum)
+                yum_help     $MISSING_DEPENDENCY ;;
+	port)
+                port_help    $MISSING_DEPENDENCY ;;
+	pkgutil)
+                pkgutil_help $MISSING_DEPENDENCY ;;
+	pkgadd)
+                pkgadd_help  $MISSING_DEPENDENCY ;;
+    * )
+      break ;;
+    esac
+
+    if test "x$PKGHANDLER_COMMAND" != x; then
+        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+    fi
+
+	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
+	fi
+fi
+
+
+
+
+
+
+
+###############################################################################
+#
+# Check for the jpeg library
+#
+
+USE_EXTERNAL_LIBJPEG=true
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
+$as_echo_n "checking for main in -ljpeg... " >&6; }
+if test "${ac_cv_lib_jpeg_main+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ljpeg  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_jpeg_main=yes
+else
+  ac_cv_lib_jpeg_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
+$as_echo "$ac_cv_lib_jpeg_main" >&6; }
+if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBJPEG 1
+_ACEOF
+
+  LIBS="-ljpeg $LIBS"
+
+else
+   USE_EXTERNAL_LIBJPEG=false
+               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
+$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
+
+fi
+
+
+
+###############################################################################
+#
+# Check for the gif library
+#
+
+USE_EXTERNAL_LIBJPEG=true
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
+$as_echo_n "checking for main in -lgif... " >&6; }
+if test "${ac_cv_lib_gif_main+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgif  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_gif_main=yes
+else
+  ac_cv_lib_gif_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
+$as_echo "$ac_cv_lib_gif_main" >&6; }
+if test "x$ac_cv_lib_gif_main" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBGIF 1
+_ACEOF
+
+  LIBS="-lgif $LIBS"
+
+else
+   USE_EXTERNAL_LIBGIF=false
+               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
+$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
+
+fi
+
+
+
+###############################################################################
+#
+# Check for the zlib library
+#
+
+
+# Check whether --with-zlib was given.
+if test "${with_zlib+set}" = set; then :
+  withval=$with_zlib;
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
+$as_echo_n "checking for compress in -lz... " >&6; }
+if test "${ac_cv_lib_z_compress+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char compress ();
+int
+main ()
+{
+return compress ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_z_compress=yes
+else
+  ac_cv_lib_z_compress=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
+$as_echo "$ac_cv_lib_z_compress" >&6; }
+if test "x$ac_cv_lib_z_compress" = x""yes; then :
+   ZLIB_FOUND=yes
+else
+   ZLIB_FOUND=no
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
+$as_echo_n "checking for which zlib to use... " >&6; }
+
+DEFAULT_ZLIB=bundled
+if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+#
+# On macosx default is system...on others default is
+#
+    DEFAULT_ZLIB=system
+fi
+
+if test "x${ZLIB_FOUND}" != "xyes"; then
+#
+# If we don't find any system...set default to bundled
+#
+    DEFAULT_ZLIB=bundled
+fi
+
+#
+# If user didn't specify, use DEFAULT_ZLIB
+#
+if test "x${with_zlib}" = "x"; then
+    with_zlib=${DEFAULT_ZLIB}
+fi
+
+if test "x${with_zlib}" = "xbundled"; then
+    USE_EXTERNAL_LIBZ=false
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
+$as_echo "bundled" >&6; }
+elif test "x${with_zlib}" = "xsystem"; then
+    if test "x${ZLIB_FOUND}" = "xyes"; then
+        USE_EXTERNAL_LIBZ=true
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
+$as_echo "system" >&6; }
+    else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
+$as_echo "system not found" >&6; }
+        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
+    fi
+else
+    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
+fi
+
+
+
+###############################################################################
+LIBZIP_CAN_USE_MMAP=true
+if test "x$JDK_VARIANT" = "xembedded"; then
+   LIBZIP_CAN_USE_MMAP=false
+fi
+
+
+###############################################################################
+#
+# Check if altzone exists in time.h
+#
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <time.h>
+int
+main ()
+{
+return (int)altzone;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  has_altzone=yes
+else
+  has_altzone=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+if test "x$has_altzone" = xyes; then
+
+$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
+
+fi
+
+###############################################################################
+#
+# Check the maths library
+#
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
+$as_echo_n "checking for cos in -lm... " >&6; }
+if test "${ac_cv_lib_m_cos+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char cos ();
+int
+main ()
+{
+return cos ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_m_cos=yes
+else
+  ac_cv_lib_m_cos=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
+$as_echo "$ac_cv_lib_m_cos" >&6; }
+if test "x$ac_cv_lib_m_cos" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+  LIBS="-lm $LIBS"
+
+else
+
+                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
+$as_echo "$as_me: Maths library was not found" >&6;}
+
+fi
+
+
+
+###############################################################################
+#
+# Check for libdl.so
+
+save_LIBS="$LIBS"
+LIBS=""
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_dl_dlopen=yes
+else
+  ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBDL 1
+_ACEOF
+
+  LIBS="-ldl $LIBS"
+
+fi
+
+LIBDL="$LIBS"
+
+LIBS="$save_LIBS"
+
+
+
+###############################################################################
+#
+# statically link libstdc++ before C++ ABI is stablized on Linux unless
+# dynamic build is configured on command line.
+#
+# Check whether --enable-static-link-stdc++ was given.
+if test "${enable_static_link_stdc__+set}" = set; then :
+  enableval=$enable_static_link_stdc__;
+else
+
+		enable_static_link_stdc__=yes
+
+fi
+
+
+if test "x$OPENJDK_TARGET_OS" = xlinux; then
+    # Test if -lstdc++ works.
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
+$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
+    ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+    OLD_CXXFLAGS="$CXXFLAGS"
+    CXXFLAGS="$CXXFLAGS -lstdc++"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  has_dynamic_libstdcxx=yes
+else
+  has_dynamic_libstdcxx=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    CXXFLAGS="$OLD_CXXFLAGS"
+    ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
+$as_echo "$has_dynamic_libstdcxx" >&6; }
+
+    # Test if stdc++ can be linked statically.
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
+$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
+    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
+    ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+    OLD_LIBS="$LIBS"
+    OLD_CXX="$CXX"
+    LIBS="$STATIC_STDCXX_FLAGS"
+    CXX="$CC"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  has_static_libstdcxx=yes
+else
+  has_static_libstdcxx=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    LIBS="$OLD_LIBS"
+    CXX="$OLD_CXX"
+    ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
+$as_echo "$has_static_libstdcxx" >&6; }
+
+    if test "x$has_static_libcxx" = xno && test "x$has_dynamic_libcxx" = xno; then
+        as_fn_error $? "I cannot link to stdc++! Neither dynamically nor statically." "$LINENO" 5
+    fi
+
+    if test "x$enable_static_link_stdc__" = xyes && test "x$has_static_libstdcxx" = xno; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Static linking of libstdc++ was not possible reverting to dynamic linking." >&5
+$as_echo "$as_me: Static linking of libstdc++ was not possible reverting to dynamic linking." >&6;}
+        enable_static_link_stdc__=no
+    fi
+
+    if test "x$enable_static_link_stdc__" = xno && test "x$has_dynamic_libstdcxx" = xno; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Dynamic linking of libstdc++ was not possible reverting to static linking." >&5
+$as_echo "$as_me: Dynamic linking of libstdc++ was not possible reverting to static linking." >&6;}
+        enable_static_link_stdc__=yes
+    fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
+$as_echo_n "checking how to link with libstdc++... " >&6; }
+    if test "x$enable_static_link_stdc__" = xyes; then
+        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
+        LDCXX="$CC"
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
+$as_echo "static" >&6; }
+    else
+        LIBCXX="$LIBCXX -lstdc++"
+        LDCXX="$CXX"
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
+$as_echo "dynamic" >&6; }
+    fi
+fi
+
+# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
+if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
+    LIBCXX="/usr/lib${LEGACY_OPENJDK_TARGET_CPU3}/libCrun.so.1"
+fi
+
+# TODO better (platform agnostic) test
+if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
+    LIBCXX="-lstdc++"
+fi
+
+
+
+
+
+###############################################################################
+#
+# We need to do some final tweaking, when everything else is done.
+#
+###############################################################################
+
+
+HOTSPOT_MAKE_ARGS="ALT_OUTPUTDIR=$HOTSPOT_OUTPUTDIR ALT_EXPORT_PATH=$HOTSPOT_DIST $HOTSPOT_TARGET"
+
+
+# The name of the Service Agent jar.
+SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
+if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
+fi
+
+
+
+
+###############################################################################
+#
+# Configure parts of the build that only affect the build performance,
+# not the result.
+#
+###############################################################################
+
+
+# How many cores do we have on this build system?
+
+# Check whether --with-num-cores was given.
+if test "${with_num_cores+set}" = set; then :
+  withval=$with_num_cores;
+fi
+
+if test "x$with_num_cores" = x; then
+    # The number of cores were not specified, try to probe them.
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
+$as_echo_n "checking for number of cores... " >&6; }
+    NUM_CORES=1
+    FOUND_CORES=no
+
+    if test -f /proc/cpuinfo; then
+        # Looks like a Linux system
+        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
+        FOUND_CORES=yes
+    fi
+
+    if test -x /usr/sbin/psrinfo; then
+        # Looks like a Solaris system
+        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
+        FOUND_CORES=yes
+    fi
+
+    if test -x /usr/sbin/system_profiler; then
+        # Looks like a MacOSX system
+        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
+        FOUND_CORES=yes
+    fi
+
+    if test "x$build_os" = xwindows; then
+        NUM_CORES=4
+    fi
+
+    # For c/c++ code we run twice as many concurrent build
+    # jobs than we have cores, otherwise we will stall on io.
+    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
+
+    if test "x$FOUND_CORES" = xyes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
+$as_echo "$NUM_CORES" >&6; }
+    else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1!" >&5
+$as_echo "could not detect number of cores, defaulting to 1!" >&6; }
+    fi
+
+
+else
+    NUM_CORES=$with_num_cores
+    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
+fi
+
+
+
+
+# How much memory do we have on this build system?
+
+# Check whether --with-memory-size was given.
+if test "${with_memory_size+set}" = set; then :
+  withval=$with_memory_size;
+fi
+
+if test "x$with_memory_size" = x; then
+    # The memory size was not specified, try to probe it.
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
+$as_echo_n "checking for memory size... " >&6; }
+    # Default to 1024MB
+    MEMORY_SIZE=1024
+    FOUND_MEM=no
+
+    if test -f /proc/cpuinfo; then
+        # Looks like a Linux system
+        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
+        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
+        FOUND_MEM=yes
+    fi
+
+    if test -x /usr/sbin/prtconf; then
+        # Looks like a Solaris system
+        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
+        FOUND_MEM=yes
+    fi
+
+    if test -x /usr/sbin/system_profiler; then
+        # Looks like a MacOSX system
+        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
+        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
+        FOUND_MEM=yes
+    fi
+
+    if test "x$build_os" = xwindows; then
+        MEMORY_SIZE=`systeminfo | grep 'Total Physical Memory:' | awk '{ print $4 }' | sed 's/,//'`
+        FOUND_MEM=yes
+    fi
+
+    if test "x$FOUND_MEM" = xyes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
+$as_echo "$MEMORY_SIZE MB" >&6; }
+    else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size defaulting to 1024MB!" >&5
+$as_echo "could not detect memory size defaulting to 1024MB!" >&6; }
+    fi
+
+else
+    MEMORY_SIZE=$with_memory_size
+fi
+
+
+
+# Setup smart javac (after cores and memory have been setup)
+
+
+# Check whether --with-server-java was given.
+if test "${with_server_java+set}" = set; then :
+  withval=$with_server_java;
+fi
+
+
+if test "x$with_server_java" != x; then
+    SERVER_JAVA="$with_server_java"
+    FOUND_VERSION=`$SERVER_JAVA -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" = x; then
+        as_fn_error $? "Could not execute server java: $SERVER_JAVA" "$LINENO" 5
+    fi
+else
+    SERVER_JAVA=""
+    # Hotspot specific options.
+
+    # Test if -XX:+UseParallelOldGC is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
+    # If so, then append -XX:+UseParallelOldGC to SERVER_JAVA
+    FOUND_WARN=`$JAVA -XX:+UseParallelOldGC -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$JAVA -XX:+UseParallelOldGC -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        SERVER_JAVA="$SERVER_JAVA -XX:+UseParallelOldGC"
+    fi
+
+
+    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
+    # If so, then append -verbosegc to SERVER_JAVA
+    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        SERVER_JAVA="$SERVER_JAVA -verbosegc"
+    fi
+
+    # JRockit specific options.
+
+    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
+    # If so, then append -Xverbose:gc to SERVER_JAVA
+    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        SERVER_JAVA="$SERVER_JAVA -Xverbose:gc"
+    fi
+
+    SERVER_JAVA="$JAVA $SERVER_JAVA"
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use shared server for javac" >&5
+$as_echo_n "checking whether to use shared server for javac... " >&6; }
+# Check whether --enable-javac-server was given.
+if test "${enable_javac_server+set}" = set; then :
+  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
+else
+  ENABLE_JAVAC_SERVER='no'
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
+$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
+if test "x$ENABLE_JAVAC_SERVER" = xyes; then
+    JAVAC_USE_REMOTE=true
+    JAVAC_SERVERS="$OUTPUT_ROOT/javacservers"
+else
+    JAVAC_USE_REMOTE=false
+    JAVAC_SERVERS=
+fi
+
+
+
+
+# Check whether --with-javac-server-cores was given.
+if test "${with_javac_server_cores+set}" = set; then :
+  withval=$with_javac_server_cores;
+fi
+
+if test "x$with_javac_server_cores" != x; then
+    JAVAC_SERVER_CORES="$with_javac_server_cores"
+else
+    if test "$NUM_CORES" -gt 16; then
+        # We set this arbitrary limit because we want to limit the heap
+        # size of the javac server.
+        # In the future we will make the javac compilers in the server
+        # share more and more state, thus enabling us to use more and
+        # more concurrent threads in the server.
+        JAVAC_SERVER_CORES="16"
+    else
+        JAVAC_SERVER_CORES="$NUM_CORES"
+    fi
+
+    if test "$MEMORY_SIZE" -gt "17000"; then
+        MAX_HEAP_MEM=10000
+
+    # Test if -d64 is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+    # If so, then append -d64 to SERVER_JAVA
+    FOUND_WARN=`$SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        SERVER_JAVA="$SERVER_JAVA -d64"
+    fi
+
+
+    # Test if -Xms10G -Xmx10G is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+    # If so, then append -Xms10G -Xmx10G to SERVER_JAVA
+    FOUND_WARN=`$SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        SERVER_JAVA="$SERVER_JAVA -Xms10G -Xmx10G"
+    fi
+
+
+    # Test if -Xmn2G is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+    # If so, then append -Xmn2G to SERVER_JAVA
+    FOUND_WARN=`$SERVER_JAVA -Xmn2G -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$SERVER_JAVA -Xmn2G -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        SERVER_JAVA="$SERVER_JAVA -Xmn2G"
+    fi
+
+    elif test "$MEMORY_SIZE" -gt "10000"; then
+        MAX_HEAP_MEM=6000
+
+    # Test if -d64 is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+    # If so, then append -d64 to SERVER_JAVA
+    FOUND_WARN=`$SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        SERVER_JAVA="$SERVER_JAVA -d64"
+    fi
+
+
+    # Test if -Xms6G -Xmx6G is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+    # If so, then append -Xms6G -Xmx6G to SERVER_JAVA
+    FOUND_WARN=`$SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        SERVER_JAVA="$SERVER_JAVA -Xms6G -Xmx6G"
+    fi
+
+
+    # Test if -Xmn1G is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+    # If so, then append -Xmn1G to SERVER_JAVA
+    FOUND_WARN=`$SERVER_JAVA -Xmn1G -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$SERVER_JAVA -Xmn1G -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        SERVER_JAVA="$SERVER_JAVA -Xmn1G"
+    fi
+
+    elif test "$MEMORY_SIZE" -gt "5000"; then
+        MAX_HEAP_MEM=3000
+
+    # Test if -d64 is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+    # If so, then append -d64 to SERVER_JAVA
+    FOUND_WARN=`$SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        SERVER_JAVA="$SERVER_JAVA -d64"
+    fi
+
+
+    # Test if -Xms1G -Xmx3G is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+    # If so, then append -Xms1G -Xmx3G to SERVER_JAVA
+    FOUND_WARN=`$SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        SERVER_JAVA="$SERVER_JAVA -Xms1G -Xmx3G"
+    fi
+
+
+    # Test if -Xmn256M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+    # If so, then append -Xmn256M to SERVER_JAVA
+    FOUND_WARN=`$SERVER_JAVA -Xmn256M -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$SERVER_JAVA -Xmn256M -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        SERVER_JAVA="$SERVER_JAVA -Xmn256M"
+    fi
+
+    elif test "$MEMORY_SIZE" -gt "3800"; then
+        MAX_HEAP_MEM=2500
+
+    # Test if -Xms1G -Xmx2500M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+    # If so, then append -Xms1G -Xmx2500M to SERVER_JAVA
+    FOUND_WARN=`$SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        SERVER_JAVA="$SERVER_JAVA -Xms1G -Xmx2500M"
+    fi
+
+
+    # Test if -Xmn256M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+    # If so, then append -Xmn256M to SERVER_JAVA
+    FOUND_WARN=`$SERVER_JAVA -Xmn256M -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$SERVER_JAVA -Xmn256M -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        SERVER_JAVA="$SERVER_JAVA -Xmn256M"
+    fi
+
+    elif test "$MEMORY_SIZE" -gt "1900"; then
+        MAX_HEAP_MEM=1200
+
+    # Test if -Xms700M -Xmx1200M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+    # If so, then append -Xms700M -Xmx1200M to SERVER_JAVA
+    FOUND_WARN=`$SERVER_JAVA -Xms700M -Xmx1200M -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$SERVER_JAVA -Xms700M -Xmx1200M -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        SERVER_JAVA="$SERVER_JAVA -Xms700M -Xmx1200M"
+    fi
+
+
+    # Test if -Xmn256M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+    # If so, then append -Xmn256M to SERVER_JAVA
+    FOUND_WARN=`$SERVER_JAVA -Xmn256M -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$SERVER_JAVA -Xmn256M -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        SERVER_JAVA="$SERVER_JAVA -Xmn256M"
+    fi
+
+    elif test "$MEMORY_SIZE" -gt "1000"; then
+        MAX_HEAP_MEM=900
+
+    # Test if -Xms400M -Xmx900M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+    # If so, then append -Xms400M -Xmx900M to SERVER_JAVA
+    FOUND_WARN=`$SERVER_JAVA -Xms400M -Xmx900M -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$SERVER_JAVA -Xms400M -Xmx900M -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        SERVER_JAVA="$SERVER_JAVA -Xms400M -Xmx900M"
+    fi
+
+
+    # Test if -Xmn128M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+    # If so, then append -Xmn128M to SERVER_JAVA
+    FOUND_WARN=`$SERVER_JAVA -Xmn128M -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$SERVER_JAVA -Xmn128M -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        SERVER_JAVA="$SERVER_JAVA -Xmn128M"
+    fi
+
+    else
+        MAX_HEAP_MEM=512
+
+    # Test if -Xms256M -Xmx512M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+    # If so, then append -Xms256M -Xmx512M to SERVER_JAVA
+    FOUND_WARN=`$SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        SERVER_JAVA="$SERVER_JAVA -Xms256M -Xmx512M"
+    fi
+
+
+    # Test if -Xmn128M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+    # If so, then append -Xmn128M to SERVER_JAVA
+    FOUND_WARN=`$SERVER_JAVA -Xmn128M -version 2>&1 | grep -i warn`
+    FOUND_VERSION=`$SERVER_JAVA -Xmn128M -version 2>&1 | grep " version \""`
+    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+        SERVER_JAVA="$SERVER_JAVA -Xmn128M"
+    fi
+
+    fi
+
+    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
+    if test "$JAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
+$as_echo_n "checking if number of server cores must be reduced... " >&6; }
+        JAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $JAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
+$as_echo "yes, to $JAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
+    fi
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to track dependencies between Java packages" >&5
+$as_echo_n "checking whether to track dependencies between Java packages... " >&6; }
+# Check whether --enable-javac-deps was given.
+if test "${enable_javac_deps+set}" = set; then :
+  enableval=$enable_javac_deps; ENABLE_JAVAC_DEPS="${enableval}"
+else
+  ENABLE_JAVAC_DEPS='no'
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_DEPS" >&5
+$as_echo "$ENABLE_JAVAC_DEPS" >&6; }
+if test "x$ENABLE_JAVAC_DEPS" = xyes; then
+    JAVAC_USE_DEPS=true
+else
+    JAVAC_USE_DEPS=false
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use multiple cores for javac compilation" >&5
+$as_echo_n "checking whether to use multiple cores for javac compilation... " >&6; }
+# Check whether --enable-javac-multi-core was given.
+if test "${enable_javac_multi_core+set}" = set; then :
+  enableval=$enable_javac_multi_core; ENABLE_JAVAC_MULTICORE="${enableval}"
+else
+  ENABLE_JAVAC_MULTICORE='no'
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_MULTICORE" >&5
+$as_echo "$ENABLE_JAVAC_MULTICORE" >&6; }
+if test "x$ENABLE_JAVAC_MULTICORE" = xyes; then
+    JAVAC_USE_MODE=MULTI_CORE_CONCURRENT
+else
+    JAVAC_USE_MODE=SINGLE_THREADED_BATCH
+    if test "x$ENABLE_JAVAC_DEPS" = xyes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Dependency tracking is not supported with single threaded batch compiles of Java source roots. Please add --disable-javac-deps to your configure options." >&5
+$as_echo "$as_me: WARNING: Dependency tracking is not supported with single threaded batch compiles of Java source roots. Please add --disable-javac-deps to your configure options." >&2;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling dependency tracking for you now." >&5
+$as_echo "$as_me: WARNING: Disabling dependency tracking for you now." >&2;}
+        JAVAC_USE_DEPS=false
+    fi
+    if test "x$ENABLE_JAVAC_SERVER" = xyes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The javac server will not be used since single threaded batch compiles are run within their own JVM. Please add --disable-javac-server to your configure options." >&5
+$as_echo "$as_me: WARNING: The javac server will not be used since single threaded batch compiles are run within their own JVM. Please add --disable-javac-server to your configure options." >&2;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling javac server for you now." >&5
+$as_echo "$as_me: WARNING: Disabling javac server for you now." >&2;}
+        JAVAC_USE_REMOTE=false
+    fi
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
+$as_echo_n "checking whether to use sjavac... " >&6; }
+# Check whether --enable-sjavac was given.
+if test "${enable_sjavac+set}" = set; then :
+  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
+else
+  ENABLE_SJAVAC='no'
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
+$as_echo "$ENABLE_SJAVAC" >&6; }
+
+
+
+
+# Can the C/C++ compiler use precompiled headers?
+
+
+###############################################################################
+#
+# Can the C/C++ compiler use precompiled headers?
+#
+# Check whether --enable-precompiled-headers was given.
+if test "${enable_precompiled_headers+set}" = set; then :
+  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled-headers}
+else
+  ENABLE_PRECOMPH=yes
+fi
+
+
+USE_PRECOMPILED_HEADER=1
+if test "x$ENABLE_PRECOMPH" = xno; then
+    USE_PRECOMPILED_HEADER=0
+fi
+
+if test "x$ENABLE_PRECOMPH" = xyes; then
+    # Check that the compiler actually supports precomp headers.
+    if test "x$GCC" = xyes; then
+         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
+$as_echo_n "checking that precompiled headers work... " >&6; }
+         echo "int alfa();" > conftest.h
+         $CXX -x c++-header conftest.h -o conftest.hpp.gch
+         if test ! -f conftest.hpp.gch; then
+             echo Precompiled header is not working!
+             USE_PRECOMPILED_HEADER=0
+             { $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
+         rm -f conftest.h
+    fi
+fi
+
+
+
+
+# Setup use of ccache, if available
+
+    # Check whether --enable-ccache was given.
+if test "${enable_ccache+set}" = set; then :
+  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
+else
+  ENABLE_CCACHE=yes
+fi
+
+    if test "x$ENABLE_CCACHE" = xyes; then
+        # Extract the first word of "ccache", so it can be a program name with args.
+set dummy ccache; 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_CCACHE+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $CCACHE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CCACHE="$CCACHE" # 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_CCACHE="$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
+CCACHE=$ac_cv_path_CCACHE
+if test -n "$CCACHE"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
+$as_echo "$CCACHE" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
+$as_echo_n "checking for ccache... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
+$as_echo "explicitly disabled" >&6; }
+        CCACHE=
+    fi
+
+
+
+# Check whether --with-ccache-dir was given.
+if test "${with_ccache_dir+set}" = set; then :
+  withval=$with_ccache_dir;
+fi
+
+
+    if test "x$with_ccache_dir" != x; then
+        # When using a non home ccache directory, assume the use is to share ccache files
+        # with other users. Thus change the umask.
+        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
+    fi
+    CCACHE_FOUND=""
+    if test "x$CCACHE" != x; then
+
+    if test "x$CCACHE" != x; then
+        CCACHE_FOUND="true"
+        # Only use ccache if it is 3.1.4 or later, which supports
+        # precompiled headers.
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
+$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
+        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
+        if test "x$HAS_GOOD_CCACHE" = x; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
+$as_echo "no, disabling ccache" >&6; }
+            CCACHE=
+        else
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
+$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
+            PUSHED_FLAGS="$CXXFLAGS"
+            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
+            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  CC_KNOWS_CCACHE_TRICK=yes
+else
+  CC_KNOWS_CCACHE_TRICK=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+            CXXFLAGS="$PUSHED_FLAGS"
+            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; 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, disabling ccaching of precompiled headers" >&5
+$as_echo "no, disabling ccaching of precompiled headers" >&6; }
+                CCACHE=
+            fi
+        fi
+    fi
+
+    if test "x$CCACHE" != x; then
+        CCACHE_SLOPPINESS=time_macros
+        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
+        CCACHE_FLAGS=-fpch-preprocess
+
+        if test "x$SET_CCACHE_DIR" != x; then
+            mkdir -p $CCACHE_DIR > /dev/null 2>&1
+	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
+        fi
+    fi
+
+    fi
+
+
+###############################################################################
+#
+# And now the finish...
+#
+###############################################################################
+
+# Check for some common pitfalls
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
+$as_echo_n "checking if build directory is on local disk... " >&6; }
+
+	# df -l lists only local disks; if the given directory is not found then
+	# a non-zero exit code is given
+	if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
+          OUTPUT_DIR_IS_LOCAL="yes"
+        else
+          OUTPUT_DIR_IS_LOCAL="no"
+        fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
+$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
+
+# Check if the user has any old-style ALT_ variables set.
+FOUND_ALT_VARIABLES=`env | grep ^ALT_`
+
+# Before generating output files, test if they exist. If they do, this is a reconfigure.
+# Since we can't properly handle the dependencies for this, warn the user about the situation
+if test -e $OUTPUT_ROOT/spec.gmk; then
+  IS_RECONFIGURE=yes
+else
+  IS_RECONFIGURE=no
+fi
+
+if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
+  HIDE_PERFORMANCE_HINTS=yes
+else
+  HIDE_PERFORMANCE_HINTS=no
+  # Hide it the next time around...
+  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
+fi
+
+
+
+# At the end, call the closed hook. (Dummy macro if no closed sources available)
+
+
+# We're messing a bit with internal autoconf variables to put the config.status
+# in the output directory instead of the current directory.
+CONFIG_STATUS="$OUTPUT_ROOT/config.status"
+# Create the actual output files. Now the main work of configure is done.
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes: double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    test "x$cache_file" != "x/dev/null" &&
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+    cat confcache >$cache_file
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
+  fi
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+	test -d "$1/.";
+      else
+	case $1 in #(
+	-*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by openjdk $as_me jdk8, which was
+generated by GNU Autoconf 2.67.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration.  Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+      --config     print configuration, then exit
+  -q, --quiet, --silent
+                   do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+      --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+      --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Report bugs to <build-dev@openjdk.java.net>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+openjdk config.status jdk8
+configured by $0, generated by GNU Autoconf 2.67,
+  with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=?*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  --*=)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $as_echo "$ac_cs_version"; exit ;;
+  --config | --confi | --conf | --con | --co | --c )
+    $as_echo "$ac_cs_config"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
+    esac
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+  --help | --hel | -h )
+    $as_echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  shift
+  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  CONFIG_SHELL='$SHELL'
+  export CONFIG_SHELL
+  exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
+    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
+    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
+    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
+
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp=
+  trap 'exit_status=$?
+  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+  trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+  eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+  ac_cs_awk_cr='\\r'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  . ./conf$$subs.sh ||
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = ""
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+  cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
+h
+s///
+s/^/:/
+s/[	 ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[	 ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_t"; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any.  Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+  line = \$ 0
+  split(line, arg, " ")
+  if (arg[1] == "#") {
+    defundef = arg[2]
+    mac1 = arg[3]
+  } else {
+    defundef = substr(arg[1], 2)
+    mac1 = arg[2]
+  }
+  split(mac1, mac2, "(") #)
+  macro = mac2[1]
+  prefix = substr(line, 1, index(line, defundef) - 1)
+  if (D_is_set[macro]) {
+    # Preserve the white space surrounding the "#".
+    print prefix "define", macro P[macro] D[macro]
+    next
+  } else {
+    # Replace #undef with comments.  This is necessary, for example,
+    # in the case of _POSIX_SOURCE, which is predefined and required
+    # on some systems where configure will not decide to define it.
+    if (defundef == "undef") {
+      print "/*", prefix defundef, macro, "*/"
+      next
+    }
+  }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
+	 # because $ac_f cannot contain `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input='Generated from '`
+	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+	`' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+    fi
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  as_dir="$ac_dir"; as_fn_mkdir_p
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+  s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&2;}
+
+  rm -f "$tmp/stdin"
+  case $ac_file in
+  -) cat "$tmp/out" && rm -f "$tmp/out";;
+  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+  esac \
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+  if test x"$ac_file" != x-; then
+    {
+      $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+    } >"$tmp/config.h" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      rm -f "$ac_file"
+      mv "$tmp/config.h" "$ac_file" \
+	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    fi
+  else
+    $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error $? "could not create -" "$LINENO" 5
+  fi
+ ;;
+
+
+  esac
+
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
+# Finally output some useful information to the user
+
+# Finally output some useful information to the user
+
+if test "x$CCACHE_FOUND" != x; then
+	if  test "x$HAS_GOOD_CCACHE" = x; then
+		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
+		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
+	else
+		CCACHE_STATUS="installed and in use"
+	fi
+else
+	if test "x$GCC" = xyes; then
+		CCACHE_STATUS="not installed (consider installing)"
+		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
+	else
+		CCACHE_STATUS="not available for your system"
+	fi
+fi
+
+printf "\n"
+printf "====================================================\n"
+printf "A new configuration has been successfully created in\n"
+printf "$OUTPUT_ROOT\n"
+if test "x$CONFIGURE_COMMAND_LINE" != x; then
+	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
+else
+	printf "using default settings.\n"
+fi
+
+printf "\n"
+printf "Configuration summary:\n"
+printf "* Debug level:    $DEBUG_LEVEL\n"
+printf "* JDK variant:    $JDK_VARIANT\n"
+printf "* JVM variants:   $with_jvm_variants\n"
+printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
+printf "* Boot JDK:       $BOOT_JDK\n"
+
+printf "\n"
+printf "Build performance summary:\n"
+printf "* Cores to use:   $NUM_CORES\n"
+printf "* Memory limit:   $MEMORY_SIZE MB\n"
+printf "* ccache status:  $CCACHE_STATUS\n"
+printf "\n"
+
+if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
+	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
+	printf "$CCACHE_HELP_MSG\n"
+
+    # Print a helpful message on how to acquire the necessary build dependency.
+    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
+    MISSING_DEPENDENCY=ccache
+    PKGHANDLER_COMMAND=
+
+    case $PKGHANDLER in
+	apt-get)
+                apt_help     $MISSING_DEPENDENCY ;;
+    yum)
+                yum_help     $MISSING_DEPENDENCY ;;
+	port)
+                port_help    $MISSING_DEPENDENCY ;;
+	pkgutil)
+                pkgutil_help $MISSING_DEPENDENCY ;;
+	pkgadd)
+                pkgadd_help  $MISSING_DEPENDENCY ;;
+    * )
+      break ;;
+    esac
+
+    if test "x$PKGHANDLER_COMMAND" != x; then
+        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+    fi
+
+	printf "$HELP_MSG\n"
+	printf "\n"
+fi
+
+if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
+	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
+	printf "will result in longer build times.\n"
+	printf "\n"
+fi
+
+if test "x$FOUND_ALT_VARIABLES" != "x"; then
+	printf "WARNING: You have old-style ALT_ environment variables set.\n"
+	printf "These are not respected, and will be ignored. It is recommended\n"
+	printf "that you clean your environment. The following variables are set:\n"
+	printf "$FOUND_ALT_VARIABLES\n"
+	printf "\n"
+fi
+
+if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
+	printf "WARNING: Your build output directory is not on a local disk.\n"
+	printf "This will severely degrade build performance!\n"
+	printf "It is recommended that you create an output directory on a local disk,\n"
+	printf "and run the configure script again from that directory.\n"
+	printf "\n"
+fi
+
+if test "x$IS_RECONFIGURE" = "xyes"; then
+	printf "WARNING: The result of this configuration has overridden an older\n"
+	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
+	printf "proper build. Failure to do so might result in strange build problems.\n"
+	printf "\n"
+fi
+
--- a/common/autoconf/help.m4	Wed Jul 05 18:15:28 2017 +0200
+++ b/common/autoconf/help.m4	Wed Jul 05 18:16:12 2017 +0200
@@ -23,11 +23,13 @@
 # questions.
 #
 
-function prepare_help_system {
+AC_DEFUN_ONCE([HELP_SETUP_DEPENDENCY_HELP],
+[
     AC_CHECK_PROGS(PKGHANDLER, apt-get yum port pkgutil pkgadd)
-}
-	
-function help_on_build_dependency {
+])
+
+AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
+[
     # Print a helpful message on how to acquire the necessary build dependency.
     # $1 is the help tag: freetyp2, cups, pulse, alsa etc
     MISSING_DEPENDENCY=$1
@@ -51,9 +53,9 @@
     if test "x$PKGHANDLER_COMMAND" != x; then
         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
     fi
-}
+])
 
-function apt_help {
+apt_help() {
     case $1 in
     devkit)
         PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
@@ -76,7 +78,7 @@
     esac
 }
 
-function yum_help {
+yum_help() {
     case $1 in
     devkit)
         PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
@@ -99,14 +101,97 @@
     esac
 }
 
-function port_help {
+port_help() {
+    PKGHANDLER_COMMAND=""
+}
+
+pkgutil_help() {
+    PKGHANDLER_COMMAND=""
+}
+
+pkgadd_help() {
     PKGHANDLER_COMMAND=""
 }
 
-function pkgutil_help {
-    PKGHANDLER_COMMAND=""
-}
+AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
+[
+# Finally output some useful information to the user
+
+if test "x$CCACHE_FOUND" != x; then
+	if  test "x$HAS_GOOD_CCACHE" = x; then
+		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
+		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
+	else
+		CCACHE_STATUS="installed and in use"
+	fi
+else
+	if test "x$GCC" = xyes; then
+		CCACHE_STATUS="not installed (consider installing)"
+		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
+	else
+		CCACHE_STATUS="not available for your system"
+	fi
+fi
+
+printf "\n"
+printf "====================================================\n"
+printf "A new configuration has been successfully created in\n"
+printf "$OUTPUT_ROOT\n"
+if test "x$CONFIGURE_COMMAND_LINE" != x; then
+	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
+else
+	printf "using default settings.\n"
+fi
+
+printf "\n"
+printf "Configuration summary:\n"
+printf "* Debug level:    $DEBUG_LEVEL\n"
+printf "* JDK variant:    $JDK_VARIANT\n"
+printf "* JVM variants:   $with_jvm_variants\n"
+printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
+printf "* Boot JDK:       $BOOT_JDK\n"
 
-function pkgadd_help {
-    PKGHANDLER_COMMAND=""
-}
+printf "\n"
+printf "Build performance summary:\n"
+printf "* Cores to use:   $NUM_CORES\n"
+printf "* Memory limit:   $MEMORY_SIZE MB\n"
+printf "* ccache status:  $CCACHE_STATUS\n"
+printf "\n"
+
+if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
+	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
+	printf "$CCACHE_HELP_MSG\n"
+	HELP_MSG_MISSING_DEPENDENCY([ccache])
+	printf "$HELP_MSG\n"
+	printf "\n"
+fi
+
+if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
+	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
+	printf "will result in longer build times.\n"
+	printf "\n"
+fi
+
+if test "x$FOUND_ALT_VARIABLES" != "x"; then
+	printf "WARNING: You have old-style ALT_ environment variables set.\n"
+	printf "These are not respected, and will be ignored. It is recommended\n"
+	printf "that you clean your environment. The following variables are set:\n"
+	printf "$FOUND_ALT_VARIABLES\n"
+	printf "\n"
+fi
+
+if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
+	printf "WARNING: Your build output directory is not on a local disk.\n"
+	printf "This will severely degrade build performance!\n"
+	printf "It is recommended that you create an output directory on a local disk,\n"
+	printf "and run the configure script again from that directory.\n"
+	printf "\n"
+fi
+
+if test "x$IS_RECONFIGURE" = "xyes"; then
+	printf "WARNING: The result of this configuration has overridden an older\n"
+	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
+	printf "proper build. Failure to do so might result in strange build problems.\n"
+	printf "\n"
+fi
+])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/jdk-options.m4	Wed Jul 05 18:16:12 2017 +0200
@@ -0,0 +1,551 @@
+#
+# 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_ONCE([JDKOPT_SETUP_JDK_VARIANT],
+[
+###############################################################################
+#
+# Check which variant of the JDK that we want to build.
+# Currently we have:
+#    normal:   standard edition   
+#    embedded: cut down to a smaller footprint
+#
+# Effectively the JDK variant gives a name to a specific set of
+# modules to compile into the JDK. In the future, these modules
+# might even be Jigsaw modules.
+#
+AC_MSG_CHECKING([which variant of the JDK to build])
+AC_ARG_WITH([jdk-variant], [AS_HELP_STRING([--with-jdk-variant],
+	[JDK variant to build (normal, embedded) @<:@normal@:>@])])
+
+if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
+    JAVASE_EMBEDDED=""
+    MINIMIZE_RAM_USAGE=""
+    JDK_VARIANT="normal"
+elif test "x$with_jdk_variant" = xembedded; then
+    JAVASE_EMBEDDED="JAVASE_EMBEDDED:=true"
+    MINIMIZE_RAM_USAGE="MINIMIZE_RAM_USAGE:=true"
+    JDK_VARIANT="embedded"
+else
+    AC_MSG_ERROR([The available JDK variants are: normal, embedded])
+fi
+                              
+AC_SUBST(JAVASE_EMBEDDED)
+AC_SUBST(MINIMIZE_RAM_USAGE)
+AC_SUBST(JDK_VARIANT)
+
+AC_MSG_RESULT([$JDK_VARIANT])
+])
+
+AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS],
+[
+
+###############################################################################
+#
+# Check which variants of the JVM that we want to build.
+# Currently we have:
+#    server: normal interpreter and a tiered C1/C2 compiler
+#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
+#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
+#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
+#    zero: no machine code interpreter, no compiler
+#    zeroshark: zero interpreter and shark/llvm compiler backend
+AC_MSG_CHECKING([which variants of the JVM that should be built])
+AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
+	[JVM variants (separated by commas) to build (server, client, kernel, zero, zeroshark) @<:@server@:>@])])
+
+if test "x$with_jvm_variants" = x; then
+    if test "x$JDK_VARIANT" = xembedded; then
+        with_jvm_variants="client"
+    else
+        with_jvm_variants="server"
+    fi
+fi
+
+JVM_VARIANTS=",$with_jvm_variants,"
+TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
+
+if test "x$TEST_VARIANTS" != "x,"; then
+   AC_MSG_ERROR([The available JVM variants are: server, client, kernel, zero, zeroshark])
+fi   
+AC_MSG_RESULT([$with_jvm_variants])
+
+JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
+JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'` 
+JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
+JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
+JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
+
+if test "x$JVM_VARIANT_CLIENT" = xtrue; then
+    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+        AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.])
+    fi
+fi
+if test "x$JVM_VARIANT_KERNEL" = xtrue; then
+    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+        AC_MSG_ERROR([You cannot build a kernel JVM for a 64-bit machine.])
+    fi
+fi
+
+# Replace the commas with AND for use in the build directory name.
+ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
+COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
+if test "x$COUNT_VARIANTS" != "x,1"; then
+    BUILDING_MULTIPLE_JVM_VARIANTS=yes
+else
+    BUILDING_MULTIPLE_JVM_VARIANTS=no
+fi
+
+AC_SUBST(JVM_VARIANTS)
+AC_SUBST(JVM_VARIANT_SERVER)
+AC_SUBST(JVM_VARIANT_CLIENT)
+AC_SUBST(JVM_VARIANT_KERNEL)
+AC_SUBST(JVM_VARIANT_ZERO)
+AC_SUBST(JVM_VARIANT_ZEROSHARK)
+
+
+])
+
+AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_LEVEL],
+[
+###############################################################################
+#
+# Set the debug level
+#    release: no debug information, all optimizations, no asserts.
+#    fastdebug: debug information (-g), all optimizations, all asserts
+#    slowdebug: debug information (-g), no optimizations, all asserts
+#
+DEBUG_LEVEL="release"              
+AC_MSG_CHECKING([which debug level to use])
+AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug],
+	[set the debug level to fastdebug (shorthand for --with-debug-level=fastdebug) @<:@disabled@:>@])],
+	[
+        ENABLE_DEBUG="${enableval}"
+        DEBUG_LEVEL="fastdebug"
+    ], [ENABLE_DEBUG="no"])
+
+AC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level],
+	[set the debug level (release, fastdebug, slowdebug) @<:@release@:>@])],
+	[
+        DEBUG_LEVEL="${withval}"
+        if test "x$ENABLE_DEBUG" = xyes; then
+			AC_MSG_ERROR([You cannot use both --enable-debug and --with-debug-level at the same time.])
+        fi
+    ])
+AC_MSG_RESULT([$DEBUG_LEVEL])
+
+if test "x$DEBUG_LEVEL" != xrelease && \
+   test "x$DEBUG_LEVEL" != xfastdebug && \
+   test "x$DEBUG_LEVEL" != xslowdebug; then
+   AC_MSG_ERROR([Allowed debug levels are: release, fastdebug and slowdebug])
+fi
+
+
+###############################################################################
+#
+# Setup legacy vars/targets and new vars to deal with different debug levels.
+#
+
+case $DEBUG_LEVEL in
+      release )
+          VARIANT="OPT"
+          FASTDEBUG="false"
+          DEBUG_CLASSFILES="false"            
+          BUILD_VARIANT_RELEASE=""             
+          HOTSPOT_DEBUG_LEVEL="product"
+          HOTSPOT_EXPORT="product"
+           ;;
+      fastdebug )
+          VARIANT="DBG"
+          FASTDEBUG="true"
+          DEBUG_CLASSFILES="true"            
+          BUILD_VARIANT_RELEASE="-fastdebug"
+          HOTSPOT_DEBUG_LEVEL="fastdebug"   
+          HOTSPOT_EXPORT="fastdebug"
+           ;;
+      slowdebug )
+          VARIANT="DBG"
+          FASTDEBUG="false"
+          DEBUG_CLASSFILES="true"            
+          BUILD_VARIANT_RELEASE="-debug"             
+          HOTSPOT_DEBUG_LEVEL="jvmg"
+          HOTSPOT_EXPORT="debug"
+           ;;
+esac
+
+#####
+# Generate the legacy makefile targets for hotspot.
+# The hotspot api for selecting the build artifacts, really, needs to be improved.
+#
+HOTSPOT_TARGET=""
+
+if test "x$JVM_VARIANT_SERVER" = xtrue; then
+    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
+fi
+
+if test "x$JVM_VARIANT_CLIENT" = xtrue; then
+    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
+fi
+
+if test "x$JVM_VARIANT_KERNEL" = xtrue; then
+    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
+fi
+
+if test "x$JVM_VARIANT_ZERO" = xtrue; then
+    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
+fi
+
+if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
+    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
+fi
+
+HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
+
+#####
+
+AC_SUBST(DEBUG_LEVEL)
+AC_SUBST(VARIANT)
+AC_SUBST(FASTDEBUG)
+AC_SUBST(DEBUG_CLASSFILES)
+AC_SUBST(BUILD_VARIANT_RELEASE)
+])
+
+AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
+[
+
+###############################################################################
+#
+# Should we build only OpenJDK even if closed sources are present?
+#
+AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only],
+    [build OpenJDK regardless of the presence of closed repositories @<:@disabled@:>@])],,)
+
+if test "x$enable_openjdk_only" = "xyes"; then
+    OPENJDK=true
+elif test "x$enable_openjdk_only" = "xno"; then
+    OPENJDK=false
+elif test -d "$SRC_ROOT/jdk/src/closed"; then
+    OPENJDK=false
+else
+    OPENJDK=true
+fi
+
+if test "x$OPENJDK" = "xtrue"; then
+    SET_OPENJDK=OPENJDK=true
+fi
+
+AC_SUBST(SET_OPENJDK)
+
+###############################################################################
+#
+# JIGSAW or not.  The JIGSAW variable is used during the intermediate
+# stage when we are building both the old style JDK and the new style modularized JDK.
+# When the modularized JDK is finalized, this option will go away.
+#
+AC_ARG_ENABLE([jigsaw], [AS_HELP_STRING([--enable-jigsaw],
+    [build Jigsaw images (not yet available) @<:@disabled@:>@])],,)
+
+if test "x$enable_jigsaw" = "xyes"; then
+    JIGSAW=true
+else
+    JIGSAW=false
+fi
+AC_SUBST(JIGSAW)
+
+###############################################################################
+#
+# Should we build a JDK/JVM with headful support (ie a graphical ui)?
+# We always build headless support.
+#
+AC_MSG_CHECKING([headful support])
+AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful],
+	[build headful support (graphical UI support) @<:@enabled@:>@])],
+    [SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes])
+
+SUPPORT_HEADLESS=yes
+BUILD_HEADLESS="BUILD_HEADLESS:=true"
+
+if test "x$SUPPORT_HEADFUL" = xyes; then
+    # We are building both headful and headless.
+    BUILD_HEADLESS_ONLY=""
+    headful_msg="inlude support for both headful and headless"
+fi
+
+if test "x$SUPPORT_HEADFUL" = xno; then
+    # Thus we are building headless only.
+    BUILD_HEADLESS="BUILD_HEADLESS:=true"
+    BUILD_HEADLESS_ONLY="BUILD_HEADLESS_ONLY:=true"
+    headful_msg="headless only"
+fi
+
+AC_MSG_RESULT([$headful_msg])
+
+AC_SUBST(SUPPORT_HEADLESS)
+AC_SUBST(SUPPORT_HEADFUL)
+AC_SUBST(BUILD_HEADLESS)
+AC_SUBST(BUILD_HEADLESS_ONLY)
+
+###############################################################################
+#
+# Should we run the painfully slow javadoc tool?
+#
+AC_MSG_CHECKING([whether to build documentation])
+AC_ARG_ENABLE([docs], [AS_HELP_STRING([--enable-docs],
+	[enable generation of Javadoc documentation @<:@disabled@:>@])],
+	[ENABLE_DOCS="${enableval}"], [ENABLE_DOCS='no'])
+AC_MSG_RESULT([$ENABLE_DOCS])
+AC_SUBST(ENABLE_DOCS)
+GENERATE_DOCS=false
+if test "x$ENABLE_DOCS" = xyes; then
+    GENERATE_DOCS=true
+fi
+AC_SUBST(GENERATE_DOCS)
+
+###############################################################################
+#
+# Should we compile nimbus swing L&F? We can probably remove this option
+# since nimbus is officially part of javax now.
+#
+AC_MSG_CHECKING([whether to build nimbus L&F])
+AC_ARG_ENABLE([nimbus], [AS_HELP_STRING([--disable-nimbus],
+	[disable Nimbus L&F @<:@enabled@:>@])],
+	[ENABLE_NIMBUS="${enableval}"], [ENABLE_NIMBUS='yes'])
+AC_MSG_RESULT([$ENABLE_NIMBUS])
+DISABLE_NIMBUS=
+if test "x$ENABLE_NIMBUS" = xno; then
+    DISABLE_NIMBUS=true
+fi
+AC_SUBST(DISABLE_NIMBUS)
+
+# Control wether Hotspot runs Queens test after build.
+AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build],
+	[enable running of Queens test after Hotspot build (not yet available) @<:@disabled@:>@])],,
+    [enable_hotspot_test_in_build=no])
+if test "x$enable_hotspot_test_in_build" = "xyes"; then
+    TEST_IN_BUILD=true
+else
+    TEST_IN_BUILD=false
+fi
+AC_SUBST(TEST_IN_BUILD)
+
+###############################################################################
+#
+# Choose cacerts source file
+#
+AC_ARG_WITH(cacerts-file, [AS_HELP_STRING([--with-cacerts-file],
+    [specify alternative cacerts file])])
+if test "x$with_cacerts_file" != x; then
+    CACERTS_FILE=$with_cacerts_file
+else
+    if test "x$OPENJDK" = "xtrue"; then
+        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
+    else
+        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
+    fi
+fi
+AC_SUBST(CACERTS_FILE)
+
+###############################################################################
+#
+# Compress jars
+#
+COMPRESS_JARS=false
+
+# default for embedded is yes...
+if test "x$JDK_VARIANT" = "xembedded"; then
+   COMPRESS_JARS=true
+fi
+AC_SUBST(COMPRESS_JARS)
+
+###############################################################################
+#
+# Should we compile JFR
+#   default no, except for on closed-jdk and !embedded
+#
+ENABLE_JFR=no
+
+# Is the JFR source present
+
+#
+# For closed && !embedded default is yes if the source is present
+#
+if test "x${OPENJDK}" != "xtrue" && test "x$JDK_VARIANT" != "xembedded" && test -d "$SRC_ROOT/jdk/src/closed/share/native/oracle/jfr"; then
+   ENABLE_JFR=yes
+fi
+
+AC_MSG_CHECKING([whether to build jfr])
+AC_ARG_ENABLE([jfr], [AS_HELP_STRING([--enable-jfr],
+	[enable jfr (default is no)])]
+	[ENABLE_JFR="${enableval}"])
+AC_MSG_RESULT([${ENABLE_JFR}])
+
+if test "x$ENABLE_JFR" = "xyes"; then
+    ENABLE_JFR=true
+elif test "x$ENABLE_JFR" = "xno"; then
+    ENABLE_JFR=false
+else
+   AC_MSG_ERROR([Invalid argument to --enable-jfr])
+fi
+
+AC_SUBST(ENABLE_JFR)
+])
+
+AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS],
+[
+# Source the version numbers
+. $AUTOCONF_DIR/version.numbers
+if test "x$OPENJDK" = "xfalse"; then
+    . $AUTOCONF_DIR/closed.version.numbers
+fi
+# Now set the JDK version, milestone, build number etc.
+AC_SUBST(JDK_MAJOR_VERSION)
+AC_SUBST(JDK_MINOR_VERSION)
+AC_SUBST(JDK_MICRO_VERSION)
+AC_SUBST(JDK_UPDATE_VERSION)
+AC_SUBST(JDK_BUILD_NUMBER)
+AC_SUBST(MILESTONE)
+AC_SUBST(LAUNCHER_NAME)
+AC_SUBST(PRODUCT_NAME)
+AC_SUBST(PRODUCT_SUFFIX)
+AC_SUBST(JDK_RC_PLATFORM_NAME)
+AC_SUBST(COMPANY_NAME)
+
+COPYRIGHT_YEAR=`date +'%Y'`
+AC_SUBST(COPYRIGHT_YEAR)
+
+RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
+AC_SUBST(RUNTIME_NAME)
+
+if test "x$JDK_UPDATE_VERSION" != x; then
+    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
+else
+    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
+fi
+AC_SUBST(JDK_VERSION)
+
+if test "x$MILESTONE" != x; then
+    RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
+else
+    RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
+fi
+AC_SUBST(RELEASE)
+
+if test "x$JDK_BUILD_NUMBER" != x; then
+    FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
+else
+    JDK_BUILD_NUMBER=b00
+    BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
+    # Avoid [:alnum:] since it depends on the locale.
+    CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
+    USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
+    FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
+fi
+AC_SUBST(FULL_VERSION)
+COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
+AC_SUBST(COOKED_BUILD_NUMBER)
+])
+
+AC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS],
+[
+HOTSPOT_MAKE_ARGS="ALT_OUTPUTDIR=$HOTSPOT_OUTPUTDIR ALT_EXPORT_PATH=$HOTSPOT_DIST $HOTSPOT_TARGET"
+AC_SUBST(HOTSPOT_MAKE_ARGS)
+
+# The name of the Service Agent jar.
+SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
+if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
+fi
+AC_SUBST(SALIB_NAME)
+
+])
+
+AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
+[
+#
+# ENABLE_DEBUG_SYMBOLS
+# This must be done after the toolchain is setup, since we're looking at objcopy.
+#
+ENABLE_DEBUG_SYMBOLS=default
+
+# default on macosx is no...
+if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+   ENABLE_DEBUG_SYMBOLS=no
+fi
+
+# default for embedded is no...
+if test "x$JDK_VARIANT" = "xembedded"; then
+   ENABLE_DEBUG_SYMBOLS=no
+fi
+
+AC_ARG_ENABLE([debug-symbols],
+              [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols (@<:@enabled@:>@)])],
+              [ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}],
+)
+
+AC_MSG_CHECKING([if we should generate debug symbols])
+
+if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then
+   # explicit enabling of enable-debug-symbols and can't find objcopy
+   #   this is an error
+   AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols])
+fi
+
+if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
+  # Default is on if objcopy is found, otherwise off
+  if test "x$OBJCOPY" != x; then
+     ENABLE_DEBUG_SYMBOLS=yes
+  else
+     ENABLE_DEBUG_SYMBOLS=no
+  fi
+fi
+
+AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS])
+
+#
+# ZIP_DEBUGINFO_FILES
+#
+ZIP_DEBUGINFO_FILES=yes
+
+AC_ARG_ENABLE([zip-debug-info],
+              [AS_HELP_STRING([--disable-zip-debug-info],[don't zip debug-info files (@<:@enabled@:@)])],
+              [ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}],
+)
+
+AC_MSG_CHECKING([if we should zip debug-info files])
+AC_MSG_RESULT([$ZIP_DEBUGINFO_FILES])
+
+# Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes
+#   use that...
+if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
+   ZIP_DEBUGINFO_FILES=1
+else
+   ZIP_DEBUGINFO_FILES=0
+fi
+
+AC_SUBST(ENABLE_DEBUG_SYMBOLS)
+AC_SUBST(ZIP_DEBUGINFO_FILES)
+AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
+AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
+])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/libraries.m4	Wed Jul 05 18:16:12 2017 +0200
@@ -0,0 +1,642 @@
+#
+# 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_ONCE([LIB_SETUP_INIT],
+[
+        
+###############################################################################
+#
+# OS specific settings that we never will need to probe.
+#
+if test "x$OPENJDK_TARGET_OS" = xlinux; then
+    AC_MSG_CHECKING([what is not needed on Linux?])
+    PULSE_NOT_NEEDED=yes
+    AC_MSG_RESULT([pulse])
+fi
+
+if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+    AC_MSG_CHECKING([what is not needed on Solaris?])
+    ALSA_NOT_NEEDED=yes
+    PULSE_NOT_NEEDED=yes
+    AC_MSG_RESULT([alsa pulse])
+fi
+
+if test "x$OPENJDK_TARGET_OS" = xwindows; then
+    AC_MSG_CHECKING([what is not needed on Windows?])
+    CUPS_NOT_NEEDED=yes    
+    ALSA_NOT_NEEDED=yes
+    PULSE_NOT_NEEDED=yes
+    X11_NOT_NEEDED=yes
+    AC_MSG_RESULT([alsa cups pulse x11])
+fi
+
+if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+    AC_MSG_CHECKING([what is not needed on MacOSX?])
+    ALSA_NOT_NEEDED=yes
+    PULSE_NOT_NEEDED=yes
+    X11_NOT_NEEDED=yes
+    FREETYPE2_NOT_NEEDED=yes    
+    # If the java runtime framework is disabled, then we need X11.
+    # This will be adjusted below.
+    AC_MSG_RESULT([alsa pulse x11])
+fi
+
+if test "x$OPENJDK_TARGET_OS" = xbsd; then
+    AC_MSG_CHECKING([what is not needed on bsd?])
+    ALSA_NOT_NEEDED=yes
+    AC_MSG_RESULT([alsa])    
+fi
+
+if test "x$OPENJDK" = "xfalse"; then
+    FREETYPE2_NOT_NEEDED=yes
+fi
+
+###############################################################################
+#
+# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
+# that uses this API. 
+#
+AC_ARG_ENABLE([macosx-runtime-support], [AS_HELP_STRING([--disable-macosx-runtime-support],
+	[disable the use of MacOSX Java runtime support framework @<:@enabled@:>@])],
+	[MACOSX_RUNTIME_SUPPORT="${enableval}"],[MACOSX_RUNTIME_SUPPORT="no"])
+
+USE_MACOSX_RUNTIME_SUPPORT=no
+AC_MSG_CHECKING([for explicit Java runtime support in the OS])
+if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
+    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
+        MACOSX_RUNTIME_SUPPORT=yes
+        USE_MACOSX_RUNTIME_SUPPORT=yes
+        AC_MSG_RESULT([yes, does not need alsa freetype2 pulse and X11])
+    else
+        AC_MSG_RESULT([yes, but explicitly disabled.])
+    fi
+else
+    AC_MSG_RESULT([no])
+fi
+
+if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
+    AC_MSG_CHECKING([what is not needed on an X11 build on MacOSX?])
+    X11_NOT_NEEDED=
+    FREETYPE2_NOT_NEEDED=
+    AC_MSG_RESULT([alsa pulse])
+fi
+])
+
+AC_DEFUN_ONCE([LIB_SETUP_X11],
+[
+
+###############################################################################
+#
+# Check for X Windows
+#
+
+# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
+# Make a simple check for the libraries at the sysroot, and setup --x-includes and
+# --x-libraries for the sysroot, if that seems to be correct.
+if test "x$SYS_ROOT" != "x/"; then
+  if test "x$x_includes" = xNONE; then
+    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
+      x_includes="$SYS_ROOT/usr/X11R6/include"
+    fi
+  fi
+  if test "x$x_libraries" = xNONE; then
+    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
+      x_libraries="$SYS_ROOT/usr/X11R6/lib"
+    fi
+  fi
+fi
+
+# Now let autoconf do it's magic
+AC_PATH_X
+AC_PATH_XTRA
+
+if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then 
+    HELP_MSG_MISSING_DEPENDENCY([x11])
+    AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG])
+fi
+
+# Some of the old makefiles require a setting of OPENWIN_HOME
+# Since the X11R6 directory has disappeared on later Linuxes,
+# we need to probe for it.
+if test "x$OPENJDK_TARGET_OS" = xlinux; then
+    if test -d "$SYS_ROOT/usr/X11R6"; then
+        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
+    fi
+    if test -d "$SYS_ROOT/usr/include/X11"; then
+        OPENWIN_HOME="$SYS_ROOT/usr"
+    fi
+fi
+if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+    OPENWIN_HOME="/usr/openwin"
+fi
+AC_SUBST(OPENWIN_HOME)
+
+
+#
+# Weird Sol10 something check...TODO change to try compile
+#
+if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
+  if test "`uname -r`" = "5.10"; then
+     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
+     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
+     fi
+  fi
+fi
+
+AC_LANG_PUSH(C)
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $X_CFLAGS"
+AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h],
+                [X11_A_OK=yes],
+                [X11_A_OK=no])
+CFLAGS="$OLD_CFLAGS"
+AC_LANG_POP(C)
+
+if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then 
+    HELP_MSG_MISSING_DEPENDENCY([x11])
+    AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG])
+fi
+
+AC_SUBST(X_CFLAGS)
+AC_SUBST(X_LIBS)
+])
+
+AC_DEFUN_ONCE([LIB_SETUP_CUPS],
+[
+
+###############################################################################
+#
+# The common unix printing system cups is used to print from java.
+#
+AC_ARG_WITH(cups, [AS_HELP_STRING([--with-cups],
+    [specify prefix directory for the cups package
+	 (expecting the libraries under PATH/lib and the headers under PATH/include)])])
+AC_ARG_WITH(cups-include, [AS_HELP_STRING([--with-cups-include],
+	[specify directory for the cups include files])])
+AC_ARG_WITH(cups-lib, [AS_HELP_STRING([--with-cups-lib],
+	[specify directory for the cups library])])
+
+if test "x$CUPS_NOT_NEEDED" = xyes; then
+	if test "x${with_cups}" != x || test "x${with_cups_include}" != x || test "x${with_cups_lib}" != x; then
+		AC_MSG_WARN([cups not used, so --with-cups is ignored])
+	fi
+	CUPS_CFLAGS=
+	CUPS_LIBS=
+else
+	CUPS_FOUND=no
+
+	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno || test "x${with_cups_lib}" = xno; then
+	    AC_MSG_ERROR([It is not possible to disable the use of cups. Remove the --without-cups option.])
+	fi
+
+	if test "x${with_cups}" != x; then
+	    CUPS_LIBS="-L${with_cups}/lib -lcups"
+	    CUPS_CFLAGS="-I${with_cups}/include"
+	    CUPS_FOUND=yes
+	fi
+	if test "x${with_cups_include}" != x; then
+	    CUPS_CFLAGS="-I${with_cups_include}"
+	    CUPS_FOUND=yes
+	fi
+	if test "x${with_cups_lib}" != x; then
+	    CUPS_LIBS="-L${with_cups_lib} -lcups"
+	    CUPS_FOUND=yes
+	fi
+	if test "x$CUPS_FOUND" = xno; then
+	    BDEPS_CHECK_MODULE(CUPS, cups, xxx, [CUPS_FOUND=yes])
+	fi
+	if test "x$CUPS_FOUND" = xno; then
+	    # Are the cups headers installed in the default /usr/include location?
+	    AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],
+	                     [CUPS_FOUND=yes
+	                      CUPS_CFLAGS=
+	                      CUPS_LIBS="-lcups"
+	                      DEFAULT_CUPS=yes])
+	fi
+	if test "x$CUPS_FOUND" = xno; then
+	    # Getting nervous now? Lets poke around for standard Solaris third-party
+	    # package installation locations.
+	    AC_MSG_CHECKING([for cups headers and libs])
+	    if test -s /opt/sfw/cups/include/cups/cups.h; then
+	       # An SFW package seems to be installed!
+	       CUPS_FOUND=yes
+	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
+	       CUPS_LIBS="-L/opt/sfw/cups/lib -lcups"
+	    elif test -s /opt/csw/include/cups/cups.h; then
+	       # A CSW package seems to be installed!
+	       CUPS_FOUND=yes
+	       CUPS_CFLAGS="-I/opt/csw/include"
+	       CUPS_LIBS="-L/opt/csw/lib -lcups"
+	    fi
+	    AC_MSG_RESULT([$CUPS_FOUND])
+	fi
+	if test "x$CUPS_FOUND" = xno; then 
+	    HELP_MSG_MISSING_DEPENDENCY([cups])
+	    AC_MSG_ERROR([Could not find cups! $HELP_MSG ])
+	fi
+fi
+
+AC_SUBST(CUPS_CFLAGS)
+AC_SUBST(CUPS_LIBS)
+
+])
+
+AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
+[
+
+###############################################################################
+#
+# The ubiquitous freetype2 library is used to render fonts.
+#
+AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype],
+	[specify prefix directory for the freetype2 package
+     (expecting the libraries under PATH/lib and the headers under PATH/include)])])
+
+# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
+USING_SYSTEM_FT_LIB=false
+
+if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
+	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
+		AC_MSG_WARN([freetype not used, so --with-freetype is ignored])
+	fi
+	FREETYPE2_CFLAGS=
+	FREETYPE2_LIBS=
+        FREETYPE2_LIB_PATH=
+else
+	FREETYPE2_FOUND=no
+
+	if test "x$with_freetype" != x; then
+            SPACESAFE(with_freetype,[the path to freetype])
+	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
+            if test "x$OPENJDK_TARGET_OS" = xwindows; then
+                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
+            fi
+            FREETYPE2_LIB_PATH="$with_freetype/lib"
+	    FREETYPE2_CFLAGS="-I$with_freetype/include"
+            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
+                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
+            fi
+	    FREETYPE2_FOUND=yes
+   	    if test "x$FREETYPE2_FOUND" = xyes; then
+	        # Verify that the directories exist 
+                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
+		   AC_MSG_ERROR([Could not find the expected directories $with_freetype/lib and $with_freetype/include])
+		fi
+	        # List the contents of the lib.
+		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
+                if test "x$FREETYPELIB" = x; then
+		   AC_MSG_ERROR([Could not find libfreetype.se nor freetype.dll in $with_freetype/lib])
+		fi
+	        # Check one h-file
+                if ! test -s "$with_freetype/include/ft2build.h"; then
+		   AC_MSG_ERROR([Could not find $with_freetype/include/ft2build.h])
+		fi
+            fi
+        fi
+	if test "x$FREETYPE2_FOUND" = xno; then
+	    BDEPS_CHECK_MODULE(FREETYPE2, freetype2, xxx, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no])
+            USING_SYSTEM_FT_LIB=true
+	fi
+	if test "x$FREETYPE2_FOUND" = xno; then
+	    PKG_CHECK_MODULES(FREETYPE2, freetype2, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no])
+            USING_SYSTEM_FT_LIB=true
+	fi
+	if test "x$FREETYPE2_FOUND" = xno; then
+	    AC_MSG_CHECKING([for freetype in some standard locations])
+	
+	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
+	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
+	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
+	    fi
+	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
+	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
+	        DEFAULT_FREETYPE_LIBS="-lfreetype"
+	    fi
+	
+	    PREV_CXXCFLAGS="$CXXFLAGS"
+	    PREV_LDFLAGS="$LDFLAGS"
+	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
+	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
+	    AC_LINK_IFELSE([AC_LANG_SOURCE([[#include<ft2build.h>
+	                    #include FT_FREETYPE_H 
+	                   int main() { return 0; }
+	                  ]])],
+	                  [
+	                      # Yes, the default cflags and libs did the trick.
+	                      FREETYPE2_FOUND=yes
+	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
+	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
+	                  ],
+	                  [
+	                      FREETYPE2_FOUND=no
+	                  ])
+            CXXCFLAGS="$PREV_CXXFLAGS"
+	    LDFLAGS="$PREV_LDFLAGS"
+	    AC_MSG_RESULT([$FREETYPE2_FOUND])
+            USING_SYSTEM_FT_LIB=true
+	fi
+	if test "x$FREETYPE2_FOUND" = xno; then
+		HELP_MSG_MISSING_DEPENDENCY([freetype2])
+		AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ])
+	fi    
+fi
+
+AC_SUBST(USING_SYSTEM_FT_LIB)
+AC_SUBST(FREETYPE2_LIB_PATH)
+AC_SUBST(FREETYPE2_CFLAGS)
+AC_SUBST(FREETYPE2_LIBS)
+
+])
+
+AC_DEFUN_ONCE([LIB_SETUP_ALSA],
+[
+
+###############################################################################
+#
+# Check for alsa headers and libraries. Used on Linux/GNU systems.
+#
+AC_ARG_WITH(alsa, [AS_HELP_STRING([--with-alsa],
+	[specify prefix directory for the alsa package
+	 (expecting the libraries under PATH/lib and the headers under PATH/include)])])
+AC_ARG_WITH(alsa-include, [AS_HELP_STRING([--with-alsa-include],
+	[specify directory for the alsa include files])])
+AC_ARG_WITH(alsa-lib, [AS_HELP_STRING([--with-alsa-lib],
+	[specify directory for the alsa library])])
+
+if test "x$ALSA_NOT_NEEDED" = xyes; then
+	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
+		AC_MSG_WARN([alsa not used, so --with-alsa is ignored])
+	fi
+	ALSA_CFLAGS=
+	ALSA_LIBS=
+else
+	ALSA_FOUND=no
+
+	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
+	    AC_MSG_ERROR([It is not possible to disable the use of alsa. Remove the --without-alsa option.])
+	fi
+
+	if test "x${with_alsa}" != x; then
+	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
+	    ALSA_CFLAGS="-I${with_alsa}/include"
+	    ALSA_FOUND=yes
+	fi
+	if test "x${with_alsa_include}" != x; then
+	    ALSA_CFLAGS="-I${with_alsa_include}"
+	    ALSA_FOUND=yes
+	fi
+	if test "x${with_alsa_lib}" != x; then
+	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
+	    ALSA_FOUND=yes
+	fi
+	if test "x$ALSA_FOUND" = xno; then
+	    BDEPS_CHECK_MODULE(ALSA, alsa, xxx, [ALSA_FOUND=yes], [ALSA_FOUND=no])
+	fi
+	if test "x$ALSA_FOUND" = xno; then
+	    PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no])
+	fi
+	if test "x$ALSA_FOUND" = xno; then
+	    AC_CHECK_HEADERS([alsa/asoundlib.h],
+	                     [ALSA_FOUND=yes
+	                      ALSA_CFLAGS=-Iignoreme
+	                      ALSA_LIBS=-lasound
+	                      DEFAULT_ALSA=yes],
+	                     [ALSA_FOUND=no])
+	fi
+	if test "x$ALSA_FOUND" = xno; then 
+	    HELP_MSG_MISSING_DEPENDENCY([alsa])
+	    AC_MSG_ERROR([Could not find alsa! $HELP_MSG ])
+	fi    
+fi
+
+AC_SUBST(ALSA_CFLAGS)
+AC_SUBST(ALSA_LIBS)
+
+])
+
+AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
+[
+
+###############################################################################
+#
+# Check for the jpeg library
+#
+
+USE_EXTERNAL_LIBJPEG=true
+AC_CHECK_LIB(jpeg, main, [],
+             [ USE_EXTERNAL_LIBJPEG=false
+               AC_MSG_NOTICE([Will use jpeg decoder bundled with the OpenJDK source])
+             ])
+AC_SUBST(USE_EXTERNAL_LIBJPEG)
+        
+###############################################################################
+#
+# Check for the gif library
+#
+
+USE_EXTERNAL_LIBJPEG=true
+AC_CHECK_LIB(gif, main, [],
+             [ USE_EXTERNAL_LIBGIF=false
+               AC_MSG_NOTICE([Will use gif decoder bundled with the OpenJDK source])
+             ])
+AC_SUBST(USE_EXTERNAL_LIBGIF)
+
+###############################################################################
+#
+# Check for the zlib library
+#
+
+AC_ARG_WITH(zlib, [AS_HELP_STRING([--with-zlib],
+	[use zlib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
+
+AC_CHECK_LIB(z, compress,
+             [ ZLIB_FOUND=yes ],
+             [ ZLIB_FOUND=no ])
+
+AC_MSG_CHECKING([for which zlib to use])
+
+DEFAULT_ZLIB=bundled
+if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+#
+# On macosx default is system...on others default is 
+#
+    DEFAULT_ZLIB=system
+fi
+
+if test "x${ZLIB_FOUND}" != "xyes"; then
+#
+# If we don't find any system...set default to bundled
+#
+    DEFAULT_ZLIB=bundled
+fi
+
+#
+# If user didn't specify, use DEFAULT_ZLIB
+#
+if test "x${with_zlib}" = "x"; then
+    with_zlib=${DEFAULT_ZLIB}
+fi
+
+if test "x${with_zlib}" = "xbundled"; then
+    USE_EXTERNAL_LIBZ=false
+    AC_MSG_RESULT([bundled])
+elif test "x${with_zlib}" = "xsystem"; then
+    if test "x${ZLIB_FOUND}" = "xyes"; then
+        USE_EXTERNAL_LIBZ=true
+        AC_MSG_RESULT([system])
+    else
+        AC_MSG_RESULT([system not found])
+        AC_MSG_ERROR([--with-zlib=system specified, but no zlib found!])  
+    fi
+else
+    AC_MSG_ERROR([Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'])  
+fi
+
+AC_SUBST(USE_EXTERNAL_LIBZ)
+
+###############################################################################
+LIBZIP_CAN_USE_MMAP=true
+if test "x$JDK_VARIANT" = "xembedded"; then
+   LIBZIP_CAN_USE_MMAP=false
+fi
+AC_SUBST(LIBZIP_CAN_USE_MMAP)
+
+###############################################################################
+#
+# Check if altzone exists in time.h
+#
+
+AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <time.h>], [return (int)altzone;])],
+            [has_altzone=yes],
+            [has_altzone=no])
+if test "x$has_altzone" = xyes; then
+    AC_DEFINE([HAVE_ALTZONE], 1, [Define if you have the external 'altzone' variable in time.h])
+fi
+
+###############################################################################
+#
+# Check the maths library
+#
+
+AC_CHECK_LIB(m, cos, [],
+             [ 
+                  AC_MSG_NOTICE([Maths library was not found])
+             ])
+AC_SUBST(LIBM)
+
+###############################################################################
+#
+# Check for libdl.so
+
+save_LIBS="$LIBS"
+LIBS=""
+AC_CHECK_LIB(dl,dlopen)
+LIBDL="$LIBS"
+AC_SUBST(LIBDL)
+LIBS="$save_LIBS"
+
+])
+
+AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP],
+[
+###############################################################################
+#
+# statically link libstdc++ before C++ ABI is stablized on Linux unless 
+# dynamic build is configured on command line.
+#
+AC_ARG_ENABLE([static-link-stdc++], [AS_HELP_STRING([--disable-static-link-stdc++],
+	[disable static linking of the C++ runtime on Linux @<:@enabled@:>@])],,
+	[
+		enable_static_link_stdc__=yes
+    ])
+
+if test "x$OPENJDK_TARGET_OS" = xlinux; then
+    # Test if -lstdc++ works.
+    AC_MSG_CHECKING([if dynamic link of stdc++ is possible])
+    AC_LANG_PUSH(C++)
+    OLD_CXXFLAGS="$CXXFLAGS"
+    CXXFLAGS="$CXXFLAGS -lstdc++"
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
+            [has_dynamic_libstdcxx=yes],
+            [has_dynamic_libstdcxx=no])
+    CXXFLAGS="$OLD_CXXFLAGS"
+    AC_LANG_POP(C++)
+    AC_MSG_RESULT([$has_dynamic_libstdcxx])
+
+    # Test if stdc++ can be linked statically.
+    AC_MSG_CHECKING([if static link of stdc++ is possible])
+    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
+    AC_LANG_PUSH(C++)
+    OLD_LIBS="$LIBS"
+    OLD_CXX="$CXX"
+    LIBS="$STATIC_STDCXX_FLAGS"
+    CXX="$CC"                       
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
+            [has_static_libstdcxx=yes],
+            [has_static_libstdcxx=no])
+    LIBS="$OLD_LIBS"
+    CXX="$OLD_CXX"
+    AC_LANG_POP(C++)
+    AC_MSG_RESULT([$has_static_libstdcxx])
+
+    if test "x$has_static_libcxx" = xno && test "x$has_dynamic_libcxx" = xno; then
+        AC_MSG_ERROR([I cannot link to stdc++! Neither dynamically nor statically.])
+    fi
+
+    if test "x$enable_static_link_stdc__" = xyes && test "x$has_static_libstdcxx" = xno; then
+        AC_MSG_NOTICE([Static linking of libstdc++ was not possible reverting to dynamic linking.])
+        enable_static_link_stdc__=no
+    fi
+
+    if test "x$enable_static_link_stdc__" = xno && test "x$has_dynamic_libstdcxx" = xno; then
+        AC_MSG_NOTICE([Dynamic linking of libstdc++ was not possible reverting to static linking.])
+        enable_static_link_stdc__=yes
+    fi
+
+    AC_MSG_CHECKING([how to link with libstdc++])
+    if test "x$enable_static_link_stdc__" = xyes; then
+        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
+        LDCXX="$CC"
+        AC_MSG_RESULT([static])
+    else
+        LIBCXX="$LIBCXX -lstdc++"
+        LDCXX="$CXX"
+        AC_MSG_RESULT([dynamic])
+    fi
+fi
+
+# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
+if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
+    LIBCXX="/usr/lib${LEGACY_OPENJDK_TARGET_CPU3}/libCrun.so.1"
+fi
+
+# TODO better (platform agnostic) test
+if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
+    LIBCXX="-lstdc++"
+fi
+
+AC_SUBST(LIBCXX)
+
+])
--- a/common/autoconf/platform.m4	Wed Jul 05 18:15:28 2017 +0200
+++ b/common/autoconf/platform.m4	Wed Jul 05 18:16:12 2017 +0200
@@ -23,272 +23,59 @@
 # questions.
 #
 
-AC_DEFUN([CHECK_FIND_DELETE],
-[
-    # Test if find supports -delete
-    AC_MSG_CHECKING([if find supports -delete])
-    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 \{\} \+"
-        AC_MSG_RESULT([no])    
-    else
-        AC_MSG_RESULT([yes])    
-    fi
-    rmdir $DELETEDIR
-])
-
-AC_DEFUN([CHECK_NONEMPTY],
-[
-    # Test that variable $1 is not empty.
-    if test "" = "[$]$1"; then AC_MSG_ERROR(Could not find translit($1,A-Z,a-z) !); fi
-])
-
-AC_DEFUN([ADD_JVM_ARG_IF_OK],
-[
-    # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
-    # If so, then append $1 to $2
-    FOUND_WARN=`$3 $1 -version 2>&1 | grep -i warn`
-    FOUND_VERSION=`$3 $1 -version 2>&1 | grep " version \""`
-    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-        $2="[$]$2 $1"
-    fi
-])
-
-AC_DEFUN([WHICHCMD],
-[
-    # 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$BUILD_OS" = "xwindows"; then
-        WHICHCMD_SPACESAFE(car)
-    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
-        $1="$car ${cdr% *}"
-    else
-        $1="$car"
-    fi
-])
-
-AC_DEFUN([SPACESAFE],
-[
-    # 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$BUILD_OS" = "xwindows"; then
-            $1=`$CYGPATH -s -m -a "[$]$1"`
-            $1=`$CYGPATH -u "[$]$1"`            
-        else
-            AC_MSG_ERROR([You cannot have spaces in $2! "[$]$1"])
-        fi
-    fi
-])
-
-AC_DEFUN([WHICHCMD_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$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],
-[
-    if test "x$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`
-            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
-            $1=`$READLINK -f [$]$1`
-        else
-            STARTDIR=$PWD
-            COUNTER=0
-            DIR=`dirname [$]$1`
-            FIL=`basename [$]$1`
-            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
-            $1=$DIR/$FIL
-        fi
-    fi
-])
-
-AC_DEFUN([TESTFOR_PROG_CCACHE],
-[
-    AC_ARG_ENABLE([ccache],
-	      [AS_HELP_STRING([--disable-ccache],
-	      		      [use 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)
-    else
-        AC_MSG_CHECKING([for ccache])
-        AC_MSG_RESULT([explicitly disabled])    
-        CCACHE=
-    fi    
-    AC_SUBST(CCACHE)
-
-    AC_ARG_WITH([ccache-dir],
-	      [AS_HELP_STRING([--with-ccache-dir],
-	      		      [where to store ccache files @<:@~/.ccache@:>@])])
-
-    if test "x$with_ccache_dir" != x; then
-        # When using a non home ccache directory, assume the use is to share ccache files
-        # with other users. Thus change the umask.
-        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
-    fi
-    CCACHE_FOUND=""
-    if test "x$CCACHE" != x; then
-        SETUP_CCACHE_USAGE
-    fi    
-])
-
-AC_DEFUN([SETUP_CCACHE_USAGE],
-[
-    if test "x$CCACHE" != x; then
-        CCACHE_FOUND="true"
-        # Only use ccache if it is 3.1.4 or later, which supports
-        # precompiled headers.
-        AC_MSG_CHECKING([if ccache supports precompiled headers])
-        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.@<:@456789@:>@) 2> /dev/null`
-        if test "x$HAS_GOOD_CCACHE" = x; then
-            AC_MSG_RESULT([no, disabling ccache])
-            CCACHE=
-        else
-            AC_MSG_RESULT([yes])
-            AC_MSG_CHECKING([if C-compiler supports ccache precompiled headers])
-            PUSHED_FLAGS="$CXXFLAGS"
-            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
-            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [CC_KNOWS_CCACHE_TRICK=yes], [CC_KNOWS_CCACHE_TRICK=no])
-            CXXFLAGS="$PUSHED_FLAGS"
-            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
-                AC_MSG_RESULT([yes])
-            else
-                AC_MSG_RESULT([no, disabling ccaching of precompiled headers])
-                CCACHE=
-            fi
-        fi
-    fi
-
-    if test "x$CCACHE" != x; then
-        CCACHE_SLOPPINESS=time_macros
-        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
-        CCACHE_FLAGS=-fpch-preprocess
-
-        if test "x$SET_CCACHE_DIR" != x; then
-            mkdir -p $CCACHE_DIR > /dev/null 2>&1
-	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
-        fi
-    fi
-])
-
-AC_DEFUN([EXTRACT_HOST_AND_BUILD_AND_LEGACY_VARS],
+AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD_AND_LEGACY_VARS],
 [
     # Expects $host_os $host_cpu $build_os and $build_cpu
-    # and $with_data_model to have been setup!
+    # and $with_target_bits to have been setup!
     #
     # Translate the standard triplet(quadruplet) definition
-    # of the host/build system into
-    # HOST_OS=aix,bsd,hpux,linux,macosx,solaris,windows
-    # HOST_OS_FAMILY=bsd,gnu,sysv,win32,wince
-    # HOST_OS_API=posix,winapi
+    # of the target/build system into
+    # OPENJDK_TARGET_OS=aix,bsd,hpux,linux,macosx,solaris,windows
+    # OPENJDK_TARGET_OS_FAMILY=bsd,gnu,sysv,win32,wince
+    # OPENJDK_TARGET_OS_API=posix,winapi
     # 
-    # HOST_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64
-    # HOST_CPU_ARCH=x86,sparc,pcc,arm
-    # HOST_CPU_BITS=32,64
-    # HOST_CPU_ENDIAN=big,little
+    # OPENJDK_TARGET_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64
+    # OPENJDK_TARGET_CPU_ARCH=x86,sparc,pcc,arm
+    # OPENJDK_TARGET_CPU_BITS=32,64
+    # OPENJDK_TARGET_CPU_ENDIAN=big,little
     #
     # The same values are setup for BUILD_...
     # 
     # And the legacy variables, for controlling the old makefiles.
-    # LEGACY_HOST_CPU1=i586,amd64/x86_64,sparc,sparcv9,arm,arm64...
-    # LEGACY_HOST_CPU2=i386,amd64,sparc,sparcv9,arm,arm64...
-    # LEGACY_HOST_CPU3=sparcv9,amd64 (but only on solaris)
-    # LEGACY_HOST_OS_API=solaris,windows
+    # LEGACY_OPENJDK_TARGET_CPU1=i586,amd64/x86_64,sparc,sparcv9,arm,arm64...
+    # LEGACY_OPENJDK_TARGET_CPU2=i386,amd64,sparc,sparcv9,arm,arm64...
+    # LEGACY_OPENJDK_TARGET_CPU3=sparcv9,amd64 (but only on solaris)
+    # LEGACY_OPENJDK_TARGET_OS_API=solaris,windows
     #
     # We also copy the autoconf trip/quadruplet
-    # verbatim to HOST and BUILD
-    AC_SUBST(HOST, ${host})
-    AC_SUBST(BUILD, ${build})
+    # verbatim to OPENJDK_TARGET_SYSTEM (from the autoconf "host") and OPENJDK_BUILD_SYSTEM
+    OPENJDK_TARGET_SYSTEM="$host"
+    OPENJDK_BUILD_SYSTEM="$build"
+    AC_SUBST(OPENJDK_TARGET_SYSTEM)
+    AC_SUBST(OPENJDK_BUILD_SYSTEM)
     
-    EXTRACT_VARS_FROM_OS_TO(HOST,$host_os)
-    EXTRACT_VARS_FROM_CPU_TO(HOST,$host_cpu)
+    PLATFORM_EXTRACT_VARS_FROM_OS_TO(OPENJDK_TARGET,$host_os)
+    PLATFORM_EXTRACT_VARS_FROM_CPU_TO(OPENJDK_TARGET,$host_cpu)
 
-    EXTRACT_VARS_FROM_OS_TO(BUILD,$build_os)
-    EXTRACT_VARS_FROM_CPU_TO(BUILD,$build_cpu)
+    PLATFORM_EXTRACT_VARS_FROM_OS_TO(OPENJDK_BUILD,$build_os)
+    PLATFORM_EXTRACT_VARS_FROM_CPU_TO(OPENJDK_BUILD,$build_cpu)
 
-    if test "x$HOST_OS" != xsolaris; then
-        LEGACY_HOST_CPU3=""
-        LEGACY_BUILD_CPU3=""
+    if test "x$OPENJDK_TARGET_OS" != xsolaris; then
+        LEGACY_OPENJDK_TARGET_CPU3=""
+        LEGACY_OPENJDK_BUILD_CPU3=""
     fi
 
-    # On MacOSX and MacOSX only, we have a different name for the x64 CPU in ARCH (LEGACY_HOST_CPU1) ...
-    if test "x$HOST_OS" = xmacosx && test "x$HOST_CPU" = xx64; then
-        LEGACY_HOST_CPU1="x86_64"
+    # On MacOSX and MacOSX only, we have a different name for the x64 CPU in ARCH (LEGACY_OPENJDK_TARGET_CPU1) ...
+    if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$OPENJDK_TARGET_CPU" = xx64; then
+        LEGACY_OPENJDK_TARGET_CPU1="x86_64"
     fi
 
-    SET_RELEASE_FILE_OS_VALUES()
+    PLATFORM_SET_RELEASE_FILE_OS_VALUES
 ])
 
-AC_DEFUN([EXTRACT_VARS_FROM_OS_TO],
+AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS_TO],
 [
-    EXTRACT_VARS_FROM_OS($2)
+    PLATFORM_EXTRACT_VARS_FROM_OS($2)
     $1_OS="$VAR_OS"
     $1_OS_FAMILY="$VAR_OS_FAMILY"
     $1_OS_API="$VAR_OS_API"
@@ -306,9 +93,9 @@
     AC_SUBST(LEGACY_$1_OS_API)    
 ])
 
-AC_DEFUN([EXTRACT_VARS_FROM_CPU_TO],
+AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU_TO],
 [
-    EXTRACT_VARS_FROM_CPU($2)
+    PLATFORM_EXTRACT_VARS_FROM_CPU($2)
     $1_CPU="$VAR_CPU"
     $1_CPU_ARCH="$VAR_CPU_ARCH"
     $1_CPU_BITS="$VAR_CPU_BITS"
@@ -339,12 +126,12 @@
         LEGACY_$1_CPU3=amd64
     fi
     if test "x$$1_CPU" = xsparcv9; then 
-        LEGACY_$1_CPU3=sparvc9
+        LEGACY_$1_CPU3=sparcv9
     fi
     AC_SUBST(LEGACY_$1_CPU3)
 ])
 
-AC_DEFUN([EXTRACT_VARS_FROM_CPU],
+AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU],
 [
   # First argument is the cpu name from the trip/quad
   case "$1" in
@@ -372,8 +159,8 @@
     arm*)
       VAR_CPU=arm
       VAR_CPU_ARCH=arm
-      VAR_CPU_BITS=3264
-      VAR_CPU_ENDIAN=big
+      VAR_CPU_BITS=32
+      VAR_CPU_ENDIAN=little
       VAR_LEGACY_CPU=arm
       ;;
     mips)
@@ -401,7 +188,7 @@
       VAR_CPU=ppc64
       VAR_CPU_ARCH=ppc
       VAR_CPU_BITS=64
-      VAR_CPU_ENDIAN=32
+      VAR_CPU_ENDIAN=big
       VAR_LEGACY_CPU=ppc64
        ;;
     sparc)
@@ -416,7 +203,7 @@
       VAR_CPU_ARCH=sparc
       VAR_CPU_BITS=64
       VAR_CPU_ENDIAN=big
-      VAR_LEGACY_CPU=sparc_sparcv9
+      VAR_LEGACY_CPU=sparcv9
        ;;
     s390)
       VAR_CPU=s390
@@ -452,21 +239,37 @@
       fi
   fi
 
+  # on solaris x86...default seems to be 32-bit
+  if test "x$VAR_OS" = "xsolaris" && \
+     test "x$with_target_bits" = "x" && \
+     test "x$VAR_CPU_ARCH" = "xx86"
+  then
+      with_target_bits=32
+  fi
+
   if test "x$VAR_CPU_ARCH" = "xx86"; then
-      if test "x$with_data_model" = "x64"; then
+      if test "x$with_target_bits" = "x64"; then
           VAR_CPU=x64
           VAR_CPU_BITS=64
           VAR_LEGACY_CPU=amd64
       fi
-      if test "x$with_data_model" = "x32"; then
+      if test "x$with_target_bits" = "x32"; then
           VAR_CPU=ia32
           VAR_CPU_BITS=32
           VAR_LEGACY_CPU=i586
       fi
   fi 
+
+  if test "x$VAR_CPU_ARCH" = "xsparc"; then
+      if test "x$with_target_bits" = "x64"; then
+          VAR_CPU=sparcv9
+          VAR_CPU_BITS=64
+          VAR_LEGACY_CPU=sparcv9
+      fi
+  fi 
 ])
 
-AC_DEFUN([EXTRACT_VARS_FROM_OS],
+AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS],
 [
   case "$1" in
     *linux*)
@@ -495,49 +298,26 @@
       VAR_OS_FAMILY=windows
       ;;
     *)
-      AC_MSG_ERROR([unsupported host operating system $1])
+      AC_MSG_ERROR([unsupported operating system $1])
       ;;
   esac
 ])
 
-AC_DEFUN([CHECK_COMPILER_VERSION],
+AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES],
 [
-    # Test the compilers that their versions are new enough.
-#    AC_MSG_CHECKING([version of GCC])
-    gcc_ver=`${CC} -dumpversion`
-    gcc_major_ver=`echo ${gcc_ver}|cut -d'.' -f1`
-    gcc_minor_ver=`echo ${gcc_ver}|cut -d'.' -f2`
-#    AM_CONDITIONAL(GCC_OLD, test ! ${gcc_major_ver} -ge 4 -a ${gcc_minor_ver} -ge 3)
-#    AC_MSG_RESULT([${gcc_ver} (major version ${gcc_major_ver}, minor version ${gcc_minor_ver})])
-]) 
-
-# Fixes paths on windows hosts to be mixed mode short.
-AC_DEFUN([WIN_FIX_PATH],
-[
-    if test "x$BUILD_OS" = "xwindows"; then
-        AC_PATH_PROG(CYGPATH, cygpath)
-        tmp="[$]$1"
-        # Convert to C:/ mixed style path without spaces.
-        tmp=`$CYGPATH -s -m "$tmp"`
-        $1="$tmp"
-    fi
-])
-
-AC_DEFUN([SET_RELEASE_FILE_OS_VALUES],
-[
-    if test "x$HOST_OS" = "xsolaris"; then
+    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
        REQUIRED_OS_NAME=SunOS
        REQUIRED_OS_VERSION=5.10
     fi
-    if test "x$HOST_OS" = "xlinux"; then
+    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
        REQUIRED_OS_NAME=Linux
        REQUIRED_OS_VERSION=2.6
     fi
-    if test "x$HOST_OS" = "xwindows"; then
+    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
         REQUIRED_OS_NAME=Windows
         REQUIRED_OS_VERSION=5.1
     fi
-    if test "x$HOST_OS" = "xmacosx"; then
+    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
         REQUIRED_OS_NAME=Darwin
         REQUIRED_OS_VERSION=11.2
     fi
@@ -545,3 +325,174 @@
     AC_SUBST(REQUIRED_OS_NAME)
     AC_SUBST(REQUIRED_OS_VERSION)
 ])
+
+#%%% Build and target systems %%%
+AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET],
+[
+# 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.
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
+
+AC_ARG_WITH(target-bits, [AS_HELP_STRING([--with-target-bits],
+   [build 32-bit or 64-bit binaries (for platforms that support it), e.g. --with-target-bits=32 @<:@guessed@:>@])])
+
+if test "x$with_target_bits" != x && \
+   test "x$with_target_bits" != x32 && \
+   test "x$with_target_bits" != x64 ; then
+    AC_MSG_ERROR([--with-target-bits can only be 32 or 64, you specified $with_target_bits!])
+fi
+# Translate the standard cpu-vendor-kernel-os quadruplets into
+# the new TARGET_.... and BUILD_... and the legacy names used by
+# the openjdk build.
+# It uses $host_os $host_cpu $build_os $build_cpu and $with_target_bits
+PLATFORM_EXTRACT_TARGET_AND_BUILD_AND_LEGACY_VARS
+
+# The LEGACY_OPENJDK_TARGET_CPU3 is the setting for ISA_DIR.
+if test "x$LEGACY_OPENJDK_TARGET_CPU3" != x; then
+   LEGACY_OPENJDK_TARGET_CPU3="/${LEGACY_OPENJDK_TARGET_CPU3}"
+fi
+
+# Now the following vars are defined.
+# OPENJDK_TARGET_OS=aix,bsd,hpux,linux,macosx,solaris,windows
+# OPENJDK_TARGET_OS_FAMILY=bsd,gnu,sysv,win32,wince
+# OPENJDK_TARGET_OS_API=posix,winapi
+#
+# OPENJDK_TARGET_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64
+# OPENJDK_TARGET_CPU_ARCH=x86,sparc,pcc,arm
+# OPENJDK_TARGET_CPU_BITS=32,64
+# OPENJDK_TARGET_CPU_ENDIAN=big,little
+#
+# There is also a:
+# LEGACY_OPENJDK_TARGET_CPU1=i586,amd64,....  # used to set the old var ARCH
+# LEGACY_OPENJDK_TARGET_CPU2=i386,amd64,.... # used to set the old var LIBARCH
+# LEGACY_OPENJDK_TARGET_CPU3=only sparcv9,amd64 # used to set the ISA_DIR on Solaris
+# There was also a BUILDARCH that had i486,amd64,... but we do not use that
+# in the new build.
+# LEGACY_OPENJDK_TARGET_OS_API=solaris,windows # used to select source roots
+])
+
+AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],
+[
+###############################################################################
+
+# 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 ' '`"
+AC_SUBST(OS_VERSION_MAJOR)
+AC_SUBST(OS_VERSION_MINOR)
+AC_SUBST(OS_VERSION_MICRO)
+])
+
+AC_DEFUN_ONCE([PLATFORM_TEST_OPENJDK_TARGET_BITS],
+[
+###############################################################################
+#
+# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
+# (The JVM can use 32 or 64 bit Java pointers but that decision
+# is made at runtime.)
+#
+AC_LANG_PUSH(C++)
+OLD_CXXFLAGS="$CXXFLAGS"
+if test "x$OPENJDK_TARGET_OS" != xwindows && test "x$with_target_bits" != x; then
+	CXXFLAGS="-m${with_target_bits} $CXXFLAGS"
+fi
+AC_CHECK_SIZEOF([int *], [1111])
+CXXFLAGS="$OLD_CXXFLAGS"
+AC_LANG_POP(C++)
+
+# keep track of c/cxx flags that we added outselves...
+#   to prevent emitting warning...
+ADDED_CFLAGS=
+ADDED_CXXFLAGS=
+ADDED_LDFLAGS=
+
+if test "x$ac_cv_sizeof_int_p" = x0; then 
+    # The test failed, lets pick the assumed value.
+    ARCH_DATA_MODEL=$OPENJDK_TARGET_CPU_BITS
+else
+    ARCH_DATA_MODEL=`expr 8 \* $ac_cv_sizeof_int_p`
+
+    if test "x$OPENJDK_TARGET_OS" != xwindows && test "x$with_target_bits" != x; then
+       ADDED_CFLAGS=" -m${with_target_bits}"
+       ADDED_CXXFLAGS=" -m${with_target_bits}"
+       ADDED_LDFLAGS=" -m${with_target_bits}"
+
+       CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
+       CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
+       LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
+
+       CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
+       CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
+       LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
+    fi
+fi
+
+if test "x$ARCH_DATA_MODEL" = x64; then
+    A_LP64="LP64:="
+    ADD_LP64="-D_LP64=1"
+fi
+AC_MSG_CHECKING([for target address size])
+AC_MSG_RESULT([$ARCH_DATA_MODEL bits])
+AC_SUBST(LP64,$A_LP64)
+AC_SUBST(ARCH_DATA_MODEL)
+
+if test "x$ARCH_DATA_MODEL" != "x$OPENJDK_TARGET_CPU_BITS"; then
+    AC_MSG_ERROR([The tested number of bits in the target ($ARCH_DATA_MODEL) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
+fi
+
+#
+# NOTE: check for -mstackrealign needs to be below potential addition of -m32
+#
+if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
+    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
+    # While waiting for a better solution, the current workaround is to use -mstackrealign.
+    CFLAGS="$CFLAGS -mstackrealign"
+    AC_MSG_CHECKING([if 32-bit compiler supports -mstackrealign])
+    AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],
+                   [
+		        AC_MSG_RESULT([yes])
+                   ],
+	           [
+		        AC_MSG_RESULT([no])
+	                AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.])
+	           ])
+fi
+])
+
+AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS],
+[
+###############################################################################
+#
+# Is the target little of big endian?
+#
+AC_C_BIGENDIAN([ENDIAN="big"],[ENDIAN="little"],[ENDIAN="unknown"],[ENDIAN="universal_endianness"])
+
+if test "x$ENDIAN" = xuniversal_endianness; then
+    AC_MSG_ERROR([Building with both big and little endianness is not supported])
+fi
+if test "x$ENDIAN" = xunknown; then
+    ENDIAN="$OPENJDK_TARGET_CPU_ENDIAN"
+fi
+if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
+    AC_MSG_WARN([The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)])
+    ENDIAN="$OPENJDK_TARGET_CPU_ENDIAN"
+fi
+AC_SUBST(ENDIAN)
+])
+
+AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ISADIR],
+[
+###############################################################################
+#
+# Could someone enlighten this configure script with a comment about libCrun?
+#
+#
+])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/source-dirs.m4	Wed Jul 05 18:16:12 2017 +0200
@@ -0,0 +1,280 @@
+#
+# 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_ONCE([SRCDIRS_SETUP_TOPDIRS],
+[
+
+# Where are the sources. Any of these can be overridden
+# using --with-override-corba and the likes.
+LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
+CORBA_TOPDIR="$SRC_ROOT/corba"
+JAXP_TOPDIR="$SRC_ROOT/jaxp"
+JAXWS_TOPDIR="$SRC_ROOT/jaxws"
+HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
+JDK_TOPDIR="$SRC_ROOT/jdk"
+AC_SUBST(LANGTOOLS_TOPDIR)
+AC_SUBST(CORBA_TOPDIR)
+AC_SUBST(JAXP_TOPDIR)
+AC_SUBST(JAXWS_TOPDIR)
+AC_SUBST(HOTSPOT_TOPDIR)
+AC_SUBST(JDK_TOPDIR)
+])
+
+
+AC_DEFUN_ONCE([SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS],
+[
+
+###############################################################################
+#
+# Pickup additional source for a component from outside of the source root
+# or override source for a component. 
+#
+AC_ARG_WITH(add-source-root, [AS_HELP_STRING([--with-add-source-root],
+    [for each and every source directory, look in this additional source root for
+     the same directory; if it exists and have files in it, include it in the build])])                             
+                             
+AC_ARG_WITH(override-source-root, [AS_HELP_STRING([--with-override-source-root],
+    [for each and every source directory, look in this override source root for
+     the same directory; if it exists, use that directory instead and
+     ignore the directory in the original source root])])
+
+AC_ARG_WITH(adds-and-overrides, [AS_HELP_STRING([--with-adds-and-overrides],
+    [use the subdirs 'adds' and 'overrides' in the specified directory as
+     add-source-root and override-source-root])])
+
+if test "x$with_adds_and_overrides" != x; then
+    with_add_source_root="$with_adds_and_overrides/adds"
+    with_override_source_root="$with_adds_and_overrides/overrides"
+fi
+
+if test "x$with_add_source_root" != x; then
+    if ! test -d $with_add_source_root; then
+       AC_MSG_ERROR([Trying to use a non-existant add-source-root $with_add_source_root])
+    fi
+    CURDIR="$PWD"
+    cd "$with_add_source_root"
+    ADD_SRC_ROOT="`pwd`"
+    cd "$CURDIR"
+    # Verify that the addon source root does not have any root makefiles.
+    # If it does, then it is usually an error, prevent this.
+    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
+       test -f $with_add_source_root/langtools/make/Makefile; then
+        AC_MSG_ERROR([Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources.])
+    fi
+    if test -f $with_add_source_root/corba/makefiles/Makefile || \
+       test -f $with_add_source_root/corba/make/Makefile; then
+        AC_MSG_ERROR([Your add source root seems to contain a full corba repo! An add source root should only contain additional sources.])
+    fi
+    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
+       test -f $with_add_source_root/jaxp/make/Makefile; then
+        AC_MSG_ERROR([Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources.])
+    fi
+    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
+       test -f $with_add_source_root/jaxws/make/Makefile; then
+        AC_MSG_ERROR([Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources.])
+    fi
+    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
+       test -f $with_add_source_root/hotspot/make/Makefile; then
+        AC_MSG_ERROR([Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources.])
+    fi
+    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
+       test -f $with_add_source_root/jdk/make/Makefile; then
+        AC_MSG_ERROR([Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources.])
+    fi
+fi
+AC_SUBST(ADD_SRC_ROOT)
+
+if test "x$with_override_source_root" != x; then
+    if ! test -d $with_override_source_root; then
+       AC_MSG_ERROR([Trying to use a non-existant override-source-root $with_override_source_root])
+    fi
+    CURDIR="$PWD"
+    cd "$with_override_source_root"
+    OVERRIDE_SRC_ROOT="`pwd`"
+    cd "$CURDIR"
+    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
+       test -f $with_override_source_root/langtools/make/Makefile; then
+        AC_MSG_ERROR([Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override.])
+    fi
+    if test -f $with_override_source_root/corba/makefiles/Makefile || \
+       test -f $with_override_source_root/corba/make/Makefile; then
+        AC_MSG_ERROR([Your override source root seems to contain a full corba repo! An override source root should only contain sources that override.])
+    fi
+    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
+       test -f $with_override_source_root/jaxp/make/Makefile; then
+        AC_MSG_ERROR([Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override.])
+    fi
+    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
+       test -f $with_override_source_root/jaxws/make/Makefile; then
+        AC_MSG_ERROR([Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override.])
+    fi
+    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
+       test -f $with_override_source_root/hotspot/make/Makefile; then
+        AC_MSG_ERROR([Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override.])
+    fi
+    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
+       test -f $with_override_source_root/jdk/make/Makefile; then
+        AC_MSG_ERROR([Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override.])
+    fi
+fi
+AC_SUBST(OVERRIDE_SRC_ROOT)
+
+###############################################################################
+#
+# Override a repo completely, this is used for example when you have 3 small
+# development sandboxes of the langtools sources and want to avoid having 3 full
+# OpenJDK sources checked out on disk.
+#
+# Assuming that the 3 langtools sandboxes are located here:
+# /home/fredrik/sandbox1/langtools
+# /home/fredrik/sandbox2/langtools
+# /home/fredrik/sandbox3/langtools
+#
+# From the source root you create build subdirs manually:
+#     mkdir -p build1 build2 build3 
+# in each build directory run:
+#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
+#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
+#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
+#
+
+AC_ARG_WITH(override-langtools, [AS_HELP_STRING([--with-override-langtools],
+    [use this langtools dir for the build])])
+
+AC_ARG_WITH(override-corba, [AS_HELP_STRING([--with-override-corba],
+    [use this corba dir for the build])])
+
+AC_ARG_WITH(override-jaxp, [AS_HELP_STRING([--with-override-jaxp],
+	[use this jaxp dir for the build])])
+
+AC_ARG_WITH(override-jaxws, [AS_HELP_STRING([--with-override-jaxws],
+	[use this jaxws dir for the build])])
+
+AC_ARG_WITH(override-hotspot, [AS_HELP_STRING([--with-override-hotspot],
+	[use this hotspot dir for the build])])
+
+AC_ARG_WITH(override-jdk, [AS_HELP_STRING([--with-override-jdk],
+	[use this jdk dir for the build])])
+
+if test "x$with_override_langtools" != x; then
+    CURDIR="$PWD"
+    cd "$with_override_langtools"
+    LANGTOOLS_TOPDIR="`pwd`"
+    cd "$CURDIR"
+    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
+        AC_MSG_ERROR([You have to override langtools with a full langtools repo!])
+    fi
+    AC_MSG_CHECKING([if langtools should be overridden])
+    AC_MSG_RESULT([yes with $LANGTOOLS_TOPDIR])
+fi    
+if test "x$with_override_corba" != x; then
+    CURDIR="$PWD"
+    cd "$with_override_corba"
+    CORBA_TOPDIR="`pwd`"
+    cd "$CURDIR"
+    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
+        AC_MSG_ERROR([You have to override corba with a full corba repo!])
+    fi
+    AC_MSG_CHECKING([if corba should be overridden])
+    AC_MSG_RESULT([yes with $CORBA_TOPDIR])
+fi    
+if test "x$with_override_jaxp" != x; then
+    CURDIR="$PWD"
+    cd "$with_override_jaxp"
+    JAXP_TOPDIR="`pwd`"
+    cd "$CURDIR"
+    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
+        AC_MSG_ERROR([You have to override jaxp with a full jaxp repo!])
+    fi
+    AC_MSG_CHECKING([if jaxp should be overridden])
+    AC_MSG_RESULT([yes with $JAXP_TOPDIR])
+fi    
+if test "x$with_override_jaxws" != x; then
+    CURDIR="$PWD"
+    cd "$with_override_jaxws"
+    JAXWS_TOPDIR="`pwd`"
+    cd "$CURDIR"
+    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
+        AC_MSG_ERROR([You have to override jaxws with a full jaxws repo!])
+    fi
+    AC_MSG_CHECKING([if jaxws should be overridden])
+    AC_MSG_RESULT([yes with $JAXWS_TOPDIR])
+fi    
+if test "x$with_override_hotspot" != x; then
+    CURDIR="$PWD"
+    cd "$with_override_hotspot"
+    HOTSPOT_TOPDIR="`pwd`"
+    cd "$CURDIR"
+    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
+       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
+        AC_MSG_ERROR([You have to override hotspot with a full hotspot repo!])
+    fi
+    AC_MSG_CHECKING([if hotspot should be overridden])
+    AC_MSG_RESULT([yes with $HOTSPOT_TOPDIR])
+fi    
+if test "x$with_override_jdk" != x; then
+    CURDIR="$PWD"
+    cd "$with_override_jdk"
+    JDK_TOPDIR="`pwd`"
+    cd "$CURDIR"
+    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
+        AC_MSG_ERROR([You have to override JDK with a full JDK repo!])
+    fi
+    AC_MSG_CHECKING([if JDK should be overridden])
+    AC_MSG_RESULT([yes with $JDK_TOPDIR])
+fi    
+
+])
+
+AC_DEFUN_ONCE([SRCDIRS_SETUP_OUTPUT_DIRS],
+[
+LANGTOOLS_OUTPUTDIR="$OUTPUT_ROOT/langtools"
+CORBA_OUTPUTDIR="$OUTPUT_ROOT/corba"
+JAXP_OUTPUTDIR="$OUTPUT_ROOT/jaxp"
+JAXWS_OUTPUTDIR="$OUTPUT_ROOT/jaxws"
+HOTSPOT_OUTPUTDIR="$OUTPUT_ROOT/hotspot"
+JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
+IMAGES_OUTPUTDIR="$OUTPUT_ROOT/images"
+
+AC_SUBST(LANGTOOLS_OUTPUTDIR)
+AC_SUBST(CORBA_OUTPUTDIR)
+AC_SUBST(JAXP_OUTPUTDIR)
+AC_SUBST(JAXWS_OUTPUTDIR)
+AC_SUBST(HOTSPOT_OUTPUTDIR)
+AC_SUBST(JDK_OUTPUTDIR)
+AC_SUBST(IMAGES_OUTPUTDIR)
+
+LANGTOOLS_DIST="$OUTPUT_ROOT/langtools/dist"
+CORBA_DIST="$OUTPUT_ROOT/corba/dist"
+JAXP_DIST="$OUTPUT_ROOT/jaxp/dist"
+JAXWS_DIST="$OUTPUT_ROOT/jaxws/dist"
+HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
+
+AC_SUBST(LANGTOOLS_DIST)
+AC_SUBST(CORBA_DIST)
+AC_SUBST(JAXP_DIST)
+AC_SUBST(JAXWS_DIST)
+AC_SUBST(HOTSPOT_DIST)
+])
--- a/common/autoconf/spec.gmk.in	Wed Jul 05 18:15:28 2017 +0200
+++ b/common/autoconf/spec.gmk.in	Wed Jul 05 18:16:12 2017 +0200
@@ -23,8 +23,8 @@
 # questions.
 #
 
-# Configured @DATE_WHEN_CONFIGURED@ to build for a @HOST@ system,
-# using ./configure @CONFIGURE_COMMAND_LINE@
+# Configured @DATE_WHEN_CONFIGURED@ to build for a @OPENJDK_TARGET_SYSTEM@ system,
+# using 'configure @CONFIGURE_COMMAND_LINE@'
 
 # When calling macros, the spaces between arguments are 
 # often semantically important! Sometimes we need to subst 
@@ -67,48 +67,50 @@
 # The "human readable" name of this configuration
 CONF_NAME:=@CONF_NAME@
 
-# The built jdk will run in this host system.
-HOST:=@HOST@
-HOST_OS:=@HOST_OS@
-HOST_OS_FAMILY:=@HOST_OS_FAMILY@
-HOST_OS_API:=@HOST_OS_API@
+# The built jdk will run in this target system.
+OPENJDK_TARGET_SYSTEM:=@OPENJDK_TARGET_SYSTEM@
 
-HOST_CPU:=@HOST_CPU@
-HOST_CPU_ARCH:=@HOST_CPU_ARCH@
-HOST_CPU_BITS:=@HOST_CPU_BITS@
-HOST_CPU_ENDIAN:=@HOST_CPU_ENDIAN@
+OPENJDK_TARGET_OS:=@OPENJDK_TARGET_OS@
+OPENJDK_TARGET_OS_FAMILY:=@OPENJDK_TARGET_OS_FAMILY@
+OPENJDK_TARGET_OS_API:=@OPENJDK_TARGET_OS_API@
+
+OPENJDK_TARGET_CPU:=@OPENJDK_TARGET_CPU@
+OPENJDK_TARGET_CPU_ARCH:=@OPENJDK_TARGET_CPU_ARCH@
+OPENJDK_TARGET_CPU_BITS:=@OPENJDK_TARGET_CPU_BITS@
+OPENJDK_TARGET_CPU_ENDIAN:=@OPENJDK_TARGET_CPU_ENDIAN@
 
 # We are building on this build system.
-# When not cross-compiling, it is the same as the host.
-BUILD:=@BUILD@
-BUILD_OS:=@BUILD_OS@
-BUILD_OS_FAMILY:=@BUILD_OS_FAMILY@
-BUILD_OS_API:=@BUILD_OS_API@
+# When not cross-compiling, it is the same as the target.
+OPENJDK_BUILD_SYSTEM:=@OPENJDK_BUILD_SYSTEM@
 
-BUILD_CPU:=@BUILD_CPU@
-BUILD_CPU_ARCH:=@BUILD_CPU_ARCH@
-BUILD_CPU_BITS:=@BUILD_CPU_BITS@
-BUILD_CPU_ENDIAN:=@BUILD_CPU_ENDIAN@
+OPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@
+OPENJDK_BUILD_OS_FAMILY:=@OPENJDK_BUILD_OS_FAMILY@
+OPENJDK_BUILD_OS_API:=@OPENJDK_BUILD_OS_API@
+
+OPENJDK_BUILD_CPU:=@OPENJDK_BUILD_CPU@
+OPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@
+OPENJDK_BUILD_CPU_BITS:=@OPENJDK_BUILD_CPU_BITS@
+OPENJDK_BUILD_CPU_ENDIAN:=@OPENJDK_BUILD_CPU_ENDIAN@
 
 # Legacy OS values for use in release file.
 REQUIRED_OS_NAME:=@REQUIRED_OS_NAME@
 REQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@
 
-# Old name for HOST_OS (aix,bsd,hpux,linux,macosx,solaris,windows etc)
-PLATFORM:=@HOST_OS@
-# Old name for HOST_CPU, uses i586 and amd64, instead of ia32 and x64.
-ARCH:=@LEGACY_HOST_CPU1@
+# Old name for OPENJDK_TARGET_OS (aix,bsd,hpux,linux,macosx,solaris,windows etc)
+PLATFORM:=@OPENJDK_TARGET_OS@
+# Old name for OPENJDK_TARGET_CPU, uses i586 and amd64, instead of ia32 and x64.
+ARCH:=@LEGACY_OPENJDK_TARGET_CPU1@
 # Yet another name for arch used for an extra subdir below the jvm lib.
 # Uses i386 and amd64, instead of ia32 and x64.
-LIBARCH:=@LEGACY_HOST_CPU2@
+LIBARCH:=@LEGACY_OPENJDK_TARGET_CPU2@
 # Use to switch between solaris and windows subdirs in the jdk.
-LEGACY_HOST_OS_API:=@LEGACY_HOST_OS_API@
+LEGACY_OPENJDK_TARGET_OS_API:=@LEGACY_OPENJDK_TARGET_OS_API@
 # 32 or 64 bit
-ARCH_DATA_MODEL:=@HOST_CPU_BITS@
+ARCH_DATA_MODEL:=@OPENJDK_TARGET_CPU_BITS@
 # Legacy setting for building for a 64 bit machine.
 # If yes then this expands to _LP64:=1
 @LP64@
-ENDIAN:=@HOST_CPU_ENDIAN@
+ENDIAN:=@OPENJDK_TARGET_CPU_ENDIAN@
 @SET_OPENJDK@
 JIGSAW:=@JIGSAW@
 LIBM:=-lm
@@ -185,7 +187,6 @@
 # The java launcher uses the default.
 # The other can be selected by specifying -client -server -kernel -zero or -zeroshark
 # on the java launcher command line.
-DEFAULT_JVM_VARIANT:=@DEFAULT_JVM_VARIANT@
 JVM_VARIANTS:=@JVM_VARIANTS@
 JVM_VARIANT_SERVER:=@JVM_VARIANT_SERVER@
 JVM_VARIANT_CLIENT:=@JVM_VARIANT_CLIENT@
@@ -202,53 +203,42 @@
 # Legacy setting: -debug or -fastdebug
 BUILD_VARIANT_RELEASE:=@BUILD_VARIANT_RELEASE@
 
-LANGTOOLS_OUTPUTDIR:=@OUTPUT_ROOT@/langtools
-LANGTOOLS_DIST:=@OUTPUT_ROOT@/langtools/dist
-LANGTOOLS_MAKE_ARGS:=@LANGTOOLS_MAKE_ARGS@
-
-CORBA_OUTPUTDIR:=@OUTPUT_ROOT@/corba
-CORBA_DIST:=@OUTPUT_ROOT@/corba/dist
-CORBA_MAKE_ARGS:=@CORBA_MAKE_ARGS@
-
-JAXP_OUTPUTDIR:=@OUTPUT_ROOT@/jaxp
-JAXP_DIST:=@OUTPUT_ROOT@/jaxp/dist
-JAXP_MAKE_ARGS:=@JAXP_MAKE_ARGS@
-
-JAXWS_OUTPUTDIR:=@OUTPUT_ROOT@/jaxws
-JAXWS_DIST:=@OUTPUT_ROOT@/jaxws/dist
-JAXWS_MAKE_ARGS:=@JAXWS_MAKE_ARGS@
-
-HOTSPOT_OUTPUTDIR:=@OUTPUT_ROOT@/hotspot
-HOTSPOT_DIST:=@OUTPUT_ROOT@/hotspot/dist
-HOTSPOT_MAKE_ARGS:=@HOTSPOT_MAKE_ARGS@
+LANGTOOLS_OUTPUTDIR:=@LANGTOOLS_OUTPUTDIR@
+CORBA_OUTPUTDIR:=@CORBA_OUTPUTDIR@
+JAXP_OUTPUTDIR:=@JAXP_OUTPUTDIR@
+JAXWS_OUTPUTDIR:=@JAXWS_OUTPUTDIR@
+HOTSPOT_OUTPUTDIR:=@HOTSPOT_OUTPUTDIR@
 
 # This where a working jvm is built.
 # You can run $(JDK_OUTPUTDIR)/bin/java
 # Though the layout of the contents of $(JDK_OUTPUTDIR) is not
 # yet the same as a default installation.
-HOTSPOT_IMPORT_PATH:=@OUTPUT_ROOT@/hotspot/dist
 JDK_OUTPUTDIR:=@OUTPUT_ROOT@/jdk
-JDK_MAKE_ARGS:=@JDK_MAKE_ARGS@
 
 # When you run "make install" it will create the standardized
 # layout for the jdk and the jre inside the images subdir.
 # Then it will copy the contents of the jdk into the installation
 # directory.
 IMAGES_OUTPUTDIR:=@OUTPUT_ROOT@/images
-IMAGES_MAKE_ARGS:=@IMAGES_MAKE_ARGS@
+
+LANGTOOLS_DIST:=@LANGTOOLS_DIST@
+CORBA_DIST:=@CORBA_DIST@
+JAXP_DIST:=@JAXP_DIST@
+JAXWS_DIST:=@JAXWS_DIST@
+HOTSPOT_DIST:=@HOTSPOT_DIST@
+
 # Legacy variables used by Release.gmk
 JDK_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/j2sdk-image
 JRE_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/j2re-image
 
 # Can be /sparcv9 or /amd64 on Solaris
-ISA_DIR:=@LEGACY_HOST_CPU3@
+ISA_DIR:=@LEGACY_OPENJDK_TARGET_CPU3@
 BINDIR:=$(JDK_OUTPUTDIR)/bin$(ISA_DIR)
 
 # The boot jdk to use
 ALT_BOOTDIR:=@BOOT_JDK@
 BOOT_JDK:=@BOOT_JDK@
 BOOT_JDK_JVMARGS:=@BOOT_JDK_JVMARGS@
-BOOT_JAVAC_ARGS:=@BOOT_JAVAC_ARGS@
 BOOT_RTJAR:=@BOOT_RTJAR@
 BOOT_TOOLSJAR:=@BOOT_TOOLSJAR@
 
@@ -258,8 +248,6 @@
 
 # Information about the build system
 NUM_CORES:=@NUM_CORES@
-# This is used from the libjvm build for C/C++ code.
-HOTSPOT_BUILD_JOBS:=@CONCURRENT_BUILD_JOBS@
 # This is used from the jdk build for C/C++ code.
 PARALLEL_COMPILE_JOBS:=@CONCURRENT_BUILD_JOBS@
 # Store javac server synchronization files here, and
@@ -282,6 +270,8 @@
 JAVAC_USE_DEPS:=@JAVAC_USE_DEPS@
 # We can invoke javac: SINGLE_THREADED_BATCH or MULTI_CORE_CONCURRENT
 JAVAC_USE_MODE:=@JAVAC_USE_MODE@
+# Enable not yet complete sjavac support.
+ENABLE_SJAVAC:=@ENABLE_SJAVAC@
 
 # The OpenJDK makefiles should be changed to using the standard
 # configure output ..._CFLAGS and ..._LIBS. In the meantime we
@@ -375,22 +365,24 @@
 @DEFINE_CROSS_COMPILE_ARCH@
 # The HOSTCC should really be named BUILDCC, ie build executable for
 # the build platform. Same as CC when not cross compiling.
-HOSTCC:=@HOSTCC@
-HOSTCXX:=@HOSTCXX@
+HOSTCC:=@UNCYGDRIVE@ @HOSTCC@
+HOSTCXX:=@UNCYGDRIVE@ @HOSTCXX@
 # And of course, the jdk spells HOSTCC as NIO_CC/HOST_CC 
-HOST_CC:=@HOSTCC@
-NIO_CC:=@HOSTCC@
+HOST_CC:=@UNCYGDRIVE@ @HOSTCC@
+NIO_CC:=@UNCYGDRIVE@ @HOSTCC@
 
-AS:=@AS@
+HOST_LD:=@UNCYGDRIVE@ @HOSTLD@
+
+AS:=@UNCYGDRIVE@ @AS@
 ASFLAGS:=@ASFLAGS@
 
 # AR is used to create a static library (is ar in posix, lib.exe in winapi)
 AR:=@UNCYGDRIVE@ @AR@
 ARFLAGS:=@ARFLAGS@
 
-NM:=@NM@
-STRIP:=@STRIP@
-MCS:=@MCS@
+NM:=@UNCYGDRIVE@ @NM@
+STRIP:=@UNCYGDRIVE@ @STRIP@
+MCS:=@UNCYGDRIVE@ @MCS@
 
 # Command to create a shared library
 SHARED_LIBRARY_FLAGS:=@SHARED_LIBRARY_FLAGS@
@@ -404,6 +396,17 @@
 C_FLAG_REORDER:=@C_FLAG_REORDER@
 CXX_FLAG_REORDER:=@CXX_FLAG_REORDER@
 
+#
+# Options for generating debug symbols
+ENABLE_DEBUG_SYMBOLS:=@ENABLE_DEBUG_SYMBOLS@
+CFLAGS_DEBUG_SYMBOLS:=@CFLAGS_DEBUG_SYMBOLS@
+CXXFLAGS_DEBUG_SYMBOLS:=@CXXFLAGS_DEBUG_SYMBOLS@
+ZIP_DEBUGINFO_FILES:=@ZIP_DEBUGINFO_FILES@
+
+#
+# Compress (or not) jars
+COMPRESS_JARS=@COMPRESS_JARS@
+
 # Options to linker to specify the library name.
 # (Note absence of := assignment, because we do not want to evaluate the macro body here)
 SET_SHARED_LIBRARY_NAME=@SET_SHARED_LIBRARY_NAME@
@@ -507,23 +510,28 @@
 EXPR:=@EXPR@
 FILE:=@FILE@
 HG:=@HG@
+OBJCOPY:=@OBJCOPY@
 
 UNCYGDRIVE:=@UNCYGDRIVE@
 
 # Where the build output is stored for your convenience.
 BUILD_LOG:=@BUILD_LOG@
+BUILD_LOG_PREVIOUS:=@BUILD_LOG_PREVIOUS@
 BUILD_LOG_WRAPPER:=@BUILD_LOG_WRAPPER@
 
 # Build setup
 ENABLE_DOCS:=@ENABLE_DOCS@
 GENERATE_DOCS:=@ENABLE_DOCS@
 DISABLE_NIMBUS:=@DISABLE_NIMBUS@
+ENABLE_JFR=@ENABLE_JFR@
 USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
 USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
 USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
+LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
 CHECK_FOR_VCINSTALLDIR=@CHECK_FOR_VCINSTALLDIR@
 MSVCRNN_DLL:=@MSVCR100DLL@
 
+
 # ADD_SRCS takes a single argument with source roots
 # and appends any corresponding source roots found
 # below --with-add-source-root and below
@@ -553,6 +561,17 @@
 
 ####################################################
 #
+# Legacy Hotspot support
+
+HOTSPOT_DIST:=@HOTSPOT_DIST@
+HOTSPOT_MAKE_ARGS:=@HOTSPOT_MAKE_ARGS@
+# This is used from the libjvm build for C/C++ code.
+HOTSPOT_BUILD_JOBS:=@CONCURRENT_BUILD_JOBS@
+# Control wether Hotspot runs Queens test after building
+TEST_IN_BUILD=@TEST_IN_BUILD@
+
+####################################################
+#
 # INSTALLATION
 #
 
@@ -611,10 +630,9 @@
 # Name of Service Agent library
 SALIB_NAME=@SALIB_NAME@
 
-# Control wether Hotspot runs Queens test after building
-TEST_IN_BUILD=@TEST_IN_BUILD@
-
 OS_VERSION_MAJOR:=@OS_VERSION_MAJOR@
 OS_VERSION_MINOR:=@OS_VERSION_MINOR@
 OS_VERSION_MICRO:=@OS_VERSION_MICRO@
 
+# Include the closed-spec.gmk file if it exists
+-include $(dir @SPEC@)/closed-spec.gmk
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/spec.sh.in	Wed Jul 05 18:16:12 2017 +0200
@@ -0,0 +1,527 @@
+#
+# 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.
+#
+
+# Configured"@DATE_WHEN_CONFIGURED@ to build for a @OPENJDK_TARGET_SYSTEM@ system,
+# using 'configure @CONFIGURE_COMMAND_LINE@'
+
+# The "human readable" name of this configuration
+CONF_NAME="@CONF_NAME@"
+
+# The built jdk will run in this target system.
+OPENJDK_TARGET_SYSTEM="@OPENJDK_TARGET_SYSTEM@"
+
+OPENJDK_TARGET_OS="@OPENJDK_TARGET_OS@"
+OPENJDK_TARGET_OS_FAMILY="@OPENJDK_TARGET_OS_FAMILY@"
+OPENJDK_TARGET_OS_API="@OPENJDK_TARGET_OS_API@"
+
+OPENJDK_TARGET_CPU="@OPENJDK_TARGET_CPU@"
+OPENJDK_TARGET_CPU_ARCH="@OPENJDK_TARGET_CPU_ARCH@"
+OPENJDK_TARGET_CPU_BITS="@OPENJDK_TARGET_CPU_BITS@"
+OPENJDK_TARGET_CPU_ENDIAN="@OPENJDK_TARGET_CPU_ENDIAN@"
+
+# We are building on this build system.
+# When not cross-compiling, it is the same as the target.
+OPENJDK_BUILD_SYSTEM="@OPENJDK_BUILD_SYSTEM@"
+
+OPENJDK_BUILD_OS="@OPENJDK_BUILD_OS@"
+OPENJDK_BUILD_OS_FAMILY="@OPENJDK_BUILD_OS_FAMILY@"
+OPENJDK_BUILD_OS_API="@OPENJDK_BUILD_OS_API@"
+
+OPENJDK_BUILD_CPU="@OPENJDK_BUILD_CPU@"
+OPENJDK_BUILD_CPU_ARCH="@OPENJDK_BUILD_CPU_ARCH@"
+OPENJDK_BUILD_CPU_BITS="@OPENJDK_BUILD_CPU_BITS@"
+OPENJDK_BUILD_CPU_ENDIAN="@OPENJDK_BUILD_CPU_ENDIAN@"
+
+# Legacy OS values for use in release file.
+REQUIRED_OS_NAME="@REQUIRED_OS_NAME@"
+REQUIRED_OS_VERSION="@REQUIRED_OS_VERSION@"
+
+# Old name for OPENJDK_TARGET_OS (aix,bsd,hpux,linux,macosx,solaris,windows etc)
+PLATFORM="@OPENJDK_TARGET_OS@"
+# Old name for OPENJDK_TARGET_CPU, uses i586 and amd64, instead of ia32 and x64.
+ARCH="@LEGACY_OPENJDK_TARGET_CPU1@"
+# Yet another name for arch used for an extra subdir below the jvm lib.
+# Uses i386 and amd64, instead of ia32 and x64.
+LIBARCH="@LEGACY_OPENJDK_TARGET_CPU2@"
+# Use to switch between solaris and windows subdirs in the jdk.
+LEGACY_OPENJDK_TARGET_OS_API="@LEGACY_OPENJDK_TARGET_OS_API@"
+# 32 or 64 bit
+ARCH_DATA_MODEL="@OPENJDK_TARGET_CPU_BITS@"
+# Legacy setting for building for a 64 bit machine.
+# If yes then this expands to _LP64=1
+ENDIAN="@OPENJDK_TARGET_CPU_ENDIAN@"
+JIGSAW="@JIGSAW@"
+LIBM=-lm
+LIBDL="@LIBDL@"
+
+# colon or semicolon
+PATH_SEP="@PATH_SEP@"
+
+# The sys root where standard headers and libraries are found.
+# Usually not needed since the configure script should have
+# taken it into account already when setting CFLAGS et al.
+SYS_ROOT="@SYS_ROOT@"
+
+# Paths to the source code
+SRC_ROOT="@SRC_ROOT@"
+ADD_SRC_ROOT="@ADD_SRC_ROOT@"
+OVERRIDE_SRC_ROOT="@OVERRIDE_SRC_ROOT@"
+TOPDIR="@SRC_ROOT@"
+OUTPUT_ROOT="@OUTPUT_ROOT@"
+JDK_MAKE_SHARED_DIR="@JDK_TOPDIR@"/makefiles/common/shared
+JDK_TOPDIR="@JDK_TOPDIR@"
+LANGTOOLS_TOPDIR="@LANGTOOLS_TOPDIR@"
+CORBA_TOPDIR="@CORBA_TOPDIR@"
+JAXP_TOPDIR="@JAXP_TOPDIR@"
+JAXWS_TOPDIR="@JAXWS_TOPDIR@"
+HOTSPOT_TOPDIR="@HOTSPOT_TOPDIR@"
+COPYRIGHT_YEAR="@COPYRIGHT_YEAR@"
+
+# Information gathered from the version.numbers file.
+JDK_MAJOR_VERSION="@JDK_MAJOR_VERSION@"
+JDK_MINOR_VERSION="@JDK_MINOR_VERSION@"
+JDK_MICRO_VERSION="@JDK_MICRO_VERSION@"
+JDK_UPDATE_VERSION="@JDK_UPDATE_VERSION@"
+JDK_BUILD_NUMBER="@JDK_BUILD_NUMBER@"
+MILESTONE="@MILESTONE@"
+LAUNCHER_NAME="@LAUNCHER_NAME@"
+PRODUCT_NAME="@PRODUCT_NAME@"
+PRODUCT_SUFFIX="@PRODUCT_SUFFIX@"
+JDK_RC_PLATFORM_NAME="@JDK_RC_PLATFORM_NAME@"
+COMPANY_NAME="@COMPANY_NAME@"
+
+# Different version strings generated from the above information.
+JDK_VERSION="@JDK_VERSION@"
+RUNTIME_NAME="@RUNTIME_NAME@"
+FULL_VERSION="@FULL_VERSION@"
+JRE_RELEASE_VERSION="@FULL_VERSION@"
+RELEASE="@RELEASE@"
+COOKED_BUILD_NUMBER="@COOKED_BUILD_NUMBER@"
+
+# How to compile the code: release, fastdebug or slowdebug
+DEBUG_LEVEL="@DEBUG_LEVEL@"
+
+# This is the JDK variant to build.
+# The JDK variant is a name for a specific set of modules to be compiled for the JDK.
+JDK_VARIANT="@JDK_VARIANT@"
+
+# Should we compile support for running with a graphical UI? (ie headful)
+# Should we compile support for running without? (ie headless)
+SUPPORT_HEADFUL="@SUPPORT_HEADFUL@"
+SUPPORT_HEADLESS="@SUPPORT_HEADLESS@"
+
+# These are the libjvms that we want to build.
+# The java launcher uses the default.
+# The other can be selected by specifying -client -server -kernel -zero or -zeroshark
+# on the java launcher command line.
+JVM_VARIANTS="@JVM_VARIANTS@"
+JVM_VARIANT_SERVER="@JVM_VARIANT_SERVER@"
+JVM_VARIANT_CLIENT="@JVM_VARIANT_CLIENT@"
+JVM_VARIANT_KERNEL="@JVM_VARIANT_KERNEL@"
+JVM_VARIANT_ZERO="@JVM_VARIANT_ZERO@"
+JVM_VARIANT_ZEROSHARK="@JVM_VARIANT_ZEROSHARK@"
+
+# Legacy setting: OPT or DBG
+VARIANT="@VARIANT@"
+# Legacy setting: true or false
+FASTDEBUG="@FASTDEBUG@"
+# Legacy setting: debugging the class files?
+DEBUG_CLASSFILES="@DEBUG_CLASSFILES@"
+# Legacy setting: -debug or -fastdebug
+BUILD_VARIANT_RELEASE="@BUILD_VARIANT_RELEASE@"
+
+LANGTOOLS_OUTPUTDIR="@LANGTOOLS_OUTPUTDIR@"
+CORBA_OUTPUTDIR="@CORBA_OUTPUTDIR@"
+JAXP_OUTPUTDIR="@JAXP_OUTPUTDIR@"
+JAXWS_OUTPUTDIR="@JAXWS_OUTPUTDIR@"
+HOTSPOT_OUTPUTDIR="@HOTSPOT_OUTPUTDIR@"
+
+# This where a working jvm is built.
+# You can run ${JDK_OUTPUTDIR}/bin/java
+# Though the layout of the contents of ${JDK_OUTPUTDIR} is not
+# yet the same as a default installation.
+JDK_OUTPUTDIR="@OUTPUT_ROOT@"/jdk
+
+# When you run "make install" it will create the standardized
+# layout for the jdk and the jre inside the images subdir.
+# Then it will copy the contents of the jdk into the installation
+# directory.
+IMAGES_OUTPUTDIR="@OUTPUT_ROOT@"/images
+
+LANGTOOLS_DIST="@LANGTOOLS_DIST@"
+CORBA_DIST="@CORBA_DIST@"
+JAXP_DIST="@JAXP_DIST@"
+JAXWS_DIST="@JAXWS_DIST@"
+HOTSPOT_DIST="@HOTSPOT_DIST@"
+
+# Legacy variables used by Release.gmk
+JDK_IMAGE_DIR=${IMAGES_OUTPUTDIR}/j2sdk-image
+JRE_IMAGE_DIR=${IMAGES_OUTPUTDIR}/j2re-image
+
+# Can be /sparcv9 or /amd64 on Solaris
+ISA_DIR="@LEGACY_OPENJDK_TARGET_CPU3@"
+BINDIR="${JDK_OUTPUTDIR}/bin${ISA_DIR}"
+
+# The boot jdk to use
+ALT_BOOTDIR="@BOOT_JDK@"
+BOOT_JDK="@BOOT_JDK@"
+BOOT_JDK_JVMARGS="@BOOT_JDK_JVMARGS@"
+BOOT_RTJAR="@BOOT_RTJAR@"
+BOOT_TOOLSJAR="@BOOT_TOOLSJAR@"
+
+# When compiling Java source to be run by the boot jdk
+# use these extra flags, eg -source 6 -target 6
+BOOT_JDK_SOURCETARGET="@BOOT_JDK_SOURCETARGET@"
+
+# Information about the build system
+NUM_CORES="@NUM_CORES@"
+# This is used from the jdk build for C/C++ code.
+PARALLEL_COMPILE_JOBS="@CONCURRENT_BUILD_JOBS@"
+# Store javac server synchronization files here, and
+# the javac server log files.
+JAVAC_SERVERS="@JAVAC_SERVERS@"
+# Should we use a javac server or not? The javac server gives
+# an enormous performance improvement since it reduces the
+# startup costs of javac and reuses as much as possible of intermediate
+# compilation work. But if we want to compile with a non-Java
+# javac compiler, like gcj. Then we cannot use javac server and
+# this variable is set to false.
+JAVAC_USE_REMOTE="@JAVAC_USE_REMOTE@"
+# We can block the Javac server to never use more cores than this.
+# This is not for performance reasons, but for memory usage, since each
+# core requires its own JavaCompiler. We might have 64 cores and 4GB
+# of memory, 64 JavaCompilers will currently not fit in a 3GB heap.
+# Since there is no sharing of data between the JavaCompilers.
+JAVAC_SERVER_CORES="@JAVAC_SERVER_CORES@"
+# Should we use dependency tracking between Java packages? true or false.
+JAVAC_USE_DEPS="@JAVAC_USE_DEPS@"
+# We can invoke javac: SINGLE_THREADED_BATCH or MULTI_CORE_CONCURRENT
+JAVAC_USE_MODE="@JAVAC_USE_MODE@"
+# Enable not yet complete sjavac support.
+ENABLE_SJAVAC="@ENABLE_SJAVAC@"
+
+# The OpenJDK makefiles should be changed to using the standard
+# configure output ..._CFLAGS and ..._LIBS. In the meantime we
+# extract the information here.
+FREETYPE2_LIB_PATH="@FREETYPE2_LIB_PATH@"
+FREETYPE2_LIBS="@FREETYPE2_LIBS@"
+FREETYPE2_CFLAGS="@FREETYPE2_CFLAGS@"
+USING_SYSTEM_FT_LIB="@USING_SYSTEM_FT_LIB@"
+CUPS_CFLAGS="@CUPS_CFLAGS@"
+
+PACKAGE_PATH="@PACKAGE_PATH@"
+
+# Source file for cacerts
+CACERTS_FILE="@CACERTS_FILE@"
+
+#MOZILLA_HEADERS_PATH=
+
+# Necessary additional compiler flags to compile X11 
+X_CFLAGS="@X_CFLAGS@"
+X_LIBS="@X_LIBS@"
+OPENWIN_HOME="@OPENWIN_HOME@"
+
+# There are two types: CC or CL
+# CC is gcc and others behaving reasonably similar.
+# CL is cl.exe only.
+COMPILER_TYPE="@COMPILER_TYPE@"
+
+# Flags used for overriding the default opt setting for a C/C++ source file.
+C_O_FLAG_HIGHEST="@C_O_FLAG_HIGHEST@"
+C_O_FLAG_HI="@C_O_FLAG_HI@"
+C_O_FLAG_NORM="@C_O_FLAG_NORM@"
+C_O_FLAG_NONE="@C_O_FLAG_NONE@"
+CXX_O_FLAG_HIGHEST="@CXX_O_FLAG_HIGHEST@"
+CXX_O_FLAG_HI="@CXX_O_FLAG_HI@"
+CXX_O_FLAG_NORM="@CXX_O_FLAG_NORM@"
+CXX_O_FLAG_NONE="@CXX_O_FLAG_NONE@"
+
+C_FLAG_DEPS="@C_FLAG_DEPS@"
+CXX_FLAG_DEPS="@CXX_FLAG_DEPS@"
+
+# Tools that potentially need to be cross compilation aware.
+CC="@UNCYGDRIVE@ @CCACHE@ @CC@"
+
+# CFLAGS used to compile the jdk native libraries (C-code)
+CFLAGS_JDKLIB="@CFLAGS_JDKLIB@"
+CXXFLAGS_JDKLIB="@CXXFLAGS_JDKLIB@"
+
+# CFLAGS used to compile the jdk native launchers (C-code)
+CFLAGS_JDKEXE="@CFLAGS_JDKEXE@"
+CXXFLAGS_JDKEXE="@CXXFLAGS_JDKEXE@"
+
+CXX="@UNCYGDRIVE@ @CCACHE@ @CXX@"
+#CXXFLAGS="@CXXFLAGS@"
+
+OBJC="@CCACHE@ @OBJC@"
+#OBJCFLAGS="@OBJCFLAGS@"
+
+CPP="@UNCYGDRIVE@ @CPP@"
+#CPPFLAGS="@CPPFLAGS@"
+
+# The linker can be gcc or ld on posix systems, or link.exe on winapi systems.
+LD="@UNCYGDRIVE@ @LD@"
+
+# LDFLAGS used to link the jdk native libraries (C-code)
+LDFLAGS_JDKLIB="@LDFLAGS_JDKLIB@"
+LDFLAGS_JDKLIB_SUFFIX="@LDFLAGS_JDKLIB_SUFFIX@"
+
+# On some platforms the linker cannot be used to create executables, thus
+# the need for a separate LDEXE command.
+LDEXE="@UNCYGDRIVE@ @LDEXE@"
+
+# LDFLAGS used to link the jdk native launchers (C-code)
+LDFLAGS_JDKEXE="@LDFLAGS_JDKEXE@"
+LDFLAGS_JDKEXE_SUFFIX="@LDFLAGS_JDKEXE_SUFFIX@"
+
+# Sometimes a different linker is needed for c++ libs
+LDCXX="@UNCYGDRIVE@ @LDCXX@"
+# The flags for linking libstdc++ linker.
+LIBCXX="@LIBCXX@"
+
+# Sometimes a different linker is needed for c++ executables
+LDEXECXX="@UNCYGDRIVE@ @LDEXECXX@"
+
+# If cross compiling, then define CROSS_COMPILE_ARCH=cpu_name here.
+# The HOSTCC should really be named BUILDCC, ie build executable for
+# the build platform. Same as CC when not cross compiling.
+HOSTCC="@HOSTCC@"
+HOSTCXX="@HOSTCXX@"
+# And of course, the jdk spells HOSTCC as NIO_CC/HOST_CC 
+HOST_CC="@HOSTCC@"
+NIO_CC="@HOSTCC@"
+
+AS="@AS@"
+ASFLAGS="@ASFLAGS@"
+
+# AR is used to create a static library (is ar in posix, lib.exe in winapi)
+AR="@UNCYGDRIVE@ @AR@"
+ARFLAGS="@ARFLAGS@"
+
+NM="@NM@"
+STRIP="@STRIP@"
+MCS="@MCS@"
+
+# Command to create a shared library
+SHARED_LIBRARY_FLAGS="@SHARED_LIBRARY_FLAGS@"
+
+# Options to linker to specify a mapfile. 
+# (Note absence of = assignment, because we do not want to evaluate the macro body here)
+SET_SHARED_LIBRARY_MAPFILE="@SET_SHARED_LIBRARY_MAPFILE@"
+
+# Options for C/CXX compiler to be used if linking is performed
+#   using reorder file
+C_FLAG_REORDER="@C_FLAG_REORDER@"
+CXX_FLAG_REORDER="@CXX_FLAG_REORDER@"
+
+#
+# Options for generating debug symbols
+ENABLE_DEBUG_SYMBOLS="@ENABLE_DEBUG_SYMBOLS@"
+CFLAGS_DEBUG_SYMBOLS="@CFLAGS_DEBUG_SYMBOLS@"
+CXXFLAGS_DEBUG_SYMBOLS="@CXXFLAGS_DEBUG_SYMBOLS@"
+ZIP_DEBUGINFO_FILES="@ZIP_DEBUGINFO_FILES@"
+
+# Options to linker to specify the library name.
+# (Note absence of = assignment, because we do not want to evaluate the macro body here)
+SET_SHARED_LIBRARY_NAME="@SET_SHARED_LIBRARY_NAME@"
+
+# Set origin using the linker, ie use the relative path to the dependent library to find the dependees.
+# (Note absence of = assignment, because we do not want to evaluate the macro body here)
+SET_SHARED_LIBRARY_ORIGIN="@SET_SHARED_LIBRARY_ORIGIN@"
+
+# Different OS:es have different ways of naming shared libraries.
+# The SHARED_LIBRARY macro takes "verify" as and argument and returns:
+#    "libverify.so" or "libverify.dylib" or "verify.dll" depending on platform.
+# (Note absence of = assignment, because we do not want to evaluate the macro body here)
+SHARED_LIBRARY="@SHARED_LIBRARY@"
+STATIC_LIBRARY="@STATIC_LIBRARY@"
+LIBRARY_PREFIX="@LIBRARY_PREFIX@"
+SHARED_LIBRARY_SUFFIX="@SHARED_LIBRARY_SUFFIX@"
+STATIC_LIBRARY_SUFFIX="@STATIC_LIBRARY_SUFFIX@"
+EXE_SUFFIX="@EXE_SUFFIX@"
+OBJ_SUFFIX="@OBJ_SUFFIX@"
+
+POST_STRIP_CMD="@POST_STRIP_CMD@"
+POST_MCS_CMD='@POST_MCS_CMD@'
+
+JAVA_FLAGS="@BOOT_JDK_JVMARGS@"
+
+JAVA="@UNCYGDRIVE@ @JAVA@ ${JAVA_FLAGS}"
+
+JAVAC="@UNCYGDRIVE@ @JAVAC@"
+JAVAC_FLAGS="@JAVAC_FLAGS@"
+
+JAVAH="@UNCYGDRIVE@ @JAVAH@"
+
+JAR="@UNCYGDRIVE@ @JAR@"
+
+RMIC="@UNCYGDRIVE@ @RMIC@"
+
+NATIVE2ASCII="@UNCYGDRIVE@ @NATIVE2ASCII@"
+
+BOOT_JAR_CMD="@UNCYGDRIVE@ @JAR@"
+BOOT_JAR_JFLAGS=
+
+# Tools adhering to a minimal and common standard of posix compliance.
+AWK="@AWK@"
+CAT="@CAT@"
+CCACHE="@CCACHE@"
+# CD is going away, but remains to cater for legacy makefiles.
+CD=cd
+CHMOD="@CHMOD@"
+CP="@CP@"
+CPIO="@CPIO@"
+CUT="@CUT@"
+DATE="@DATE@"
+DF="@DF@"
+DIFF="@DIFF@"
+FIND="@FIND@"
+FIND_DELETE="@FIND_DELETE@"
+ECHO="@ECHO@"
+EGREP="@EGREP@"
+FGREP="@FGREP@"
+GREP="@GREP@"
+HEAD="@HEAD@"
+LS="@LS@"
+LN="@LN@"
+MKDIR="@MKDIR@"
+MV="@MV@"
+NAWK="@NAWK@"
+PRINTF="@PRINTF@"
+PWD="@THEPWDCMD@"
+RM="@RM@"
+SED="@SED@"
+SH="@SH@"
+SORT="@SORT@"
+TAR="@TAR@"
+TAIL="@TAIL@"
+TEE="@TEE@"
+TR="@TR@"
+TOUCH="@TOUCH@"
+WC="@WC@"
+XARGS="@XARGS@"
+ZIPEXE="@ZIP@"
+ZIP="@ZIP@"
+UNZIP="@UNZIP@"
+MT="@UNCYGDRIVE@ @MT@"
+RC="@UNCYGDRIVE@ @RC@"
+DUMPBIN="@UNCYGDRIVE@ @DUMPBIN@"
+CYGPATH="@CYGPATH@"
+LDD="@LDD@"
+OTOOL="@OTOOL@"
+READELF="@READELF@"
+EXPR="@EXPR@"
+FILE="@FILE@"
+HG="@HG@"
+OBJCOPY="@OBJCOPY@"
+
+UNCYGDRIVE="@UNCYGDRIVE@"
+
+# Build setup
+ENABLE_DOCS="@ENABLE_DOCS@"
+GENERATE_DOCS="@ENABLE_DOCS@"
+DISABLE_NIMBUS="@DISABLE_NIMBUS@"
+USE_EXTERNAL_LIBJPEG="@USE_EXTERNAL_LIBJPEG@"
+USE_EXTERNAL_LIBGIF="@USE_EXTERNAL_LIBGIF@"
+USE_EXTERNAL_LIBZ="@USE_EXTERNAL_LIBZ@"
+LIBZIP_CAN_USE_MMAP="@LIBZIP_CAN_USE_MMAP@"
+CHECK_FOR_VCINSTALLDIR="@CHECK_FOR_VCINSTALLDIR@"
+MSVCRNN_DLL="@MSVCR100DLL@"
+
+
+####################################################
+#
+# Legacy Hotspot support
+
+HOTSPOT_DIST="@HOTSPOT_DIST@"
+HOTSPOT_MAKE_ARGS="@HOTSPOT_MAKE_ARGS@"
+# This is used from the libjvm build for C/C++ code.
+HOTSPOT_BUILD_JOBS="@CONCURRENT_BUILD_JOBS@"
+# Control wether Hotspot runs Queens test after building
+TEST_IN_BUILD="@TEST_IN_BUILD@"
+
+####################################################
+#
+# INSTALLATION
+#
+
+# Common prefix for all installed files. Defaults to /usr/local,
+# but /opt/myjdk is another common version. 
+INSTALL_PREFIX="@prefix@"
+
+# Directories containing architecture-dependent files should be relative to exec_prefix
+INSTALL_EXECPREFIX="@exec_prefix@"
+
+# java,javac,javah,javap etc are installed here.
+INSTALL_BINDIR="@bindir@"
+
+# Read only architecture-independent data
+INSTALL_DATADIR="@datadir@"
+
+# Root of above.
+INSTALL_DATAROOTDIR="@datarootdir@"
+
+# Doc files, other than info and man.
+INSTALL_DOCDIR="@docdir@"
+
+# Html documentation
+INSTALL_HTMLDIR="@htmldir@"
+
+# Installing C header files, JNI headers for example.
+INSTALL_INCLUDEDIR="@includedir@"
+
+# Installing library files....
+INSTALL_INCLUDEDIR="@libdir@"
+
+# Executables that other programs run.
+INSTALL_LIBEXECDIR="@libexecdir@"
+
+# Locale-dependent but architecture-independent data, such as message catalogs. 
+INSTALL_LOCALEDIR="@localedir@"
+
+# Modifiable single-machine data
+INSTALL_LOCALSTATEDIR="@localstatedir@"
+
+# Man pages
+INSTALL_MANDIR="@mandir@"
+
+# Modifiable architecture-independent data.
+INSTALL_SHAREDSTATEDIR="@sharedstatedir@"
+
+# Read-only single-machine data
+INSTALL_SYSCONFDIR="@sysconfdir@"
+
+
+####################################################
+#
+# Misc
+#
+
+# Name of Service Agent library
+SALIB_NAME="@SALIB_NAME@"
+
+OS_VERSION_MAJOR="@OS_VERSION_MAJOR@"
+OS_VERSION_MINOR="@OS_VERSION_MINOR@"
+OS_VERSION_MICRO="@OS_VERSION_MICRO@"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/toolchain.m4	Wed Jul 05 18:16:12 2017 +0200
@@ -0,0 +1,908 @@
+#
+# 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_ONCE([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
+[
+
+# 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.
+SETUPDEVENV="# No special vars"
+if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+    # If vcvarsall.bat has been run, then VCINSTALLDIR is set.
+    if test "x$VCINSTALLDIR" != x; then
+        # No further setup is needed. The build will happen from this kind
+        # of shell.
+        SETUPDEVENV="# This spec file expects that you are running bash from within a VS command prompt."
+        # Make sure to remind you, if you forget to run make from a cygwin bash shell
+        # that is spawned "bash -l" from a VS command prompt.
+        CHECK_FOR_VCINSTALLDIR=yes
+        AC_MSG_CHECKING([if you are running from within a VS command prompt])
+        AC_MSG_RESULT([yes])
+    else
+        # Ah, we have not yet run vcvarsall.bat/vsvars32.bat/vsvars64.bat. Lets do that. First find it.
+        if test "x$VS100COMNTOOLS" != x; then
+            VARSBAT=`find "$VS100COMNTOOLS/../.." -name vcvarsall.bat`
+	    SEARCH_ROOT="$VS100COMNTOOLS"
+        else
+            VARSBAT=`find "$PROGRAMFILES" -name vcvarsall.bat`
+	    SEARCH_ROOT="$PROGRAMFILES"
+        fi
+        VCPATH=`dirname "$VARSBAT"`
+        VCPATH=`cygpath -w "$VCPATH"`
+	if test "x$VARSBAT" = x || test ! -d "$VCPATH"; then
+            AC_MSG_CHECKING([if we can find the VS installation])
+            AC_MSG_RESULT([no])
+            AC_MSG_ERROR([Tried to find a VS installation using both $SEARCH_ROOT but failed. Please run "c:\\cygwin\\bin\\bash.exe -l" from a VS command prompt and then run configure/make from there.])
+        fi
+        case "$LEGACY_OPENJDK_TARGET_CPU1" in
+          i?86)
+            VARSBAT_ARCH=x86
+            ;;
+          *)
+            VARSBAT_ARCH=$LEGACY_OPENJDK_TARGET_CPU1
+            ;;
+        esac
+        # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
+        cd $OUTPUT_ROOT
+        bash $SRC_ROOT/common/bin/extractvcvars.sh "$VARSBAT" "$VARSBAT_ARCH"
+	cd $CURDIR
+	if test ! -s $OUTPUT_ROOT/localdevenv.sh || test ! -s $OUTPUT_ROOT/localdevenv.gmk; then
+            AC_MSG_CHECKING([if we can extract the needed env variables])
+            AC_MSG_RESULT([no])
+            AC_MSG_ERROR([Could not succesfully extract the env variables needed for the VS setup. Please run "c:\\cygwin\\bin\\bash.exe -l" from a VS command prompt and then run configure/make from there.])
+        fi 
+        # Now set all paths and other env variables. This will allow the rest of 
+        # the configure script to find and run the compiler in the proper way.
+        . $OUTPUT_ROOT/localdevenv.sh
+        AC_MSG_CHECKING([if we can find the VS installation])
+	if test "x$VCINSTALLDIR" != x; then 
+            AC_MSG_RESULT([$VCINSTALLDIR])
+        else 
+            AC_MSG_RESULT([no])
+            AC_MSG_ERROR([Could not find VS installation. Please install. If you are sure you have installed VS, then please run "c:\\cygwin\\bin\\bash.exe -l" from a VS command prompt and then run configure/make from there.])
+        fi
+        CHECK_FOR_VCINSTALLDIR=no
+	SETUPDEVENV="include $OUTPUT_ROOT/localdevenv.gmk"
+
+	AC_MSG_CHECKING([for msvcr100.dll])
+        AC_ARG_WITH(msvcr100dll, [AS_HELP_STRING([--with-msvcr100dll],
+            [copy this msvcr100.dll into the built JDK])])
+        if test "x$with_msvcr100dll" != x; then
+            MSVCR100DLL="$with_msvcr100dll"
+        else
+            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+                MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x64 | head --lines 1`
+            else
+                MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
+                if test "x$MSVCR100DLL" = x; then
+                    MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | head --lines 1`
+                fi
+            fi
+        fi
+	if test "x$MSVCR100DLL" = x; then
+           AC_MSG_RESULT([no])
+	   AC_MSG_ERROR([Could not find msvcr100.dll !])
+        fi
+        AC_MSG_RESULT([$MSVCR100DLL])
+	SPACESAFE(MSVCR100DLL,[the path to msvcr100.dll])
+    fi
+fi
+AC_SUBST(SETUPDEVENV)
+AC_SUBST(CHECK_FOR_VCINSTALLDIR)
+AC_SUBST(MSVCR100DLL)
+])
+
+AC_DEFUN_ONCE([TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS],
+[
+###############################################################################
+#
+# Configure the development tool paths and potential sysroot.
+#
+AC_LANG(C++)
+DEVKIT=
+SYS_ROOT=/
+AC_SUBST(SYS_ROOT)
+
+# The option used to specify the target .o,.a or .so file.
+# When compiling, how to specify the to be created object file.
+CC_OUT_OPTION='-o$(SPACE)'
+# When linking, how to specify the to be created executable.
+EXE_OUT_OPTION='-o$(SPACE)'
+# When linking, how to specify the to be created dynamically linkable library.
+LD_OUT_OPTION='-o$(SPACE)'
+# When archiving, how to specify the to be create static archive for object files.
+AR_OUT_OPTION='rcs$(SPACE)'
+AC_SUBST(CC_OUT_OPTION)
+AC_SUBST(EXE_OUT_OPTION)
+AC_SUBST(LD_OUT_OPTION)
+AC_SUBST(AR_OUT_OPTION)
+])
+
+AC_DEFUN_ONCE([TOOLCHAIN_SETUP_PATHS],
+[
+# If --build AND --host is set, then the configure script will find any
+# cross compilation tools in the PATH. Cross compilation tools
+# follows the cross compilation standard where they are prefixed with ${host}.
+# For example the binary i686-sun-solaris2.10-gcc
+# will cross compile for i686-sun-solaris2.10
+# If neither of build and host is not set, then build=host and the
+# default compiler found in the path will be used.
+# Setting only --host, does not seem to be really supported.
+# Please set both --build and --host if you want to cross compile.
+
+DEFINE_CROSS_COMPILE_ARCH=""
+HOSTCC=""
+HOSTCXX=""
+HOSTLD=""
+AC_SUBST(DEFINE_CROSS_COMPILE_ARCH)
+AC_MSG_CHECKING([if this is a cross compile])
+if test "x$OPENJDK_BUILD_SYSTEM" != "x$OPENJDK_TARGET_SYSTEM"; then
+    AC_MSG_RESULT([yes, from $OPENJDK_BUILD_SYSTEM to $OPENJDK_TARGET_SYSTEM])
+    # We have detected a cross compile!
+    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$LEGACY_OPENJDK_TARGET_CPU1"
+    # Now we to find a C/C++ compiler that can build executables for the build
+    # platform. We can't use the AC_PROG_CC macro, since it can only be used
+    # once.
+    AC_PATH_PROGS(HOSTCC, [cl cc gcc])
+    WHICHCMD(HOSTCC)
+    AC_PATH_PROGS(HOSTCXX, [cl CC g++])
+    WHICHCMD(HOSTCXX)
+    AC_PATH_PROG(HOSTLD, ld)
+    WHICHCMD(HOSTLD)
+    # Building for the build platform should be easy. Therefore
+    # we do not need any linkers or assemblers etc.    
+else
+    AC_MSG_RESULT([no])
+fi
+
+# 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)])])
+
+if test "x$with_sys_root" != x; then
+    SYS_ROOT=$with_sys_root
+fi
+                     
+# If a devkit is found on the builddeps server, then prepend its path to the
+# PATH variable. If there are cross compilers available in the devkit, these
+# will be found by AC_PROG_CC et al.
+BDEPS_CHECK_MODULE(DEVKIT, devkit, xxx,
+                    [# Found devkit
+                     PATH="$DEVKIT/bin:$PATH"
+                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
+                     if test "x$x_includes" = "xNONE"; then
+                         x_includes="$SYS_ROOT/usr/include/X11"
+                     fi
+                     if test "x$x_libraries" = "xNONE"; then
+                         x_libraries="$SYS_ROOT/usr/lib"
+                     fi
+                    ],
+                    [])
+
+if test "x$SYS_ROOT" != "x/" ; then                    
+    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
+    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
+    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS" 
+    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS" 
+    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
+    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
+fi
+
+# Store the CFLAGS etal passed to the configure script.
+ORG_CFLAGS="$CFLAGS"
+ORG_CXXFLAGS="$CXXFLAGS"
+ORG_OBJCFLAGS="$OBJCFLAGS"
+
+AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
+	[search this directory for compilers and tools])], [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])], [
+    if test "x$with_sys_root" != x; then
+      AC_MSG_ERROR([Cannot specify both --with-devkit and --with-sys-root at the same time])
+    fi
+    if test "x$with_tools_dir" != x; then
+      AC_MSG_ERROR([Cannot specify both --with-devkit and --with-tools-dir at the same time])
+    fi
+    TOOLS_DIR=$with_devkit/bin
+    SYS_ROOT=$with_devkit/$host_alias/libc
+    ])
+
+# autoconf magic only relies on PATH, so update it if tools dir is specified
+OLD_PATH="$PATH"
+if test "x$TOOLS_DIR" != x; then
+  PATH=$TOOLS_DIR:$PATH
+fi
+
+# gcc is almost always present, but on Windows we
+# prefer cl.exe and on Solaris we prefer CC.
+# Thus test for them in this order.
+AC_PROG_CC([cl cc gcc])
+if test "x$CC" = x; then
+    HELP_MSG_MISSING_DEPENDENCY([devkit])
+    AC_MSG_ERROR([Could not find a compiler. $HELP_MSG])
+fi
+if test "x$CC" = xcc && test "x$OPENJDK_BUILD_OS" = xmacosx; then
+    # Do not use cc on MacOSX use gcc instead.
+    CC="gcc"
+fi
+WHICHCMD(CC)
+
+AC_PROG_CXX([cl CC g++])
+if test "x$CXX" = xCC && test "x$OPENJDK_BUILD_OS" = xmacosx; then
+    # The found CC, even though it seems to be a g++ derivate, cannot compile
+    # c++ code. Override.
+    CXX="g++"
+fi
+WHICHCMD(CXX)
+
+if test "x$CXX" = x || test "x$CC" = x; then
+    HELP_MSG_MISSING_DEPENDENCY([devkit])
+    AC_MSG_ERROR([Could not find the needed compilers! $HELP_MSG ])
+fi
+
+if test "x$OPENJDK_BUILD_OS" != xwindows; then
+    AC_PROG_OBJC
+    WHICHCMD(OBJC)
+else
+    OBJC=
+fi
+
+# Restore the flags to the user specified values.
+# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
+CFLAGS="$ORG_CFLAGS"
+CXXFLAGS="$ORG_CXXFLAGS"
+OBJCFLAGS="$ORG_OBJCFLAGS"
+
+# If we are not cross compiling, use the same compilers for
+# building the build platform executables.
+if test "x$DEFINE_CROSS_COMPILE_ARCH" = x; then
+    HOSTCC="$CC"
+    HOSTCXX="$CXX"
+fi
+
+AC_CHECK_TOOL(LD, ld)
+WHICHCMD(LD)
+LD="$CC"
+LDEXE="$CC"
+LDCXX="$CXX"
+LDEXECXX="$CXX"
+# LDEXE is the linker to use, when creating executables.
+AC_SUBST(LDEXE)
+# Linking C++ libraries.
+AC_SUBST(LDCXX)
+# Linking C++ executables.
+AC_SUBST(LDEXECXX)
+
+AC_CHECK_TOOL(AR, ar)
+WHICHCMD(AR)
+if test "x$OPENJDK_BUILD_OS" = xmacosx; then
+    ARFLAGS="-r"
+else
+    ARFLAGS=""
+fi
+AC_SUBST(ARFLAGS)
+
+COMPILER_NAME=gcc
+COMPILER_TYPE=CC
+AS_IF([test "x$OPENJDK_BUILD_OS" = xwindows], [
+    # For now, assume that we are always compiling using cl.exe. 
+    CC_OUT_OPTION=-Fo
+    EXE_OUT_OPTION=-out:
+    LD_OUT_OPTION=-out:
+    AR_OUT_OPTION=-out:
+    # On Windows, reject /usr/bin/link, which is a cygwin
+    # program for something completely different.
+    AC_CHECK_PROG([WINLD], [link],[link],,, [/usr/bin/link])
+    # Since we must ignore the first found link, WINLD will contain
+    # the full path to the link.exe program.
+    WHICHCMD_SPACESAFE([WINLD])
+    LD="$WINLD"
+    LDEXE="$WINLD"
+    LDCXX="$WINLD"
+    LDEXECXX="$WINLD"
+    # Set HOSTLD to same as LD until we fully support cross compilation
+    # on windows.
+    HOSTLD="$WINLD"
+
+    AC_CHECK_PROG([MT], [mt], [mt],,, [/usr/bin/mt])
+    WHICHCMD_SPACESAFE([MT])
+    # The resource compiler
+    AC_CHECK_PROG([RC], [rc], [rc],,, [/usr/bin/rc])
+    WHICHCMD_SPACESAFE([RC])
+
+    RC_FLAGS="-nologo /l 0x409 /r"
+    AS_IF([test "x$VARIANT" = xOPT], [
+        RC_FLAGS="$RC_FLAGS -d NDEBUG"
+    ])
+    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
+    AS_IF([test "x$JDK_UPDATE_VERSION" = x], [
+        JDK_UPDATE_VERSION_NOTNULL=0
+    ])
+    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
+    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
+    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
+    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
+    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
+    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
+    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
+
+    # lib.exe is used to create static libraries.
+    AC_CHECK_PROG([WINAR], [lib],[lib],,,)
+    WHICHCMD_SPACESAFE([WINAR])
+    AR="$WINAR"
+    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
+
+    AC_CHECK_PROG([DUMPBIN], [dumpbin], [dumpbin],,,)
+    WHICHCMD_SPACESAFE([DUMPBIN])
+
+    COMPILER_TYPE=CL
+    CCXXFLAGS="$CCXXFLAGS -nologo"
+])
+AC_SUBST(RC_FLAGS)
+AC_SUBST(COMPILER_TYPE)
+
+AC_PROG_CPP
+WHICHCMD(CPP)
+
+AC_PROG_CXXCPP
+WHICHCMD(CXXCPP)
+
+# for solaris we really need solaris tools, and not gnu equivalent
+#   these seems to normally reside in /usr/ccs/bin so add that to path before
+#   starting to probe
+#
+#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
+#         so that it can be overriden --with-tools-dir
+if test "x$OPENJDK_BUILD_OS" = xsolaris; then
+    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
+fi
+
+# Find the right assembler.
+if test "x$OPENJDK_BUILD_OS" = xsolaris; then
+    AC_PATH_PROG(AS, as)
+    WHICHCMD(AS)
+    ASFLAGS=" "
+else
+    AS="$CC -c"
+    ASFLAGS=" "
+fi
+AC_SUBST(AS)
+AC_SUBST(ASFLAGS)
+
+if test "x$OPENJDK_BUILD_OS" = xsolaris; then
+    AC_PATH_PROG(NM, nm)
+    WHICHCMD(NM)
+    AC_PATH_PROG(STRIP, strip)
+    WHICHCMD(STRIP)
+    AC_PATH_PROG(MCS, mcs)
+    WHICHCMD(MCS)
+else
+    AC_CHECK_TOOL(NM, nm)
+    WHICHCMD(NM)
+    AC_CHECK_TOOL(STRIP, strip)
+    WHICHCMD(STRIP)
+fi
+
+###
+#
+# Check for objcopy
+#
+#   but search for gobjcopy first...
+#   since I on solaris found a broken objcopy...buhh
+#
+AC_PATH_TOOL(OBJCOPY, gobjcopy)
+if test "x$OBJCOPY" = x; then
+   AC_PATH_TOOL(OBJCOPY, objcopy)
+fi
+
+# Restore old path without tools dir
+PATH="$OLD_PATH"
+])
+
+
+AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS],
+[
+
+###############################################################################
+#
+# How to compile shared libraries. 
+#
+
+if test "x$GCC" = xyes; then
+    COMPILER_NAME=gcc
+    PICFLAG="-fPIC"
+    LIBRARY_PREFIX=lib
+    SHARED_LIBRARY='lib[$]1.so'
+    STATIC_LIBRARY='lib[$]1.a'
+    SHARED_LIBRARY_FLAGS="-shared"
+    SHARED_LIBRARY_SUFFIX='.so'
+    STATIC_LIBRARY_SUFFIX='.a'
+    OBJ_SUFFIX='.o'
+    EXE_SUFFIX=''
+    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=[$]1'
+    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=[$]1'
+    C_FLAG_REORDER=''
+    CXX_FLAG_REORDER=''
+    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN/[$]1'
+    LD="$CC"
+    LDEXE="$CC"
+    LDCXX="$CXX"
+    LDEXECXX="$CXX"
+    POST_STRIP_CMD="$STRIP -g"
+    if test "x$JDK_VARIANT" = xembedded; then
+        POST_STRIP_CMD="$STRIP --strip-unneeded"
+    fi
+
+    # Linking is different on MacOSX
+    if test "x$OPENJDK_BUILD_OS" = xmacosx; then
+        # Might change in the future to clang.
+        COMPILER_NAME=gcc
+        SHARED_LIBRARY='lib[$]1.dylib'
+        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
+        SHARED_LIBRARY_SUFFIX='.dylib'
+        EXE_SUFFIX=''
+        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/[$]1' 
+        SET_SHARED_LIBRARY_MAPFILE=''
+        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
+        POST_STRIP_CMD="$STRIP -S"
+    fi
+else
+    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
+        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
+        COMPILER_NAME=ossc
+        PICFLAG="-KPIC"
+        LIBRARY_PREFIX=lib
+        SHARED_LIBRARY='lib[$]1.so'
+        STATIC_LIBRARY='lib[$]1.a'
+        SHARED_LIBRARY_FLAGS="-z defs -xildoff -ztext -G"
+        SHARED_LIBRARY_SUFFIX='.so'
+        STATIC_LIBRARY_SUFFIX='.a'
+        OBJ_SUFFIX='.o'
+        EXE_SUFFIX=''
+        SET_SHARED_LIBRARY_NAME=''
+        SET_SHARED_LIBRARY_MAPFILE='-M[$]1'
+	C_FLAG_REORDER='-xF'
+	CXX_FLAG_REORDER='-xF'
+        SET_SHARED_LIBRARY_ORIGIN='-R \$$$$ORIGIN/[$]1'
+        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
+        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
+        CFLAGS_JDKLIB_EXTRA='-xstrconst'
+        POST_STRIP_CMD="$STRIP -x"
+        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
+    fi
+    if test "x$OPENJDK_BUILD_OS" = xwindows; then
+        # If it is not gcc, then assume it is the MS Visual Studio compiler
+        COMPILER_NAME=cl
+        PICFLAG=""
+        LIBRARY_PREFIX=
+        SHARED_LIBRARY='[$]1.dll'
+        STATIC_LIBRARY='[$]1.lib'
+        SHARED_LIBRARY_FLAGS="-LD"
+        SHARED_LIBRARY_SUFFIX='.dll'
+        STATIC_LIBRARY_SUFFIX='.lib'
+        OBJ_SUFFIX='.obj'
+        EXE_SUFFIX='.exe'
+        SET_SHARED_LIBRARY_NAME=''
+        SET_SHARED_LIBRARY_MAPFILE=''
+        SET_SHARED_LIBRARY_ORIGIN=''
+    fi
+fi
+
+AC_SUBST(OBJ_SUFFIX)
+AC_SUBST(SHARED_LIBRARY)
+AC_SUBST(STATIC_LIBRARY)
+AC_SUBST(LIBRARY_PREFIX)
+AC_SUBST(SHARED_LIBRARY_SUFFIX)
+AC_SUBST(STATIC_LIBRARY_SUFFIX)
+AC_SUBST(EXE_SUFFIX)
+AC_SUBST(SHARED_LIBRARY_FLAGS)
+AC_SUBST(SET_SHARED_LIBRARY_NAME)
+AC_SUBST(SET_SHARED_LIBRARY_MAPFILE)
+AC_SUBST(C_FLAG_REORDER)
+AC_SUBST(CXX_FLAG_REORDER)
+AC_SUBST(SET_SHARED_LIBRARY_ORIGIN)
+AC_SUBST(POST_STRIP_CMD)
+AC_SUBST(POST_MCS_CMD)
+
+# The (cross) compiler is now configured, we can now test capabilities
+# of the target platform.
+])
+
+AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION],
+[
+
+###############################################################################
+#
+# Setup the opt flags for different compilers
+# and different operating systems.
+#
+C_FLAG_DEPS="-MMD -MF"
+CXX_FLAG_DEPS="-MMD -MF"
+
+case $COMPILER_TYPE in
+  CC )
+    D_FLAG="-g"
+    case $COMPILER_NAME in
+      gcc )
+      	case $OPENJDK_TARGET_OS in
+	  macosx )
+	    # On MacOSX we optimize for size, something
+	    # we should do for all platforms?
+	    C_O_FLAG_HI="-Os"
+	    C_O_FLAG_NORM="-Os"
+	    C_O_FLAG_NONE=""
+	    ;;
+	  *)
+	    C_O_FLAG_HI="-O3"
+	    C_O_FLAG_NORM="-O2"
+	    C_O_FLAG_NONE="-O0"
+	    CFLAGS_DEBUG_SYMBOLS="-g"
+	    CXXFLAGS_DEBUG_SYMBOLS="-g"
+	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
+	       CFLAGS_DEBUG_SYMBOLS="-g1"
+	       CXXFLAGS_DEBUG_SYMBOLSG="-g1"
+	    fi
+	    ;;
+	esac
+        CXX_O_FLAG_HI="$C_O_FLAG_HI"
+        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
+        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
+        ;;
+      ossc )
+        #
+        # Forte has different names for this with their C++ compiler...
+        #
+	C_FLAG_DEPS="-xMMD -xMF"
+	CXX_FLAG_DEPS="-xMMD -xMF"
+
+# Extra options used with HIGHEST
+#
+# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
+#          done with care, there are some assumptions below that need to
+#          be understood about the use of pointers, and IEEE behavior.
+#
+# Use non-standard floating point mode (not IEEE 754)
+CC_HIGHEST="$CC_HIGHEST -fns"
+# Do some simplification of floating point arithmetic (not IEEE 754)
+CC_HIGHEST="$CC_HIGHEST -fsimple"
+# Use single precision floating point with 'float'
+CC_HIGHEST="$CC_HIGHEST -fsingle"
+# Assume memory references via basic pointer types do not alias
+#   (Source with excessing pointer casting and data access with mixed 
+#    pointer types are not recommended)
+CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
+# Use intrinsic or inline versions for math/std functions
+#   (If you expect perfect errno behavior, do not use this)
+CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
+# Loop data dependency optimizations (need -xO3 or higher)
+CC_HIGHEST="$CC_HIGHEST -xdepend"
+# Pointer parameters to functions do not overlap
+#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
+#    If you pass in multiple pointers to the same data, do not use this)
+CC_HIGHEST="$CC_HIGHEST -xrestrict"
+# Inline some library routines
+#   (If you expect perfect errno behavior, do not use this)
+CC_HIGHEST="$CC_HIGHEST -xlibmil"
+# Use optimized math routines
+#   (If you expect perfect errno behavior, do not use this)
+#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
+#CC_HIGHEST="$CC_HIGHEST -xlibmopt"
+
+        case $LEGACY_OPENJDK_TARGET_CPU1 in
+          i586)
+            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xchip=pentium"
+            C_O_FLAG_HI="-xO4 -Wu,-O4~yz"
+            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz"
+            C_O_FLAG_NONE=""
+            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xchip=pentium"
+            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz"
+            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz"
+            CXX_O_FLAG_NONE=""
+            ;;
+          sparc)
+            CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
+            CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
+            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
+            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
+            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
+            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
+            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
+            C_O_FLAG_NONE=""
+            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
+            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
+            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
+            CXX_O_FLAG_NONE=""
+            ;;
+        esac
+
+    CFLAGS_DEBUG_SYMBOLS="-g -xs"
+    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
+    esac
+    ;;
+  CL )
+    D_FLAG=
+    C_O_FLAG_HI="-O2"
+    C_O_FLAG_NORM="-O1"
+    C_O_FLAG_NONE="-Od"
+    CXX_O_FLAG_HI="$C_O_FLAG_HI"
+    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
+    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
+    ;;
+esac
+
+if test -z "$C_O_FLAG_HIGHEST"; then
+   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
+fi
+
+if test -z "$CXX_O_FLAG_HIGHEST"; then
+   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
+fi
+
+AC_SUBST(C_O_FLAG_HIGHEST)
+AC_SUBST(C_O_FLAG_HI)
+AC_SUBST(C_O_FLAG_NORM)
+AC_SUBST(C_O_FLAG_NONE)
+AC_SUBST(CXX_O_FLAG_HIGHEST)
+AC_SUBST(CXX_O_FLAG_HI)
+AC_SUBST(CXX_O_FLAG_NORM)
+AC_SUBST(CXX_O_FLAG_NONE)
+AC_SUBST(C_FLAG_DEPS)
+AC_SUBST(CXX_FLAG_DEPS)
+])
+
+AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK],
+[
+
+if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
+   AC_MSG_WARN([Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags"])
+fi
+
+if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
+   AC_MSG_WARN([Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags"])
+fi
+
+if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
+   AC_MSG_WARN([Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags"])
+fi
+
+AC_ARG_WITH(extra-cflags, [AS_HELP_STRING([--with-extra-cflags],
+    [extra flags to be used when compiling jdk c-files])])
+
+AC_ARG_WITH(extra-cxxflags, [AS_HELP_STRING([--with-extra-cxxflags],
+    [extra flags to be used when compiling jdk c++-files])])
+
+AC_ARG_WITH(extra-ldflags, [AS_HELP_STRING([--with-extra-ldflags],
+    [extra flags to be used when linking jdk])])
+
+CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
+CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
+LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
+
+###############################################################################
+#
+# Now setup the CFLAGS and LDFLAGS for the JDK build.
+# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
+#
+case $COMPILER_NAME in
+      gcc )
+      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
+                          -pipe \
+                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
+	  case $OPENJDK_TARGET_CPU_ARCH in
+	  arm )
+            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
+	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
+	  ;;
+	  ppc )
+            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
+	  ;;
+	  * )
+	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
+	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
+          ;;
+	  esac
+          ;;
+      ossc )
+      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -norunpath -xnolib"
+      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX"
+          ;;
+      cl )
+          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
+               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
+	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
+	       -DWIN32 -DIAL"
+          case $LEGACY_OPENJDK_TARGET_CPU1 in
+              i?86 )
+                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
+                  ;;
+              amd64 )
+                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
+                  ;;
+          esac
+          ;;
+esac
+
+###############################################################################
+#
+# Cross-compile arch specific flags
+
+#
+if test "x$JDK_VARIANT" = "xembedded"; then
+   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DJAVASE_EMBEDDED"
+fi
+
+case $OPENJDK_TARGET_CPU_ARCH in
+arm )
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fsigned-char"
+    ;;
+ppc )
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fsigned-char"
+    ;;
+esac
+
+###############################################################################
+
+CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
+
+# The package path is used only on macosx?
+PACKAGE_PATH=/opt/local
+AC_SUBST(PACKAGE_PATH)
+
+# Sometimes we use a cpu dir (.../lib/amd64/server) 
+# Sometimes not (.../lib/server) 
+LIBARCHDIR="$LEGACY_OPENJDK_TARGET_CPU2/"
+if test "x$ENDIAN" = xlittle; then
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
+else
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
+fi
+if test "x$OPENJDK_TARGET_OS" = xlinux; then
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
+fi
+if test "x$OPENJDK_TARGET_OS" = xwindows; then
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
+fi
+if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
+fi
+if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
+    LIBARCHDIR=""
+fi
+if test "x$OPENJDK_TARGET_OS" = xbsd; then
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
+fi
+if test "x$DEBUG_LEVEL" = xrelease; then
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
+else
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
+fi
+
+CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$LEGACY_OPENJDK_TARGET_CPU1\"' -D$LEGACY_OPENJDK_TARGET_CPU1"
+CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
+
+CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
+        -I${JDK_OUTPUTDIR}/include \
+        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
+        -I${JDK_TOPDIR}/src/share/javavm/export \
+        -I${JDK_TOPDIR}/src/$LEGACY_OPENJDK_TARGET_OS_API/javavm/export \
+        -I${JDK_TOPDIR}/src/share/native/common \
+        -I${JDK_TOPDIR}/src/$LEGACY_OPENJDK_TARGET_OS_API/native/common"
+
+# The shared libraries are compiled using the picflag.
+CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
+CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
+
+# Executable flags
+CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
+CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
+
+# Now this is odd. The JDK native libraries have to link against libjvm.so
+# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
+# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
+# is identical for client and server? Yes. Which is picked at runtime (client or server)?
+# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
+# libraries will link to whatever is in memory. Yuck. 
+#
+# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
+if test "x$COMPILER_TYPE" = xCL; then
+    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
+    if test "x$LEGACY_OPENJDK_TARGET_CPU1" = xi586; then 
+        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
+    fi
+    # TODO: make -debug optional "--disable-full-debug-symbols"
+    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
+    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
+    LDFLAGS_JDKLIB_SUFFIX=""
+    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
+        LDFLAGS_STACK_SIZE=1048576
+    else
+        LDFLAGS_STACK_SIZE=327680
+    fi
+    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
+else
+    # If this is a --hash-style=gnu system, use --hash-style=both, why?
+    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
+    if test -n "$HAS_GNU_HASH"; then
+        # And since we now know that the linker is gnu, then add -z defs, to forbid
+        # undefined symbols in object files.
+        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both -Xlinker -z -Xlinker defs"
+        if test "x$DEBUG_LEVEL" == "xrelease"; then
+            # When building release libraries, tell the linker optimize them.
+            # Should this be supplied to the OSS linker as well?
+            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
+        fi
+    fi
+
+    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
+                    -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}server \
+                    -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}client \
+  	            -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}"
+    LDFLAGS_JDKLIB_SUFFIX="-ljvm -ljava"
+    if test "x$COMPILER_NAME" = xossc; then
+        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
+    fi
+
+    # Only the jli library is explicitly linked when the launchers are built.
+    # The libjvm is then dynamically loaded/linked by the launcher.
+    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
+    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
+       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}jli"
+       LDFLAGS_JDKEXE_SUFFIX="-ljli"
+    fi
+fi
+
+# Adjust flags according to debug level.
+case $DEBUG_LEVEL in
+      fastdebug ) 
+              CFLAGS="$CFLAGS $D_FLAG"
+              JAVAC_FLAGS="$JAVAC_FLAGS -g"
+              ;;
+      slowdebug )
+              CFLAGS="$CFLAGS $D_FLAG"
+	      C_O_FLAG_HI="$C_O_FLAG_NONE"
+	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
+	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
+	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
+              JAVAC_FLAGS="$JAVAC_FLAGS -g"
+              ;;
+esac              
+
+                
+AC_SUBST(CFLAGS_JDKLIB)
+AC_SUBST(CFLAGS_JDKEXE)
+
+AC_SUBST(CXXFLAGS_JDKLIB)
+AC_SUBST(CXXFLAGS_JDKEXE)
+
+AC_SUBST(LDFLAGS_JDKLIB)
+AC_SUBST(LDFLAGS_JDKEXE)
+AC_SUBST(LDFLAGS_JDKLIB_SUFFIX)
+AC_SUBST(LDFLAGS_JDKEXE_SUFFIX)
+])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/bin/compare-objects.sh	Wed Jul 05 18:16:12 2017 +0200
@@ -0,0 +1,235 @@
+#!/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.
+#
+
+# MANUAL
+#
+# ./common/bin/compare-objects.sh old_jdk_build_dir new_jdk_build_dir
+#
+# Compares object files
+#
+
+if [ "x$1" = "x-h" ] || [ "x$1" = "x--help" ] || [ "x$1" == "x" ]; then
+    echo "bash ./common/bin/compare-build.sh old_jdk_build_dir new_jdk_build_dir"
+    echo ""
+    echo "Compare object files"
+    echo ""
+    exit 10
+fi
+
+#######
+#
+# List of files (grep patterns) that are ignored
+# 
+# 1) hotspot object files
+IGNORE="-e hotspot"
+
+# 2) various build artifacts: sizer.32.o sizer.64.o dummyodbc.o
+#    these are produced during build and then e.g run to produce other data
+#    i.e not directly put into build => safe to ignore
+IGNORE="${IGNORE} -e sizer.32.o -e sizer.64.o"
+IGNORE="${IGNORE} -e dummyodbc.o"
+IGNORE="${IGNORE} -e genSolarisConstants.o"
+IGNORE="${IGNORE} -e genUnixConstants.o"
+
+OLD="$1"
+NEW="$2"
+shift; shift
+PATTERN="$*"
+
+if [ -f $NEW/spec.sh ]; then
+    . $NEW/spec.sh
+elif [ -f $NEW/../../spec.sh ]; then
+    . $NEW/../../spec.sh
+elif [ -f $OLD/spec.sh ]; then
+    . $OLD/spec.sh
+elif [ -f $OLD/../../spec.sh ]; then
+    . $OLD/../../spec.sh
+else
+    echo "Unable to find spec.sh"
+    echo "Giving up"
+    exit 1
+fi
+
+export COMPARE_ROOT=/tmp/cimages.$USER/objects
+mkdir -p $COMPARE_ROOT
+
+(${CD} $OLD && ${FIND} . -name '*.o') > $COMPARE_ROOT/list.old
+(${CD} $NEW && ${FIND} . -name '*.o') > $COMPARE_ROOT/list.new
+
+# On macosx JobjC is build in both i386 and x86_64 variant (universial binary)
+#   but new build only builds the x86_64
+# Remove the 386 variants from comparison...to avoid "false" positives
+${GREP} -v 'JObjC.dst/Objects-normal/i386' $COMPARE_ROOT/list.old > $COMPARE_ROOT/list.old.new
+${CP} $COMPARE_ROOT/list.old $COMPARE_ROOT/list.old.full
+${CP} $COMPARE_ROOT/list.old.new $COMPARE_ROOT/list.old
+
+findnew() {
+    arg_1=$1
+    arg_2=$2
+
+    # special case 1 unpack-cmd => unpackexe
+    arg_1=`${ECHO} $arg_1 | ${SED} 's!unpack-cmd!unpackexe!g'`
+    arg_2=`${ECHO} $arg_2 | ${SED} 's!unpack-cmd!unpackexe!g'`
+
+    # special case 2 /JObjC.dst/ => /libjobjc/
+    arg_1=`${ECHO} $arg_1 | ${SED} 's!/JObjC.dst/!/libjobjc/!g'`
+    arg_2=`${ECHO} $arg_2 | ${SED} 's!/JObjC.dst/!/libjobjc/!g'`
+
+    full=`${ECHO} $arg_1 | ${SED} 's!\.!\\\.!g'`
+    medium=`${ECHO} $arg_1 | ${SED} 's!.*/\([^/]*/[^/]*\)!\1!'`
+    short=`${ECHO} $arg_2 | ${SED} 's!\.!\\\.!g'`
+    if [ "`${GREP} -c "/$full" $COMPARE_ROOT/list.new`" -eq 1 ]
+    then
+	${ECHO} $NEW/$arg_1
+	return
+    fi
+
+    if [ "`${GREP} -c "$medium" $COMPARE_ROOT/list.new`" -eq 1 ]
+    then
+	${GREP} "$medium" $COMPARE_ROOT/list.new
+	return
+    fi
+
+    if [ "`${GREP} -c "/$short" $COMPARE_ROOT/list.new`" -eq 1 ]
+    then
+	${GREP} "/$short" $COMPARE_ROOT/list.new
+	return
+    fi
+
+    # old style has "dir" before obj{64}
+    dir=`${ECHO} $arg_1 | ${SED} 's!.*/\([^/]*\)/obj[64]*.*!\1!g'`
+    if [ -n "$dir" -a "$dir" != "$arg_1" ]
+    then
+	if [ "`${GREP} $dir $COMPARE_ROOT/list.new | ${GREP} -c "/$short"`" -eq 1 ]
+	then
+	    ${GREP} $dir $COMPARE_ROOT/list.new | ${GREP} "/$short"
+	    return
+	fi
+
+	# Try with lib$dir/
+	if [ "`${GREP} "lib$dir/" $COMPARE_ROOT/list.new | ${GREP} -c "/$short"`" -eq 1 ]
+	then
+	    ${GREP} "lib$dir/" $COMPARE_ROOT/list.new | ${GREP} "/$short"
+	    return
+	fi
+
+	# Try with $dir_objs
+	if [ "`${GREP} "${dir}_objs" $COMPARE_ROOT/list.new | ${GREP} -c "/$short"`" -eq 1 ]
+	then
+	    ${GREP} "${dir}_objs" $COMPARE_ROOT/list.new | ${GREP} "/$short"
+	    return
+	fi
+    fi
+
+    # check for some specifics...
+    for i in demo hotspot jobjc
+    do
+	if [ "`${ECHO} $full | ${GREP} -c $i`" -gt 0 ]
+	then
+	    if [ "`${GREP} $i $COMPARE_ROOT/list.new | ${GREP} -c "/$short"`" -eq 1 ]
+	    then
+		${GREP} $i $COMPARE_ROOT/list.new | ${GREP} "/$short"
+		return
+	    fi
+	fi
+    done
+
+    # check for specific demo
+    demo=`${ECHO} $arg_1 | ${SED} 's!.*/demo/jvmti/\([^/]*\)/.*!\1!g'`
+    if [ -n "$demo" -a "$dir" != "$demo" ]
+    then
+	if [ "`${GREP} $demo $COMPARE_ROOT/list.new | ${GREP} -c "/$short"`" -eq 1 ]
+	then
+	    ${GREP} $demo $COMPARE_ROOT/list.new | ${GREP} "/$short"
+	    return
+	fi
+    fi
+
+    return
+}
+
+compare() {
+    old=$1
+    new=$2
+    ${DIFF} $old $new > /dev/null
+    res=$?
+    if [ $res -eq 0 ]
+    then
+	${ECHO} 0
+	return
+    fi
+
+    # check if stripped objects gives equality
+    ${CP} $old $COMPARE_ROOT/`basename $old`.old
+    ${CP} $new $COMPARE_ROOT/`basename $old`.new
+    ${POST_STRIP_CMD} $COMPARE_ROOT/`basename $old`.old $COMPARE_ROOT/`basename $old`.new > /dev/null 2>&1
+    ${DIFF} $COMPARE_ROOT/`basename $old`.old $COMPARE_ROOT/`basename $old`.new > /dev/null
+    res=$?
+    ${RM} $COMPARE_ROOT/`basename $old`.old $COMPARE_ROOT/`basename $old`.new
+    if [ $res -eq 0 ]
+    then
+	${ECHO} S
+	return
+    fi
+
+    name=`basename $1 | ${SED} 's!\.o!!'`
+    cntold=`strings $old | ${GREP} -c $name`
+    cntnew=`strings $new | ${GREP} -c $name`
+    
+    if [ $cntold -gt 0 -a $cntnew -gt 0 ]
+    then
+	${ECHO} F
+	return
+    fi
+
+    ${ECHO} 1
+}
+
+for F in `${CAT} $COMPARE_ROOT/list.old`
+do
+    if [ "${IGNORE}" ] && [ "`${ECHO} $F | ${GREP} ${IGNORE}`" ]
+    then
+	#
+	# skip ignored files
+        #
+	continue;
+    fi
+
+    if [ "$PATTERN" ] && [ `${ECHO} $F | ${GREP} -c $PATTERN` -eq 0 ]
+    then
+	continue;
+    fi
+
+    f=`basename $F`
+    o=$OLD/$F
+    n=`findnew $F $f`
+
+    if [ "$n" ]
+    then	
+	n="$NEW/$n"
+	${ECHO} `compare $o $n` : $f : $o : $n
+    else
+	${ECHO} "- : $f : $o "
+    fi
+done
--- a/common/bin/compareimage.sh	Wed Jul 05 18:15:28 2017 +0200
+++ b/common/bin/compareimage.sh	Wed Jul 05 18:16:12 2017 +0200
@@ -177,40 +177,44 @@
     fi
 fi
 
-if [ "`uname`" == "SunOS" ]; then
-    PERM="gstat -c%a"
-elif [ $OSTYPE == "cygwin" ]; then
-    PERM=
-elif [ "`uname`" == "Darwin" ]; then
-    PERM="stat -f%p"
-elif [ "`uname`" == "Linux" ]; then
-    PERM="stat -c%A"
-else
-    PERM="stat -c%a"
-fi
+echo -n Permissions...
+found=""
+for f in `cd $OLD && find . -type f`
+do
+    if [ ! -f ${OLD}/$f ]; then continue; fi
+    if [ ! -f ${NEW}/$f ]; then continue; fi
+    OP=`ls -l ${OLD}/$f | awk '{printf("%.10s\n", $1);}'`
+    NP=`ls -l ${NEW}/$f | awk '{printf("%.10s\n", $1);}'`
+    if [ "$OP" != "$NP" ]
+    then
+	if [ -z "$found" ]; then echo ; found="yes"; fi
+	printf "\told: ${OP} new: ${NP}\t$f\n"
+    fi
 
-if [ "${PERM}" ]
-then
-    echo -n Permissions...
-    found=""
-    for f in `cd $OLD && find . -type f`
-    do
-	if [ ! -f ${OLD}/$f ]; then continue; fi
-	if [ ! -f ${NEW}/$f ]; then continue; fi
-	OP=`${PERM} ${OLD}/$f`
-	NP=`${PERM} ${NEW}/$f`
-	if [ "$OP" != "$NP" ]
+    OF=`cd ${OLD} && file $f`
+    NF=`cd ${NEW} && file $f`
+    if [ "$f" = "./src.zip" ]
+    then
+	if [ "`echo $OF | grep -ic zip`" -gt 0 -a "`echo $NF | grep -ic zip`" -gt 0 ]
 	then
-	    if [ -z "$found" ]; then echo ; found="yes"; fi
-	    printf "\told: ${OP} new: ${NP}\t$f\n"
+	    # 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
-    done
-    if [ -z "$found" ]; then echo ; found="yes"; fi
-fi
+    fi
+
+    if [ "$OF" != "$NF" ]
+    then
+	if [ -z "$found" ]; then echo ; found="yes"; fi
+	printf "\tFILE: old: ${OF} new: ${NF}\t$f\n"
+    fi
+done
+if [ -z "$found" ]; then echo ; found="yes"; fi
 
 GENERAL_FILES=$(cd $OLD && find . -type f ! -name "*.so" ! -name "*.jar" ! -name "*.zip" \
                                   ! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" \
-                                  ! -name "ct.sym" \
+                                  ! -name "ct.sym" ! -name "*.diz" \
                               | grep -v "./bin/"  | sort | $FILTER)
 echo General files...
 for f in $GENERAL_FILES
--- a/common/bin/diffexec.sh	Wed Jul 05 18:15:28 2017 +0200
+++ b/common/bin/diffexec.sh	Wed Jul 05 18:16:12 2017 +0200
@@ -49,21 +49,24 @@
 fi
 
 if [ "`uname`" == "SunOS" ]; then
-    NM=gnm
-    STAT="gstat -c%s"
+    if [ -f "`which nm`" ]; then
+        NM=nm
+    elif [ -f "`which gnm`" ]; then
+        NM=gnm
+    else
+        echo "No nm command found"
+        exit 10
+    fi
     LDD=ldd
 elif [ $OSTYPE == "cygwin" ]; then
     NM="$VS100COMNTOOLS/../../VC/bin/amd64/dumpbin.exe"
     NM_ARGS=/exports
-    STAT="stat -c%s"
     LDD=
 elif [ "`uname`" == "Darwin" ]; then
     NM=nm
-    STAT="stat -f%z"
     LDD="otool -L"
 else
     NM=nm
-    STAT="stat -c%s"
     LDD=ldd
 fi
 
@@ -79,8 +82,8 @@
 OLD=$(cd $(dirname $1) && pwd)/$(basename $1)
 NEW=$(cd $(dirname $2) && pwd)/$(basename $2)
 
-OLD_SIZE=$($STAT "$OLD")
-NEW_SIZE=$($STAT "$NEW")
+OLD_SIZE=$(ls -l "$OLD" | awk '{ print $5 }')
+NEW_SIZE=$(ls -l "$NEW" | awk '{ print $5 }')
 
 if [ $# -gt 3 ]
 then
--- a/common/bin/diffjarzip.sh	Wed Jul 05 18:15:28 2017 +0200
+++ b/common/bin/diffjarzip.sh	Wed Jul 05 18:16:12 2017 +0200
@@ -72,7 +72,11 @@
 fi
 
 if [ "`uname`" == "SunOS" ]; then
-    DIFF=gdiff
+    if [ -f "`which gdiff`" ]; then
+        DIFF=gdiff
+    else
+        DIFF=diff
+    fi
 else
     DIFF=diff
 fi
--- a/common/bin/difflib.sh	Wed Jul 05 18:15:28 2017 +0200
+++ b/common/bin/difflib.sh	Wed Jul 05 18:16:12 2017 +0200
@@ -53,21 +53,27 @@
 fi
 
 if [ "`uname`" == "SunOS" ]; then
-    NM=gnm
-    STAT="gstat -c%s"
+    if [ -f "`which gnm`" ]; then
+        NM=gnm
+# Jonas 2012-05-29: solaris native nm produces radically different output than gnm
+#                   so if using that...we need different filter than "cut -f 2-"
+#
+    elif [ -f "`which nm`" ]; then
+        NM=nm
+    else
+        echo "No nm command found"
+        exit 10
+    fi
     LDD=ldd
 elif [ $OSTYPE == "cygwin" ]; then
     NM="$VS100COMNTOOLS/../../VC/bin/amd64/dumpbin.exe"
     NM_ARGS=/exports
-    STAT="stat -c%s"
     LDD=
 elif [ "`uname`" == "Darwin" ]; then
     NM=nm
-    STAT="stat -f%z"
     LDD="otool -L"
 else
     NM=nm
-    STAT="stat -c%s"
     LDD=ldd
 fi
 
@@ -83,8 +89,8 @@
 OLD=$(cd $(dirname $1) && pwd)/$(basename $1)
 NEW=$(cd $(dirname $2) && pwd)/$(basename $2)
 
-OLD_SIZE=$($STAT "$OLD")
-NEW_SIZE=$($STAT "$NEW")
+OLD_SIZE=$(ls -l "$OLD" | awk '{ print $5 }')
+NEW_SIZE=$(ls -l "$NEW" | awk '{ print $5 }')
 
 if [ $# -gt 3 ]
 then
@@ -122,8 +128,8 @@
     exit 0
 fi
 
-OLD_SYMBOLS=$COMPARE_ROOT/$OLD_NAME.old
-NEW_SYMBOLS=$COMPARE_ROOT/$NEW_NAME.new
+OLD_SYMBOLS=$COMPARE_ROOT/nm.$OLD_NAME.old
+NEW_SYMBOLS=$COMPARE_ROOT/nm.$NEW_NAME.new
 
 mkdir -p $(dirname $OLD_SYMBOLS)
 mkdir -p $(dirname $NEW_SYMBOLS)
--- a/common/makefiles/IdlCompilation.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ b/common/makefiles/IdlCompilation.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -56,10 +56,10 @@
         $4_OLDIMPLBASE_MSG:=with -oldImplBase
     endif
     $5 : $4
-	mkdir -p $3/$$($4_TMPDIR)
-	rm -rf $3/$$($4_TMPDIR)
-	mkdir -p $(dir $5)
-	echo Compiling IDL $(patsubst $2/%,%,$4) 
+	$(MKDIR) -p $3/$$($4_TMPDIR)
+	$(RM) -rf $3/$$($4_TMPDIR)
+	$(MKDIR) -p $(dir $5)
+	$(ECHO) Compiling IDL $(patsubst $2/%,%,$4) 
 	$8 -td $3/$$($4_TMPDIR) \
 		-i $2/org/omg/CORBA \
 		-i $2/org/omg/PortableInterceptor \
@@ -69,10 +69,10 @@
 		$$($4_OLDIMPLBASE) \
 		$(PREFIXES) \
 		$4
-	rm -f $$(addprefix $3/$$($4_TMPDIR)/,$6)
-	cp -rp $3/$$($4_TMPDIR)/* $3
-	(cd $3/$$($4_TMPDIR); find . -type f | sed 's!\./!$3/!g' | awk '{ print $$$$1 ": $4" }' > $5)
-	rm -rf $3/$$($4_TMPDIR)
+	$(RM) -f $$(addprefix $3/$$($4_TMPDIR)/,$6)
+	$(CP) -rp $3/$$($4_TMPDIR)/* $3
+	($(CD) $3/$$($4_TMPDIR); find . -type f | sed 's!\./!$3/!g' | awk '{ print $$$$1 ": $4" }' > $5)
+	$(RM) -rf $3/$$($4_TMPDIR)
 endef
 
 define SetupIdlCompilation
@@ -87,11 +87,13 @@
 $(if $7,$1_$(strip $7))
 $(if $8,$1_$(strip $8))
 $(if $9,$1_$(strip $9))
+$(if $(10),$(error Internal makefile error: Too many arguments to SetupIdlCompilation, please update IdlCompilation.gmk))
+
 # Remove any relative addressing in the paths.
 $1_SRC := $$(abspath $$($1_SRC))
 $1_BIN := $$(abspath $$($1_BIN))
 # Find all existing java files and existing class files.
-$$(shell mkdir -p $$($1_SRC) $$($1_BIN))
+$$(shell $(MKDIR) -p $$($1_SRC) $$($1_BIN))
 $1_SRCS     := $$(shell find $$($1_SRC) -name "*.idl")
 $1_BINS     := $$(shell find $$($1_BIN) -name "*.java")
 # Prepend the source/bin path to the filter expressions.
@@ -111,4 +113,3 @@
 endef
 
 .SUFFIXES: .java .class .package
-
--- a/common/makefiles/JavaCompilation.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ b/common/makefiles/JavaCompilation.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -94,6 +94,7 @@
     $(if $7,$1_$(strip $7))
     $(if $8,$1_$(strip $8))
     $(if $9,$1_$(strip $9))
+    $(if $(10),$(error Internal makefile error: Too many arguments to SetupJavaCompiler, please update JavaCompilation.gmk))
 
     ifeq ($$($1_MODE),MULTI_CORE_CONCURRENT)
 	ifneq (,$$($1_SERVER_DIR))
@@ -130,6 +131,7 @@
     #    SKIP_METAINF:=Set to prevent contents of an META-INF directory to be automatically 
     #                  added to the archive.
     #    EXTRA_MANIFEST_ATTR:=Extra attribute to add to manifest.
+    #    CHECK_COMPRESS_JAR Check the COMPRESS_JAR variable
     $(if $3,$1_$(strip $3))
     $(if $4,$1_$(strip $4))
     $(if $5,$1_$(strip $5))
@@ -143,6 +145,7 @@
     $(if $(13),$1_$(strip $(13)))
     $(if $(14),$1_$(strip $(14)))
     $(if $(15),$1_$(strip $(15)))
+    $(if $(16),$(error Internal makefile error: Too many arguments to SetupArchive, please update JavaCompilation.gmk))
 
     $1_JARMAIN:=$(strip $$($1_JARMAIN))
     $1_JARNAME:=$$(notdir $$($1_JAR))
@@ -243,6 +246,16 @@
                     ($(FIND) $$(src) -name _the.package -exec $(TOUCH) -r $$($1_JAR) \{\} \; ; true) &&)
     # Use a slightly shorter name for logging, but with enough path to identify this jar.
     $1_NAME:=$$(subst $$(OUTPUT_ROOT)/,,$$($1_JAR))
+
+    ifneq (,$$($1_CHECK_COMPRESS_JAR))
+        $1_JAR_CREATE_OPTIONS := c0fm
+        ifeq ($(COMPRESS_JARS), true)
+            $1_JAR_CREATE_OPTIONS := cfm
+        endif
+    else
+        $1_JAR_CREATE_OPTIONS := cfm
+    endif
+
     # Here is the rule that creates/updates the jar file.
     $$($1_JAR) : $2 $$($1_ALL_SRC)
 	$(MKDIR) -p $$($1_BIN)
@@ -283,7 +296,7 @@
 			$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name _the.package.api.notify $(FIND_DELETE); true) &&) true ; \
 		fi ; \
 	else \
-		$(ECHO) Creating $$($1_NAME) && $(JAR) cfm $$@ $$($1_MANIFEST_FILE) && \
+		$(ECHO) Creating $$($1_NAME) && $(JAR) $$($1_JAR_CREATE_OPTIONS) $$@ $$($1_MANIFEST_FILE) && \
 	        $$($1_SCAPTURE_CONTENTS) \
 		$$($1_SCAPTURE_METAINF) \
 		$$($1_SUPDATE_CONTENTS) \
@@ -311,6 +324,7 @@
     $(if $7,$1_$(strip $7))
     $(if $8,$1_$(strip $8))
     $(if $9,$1_$(strip $9))
+    $(if $(10),$(error Internal makefile error: Too many arguments to SetupZipArchive, please update JavaCompilation.gmk))
 
     # Find all files in the source tree.
     $1_SUFFIX_FILTER := $$(patsubst %,-o -name $(DQUOTE)*%$(DQUOTE),$$($1_SUFFIXES))
@@ -648,6 +662,7 @@
     $(if $(12),$1_$(strip $(12)))
     $(if $(13),$1_$(strip $(13)))
     $(if $(14),$1_$(strip $(14)))
+    $(if $(15),$(error Internal makefile error: Too many arguments to SetupJavaCompilation, please update JavaCompilation.gmk))
 
 # Extract the info from the java compiler setup.
 $1_MODE := $$($$($1_SETUP)_MODE)
@@ -688,6 +703,12 @@
 # Now we have a list of all java files to compile: $$($1_SRCS)
 # and we have a list of all existing class files: $$($1_BINS)
 
+# Create the corresponding smart javac wrapper command line.
+$1_SJAVAC_ARGS:=$$(addprefix -x ,$$(addsuffix .*,$$(subst /,.,$$($1_EXCLUDES)))) \
+$$(addprefix -i ,$$(addsuffix .*,$$(subst /,.,$$($1_INCLUDES)))) \
+$$(addprefix -xf *,$$(strip $$($1_EXCLUDE_FILES))) \
+$$(addprefix -if *,$$(strip $$($1_INCLUDE_FILES))) -src $$(subst $$(SPACE),$$(PATH_SEP),$$(strip $$($1_SRC)))
+
 # Prepend the source/bin path to the filter expressions.
 ifneq ($$($1_INCLUDES),)
   $1_SRC_INCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_INCLUDES))))
@@ -799,6 +820,12 @@
 	$(RM) $$($1_BIN)/_the.batch $$($1_BIN)/_the.batch.tmp
 	$$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.batch.tmp)
 	$(ECHO) Compiling `$(WC) $$($1_BIN)/_the.batch.tmp | $(TR) -s ' ' | $(CUT) -f 2 -d ' '` files in batch $1
+ifeq ($$($1_NOSJAVAC),)
+ifeq ($$(ENABLE_SJAVAC),yes)
+	mkdir -p $$($1_BIN)_sjavac
+	$$($1_JVM) $$(word 1,$$($1_JAVAC)) com.sun.tools.javac.smart.Main $$($1_SJAVAC_ARGS) -mfl $$($1_BIN)/_the.batch.tmp -d $$($1_BIN)_sjavac
+endif
+endif
 	($$($1_JVM) $$($1_JAVAC) $$($1_FLAGS) -implicit:none -sourcepath "$$($1_SRCROOTSC)" -d $$($1_BIN) $$($1_HEADERS_ARG) @$$($1_BIN)/_the.batch.tmp && \
          $(MV) $$($1_BIN)/_the.batch.tmp $$($1_BIN)/_the.batch)
 else
@@ -890,5 +917,3 @@
 endif
 
 endef
-
-
--- a/common/makefiles/MakeBase.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ b/common/makefiles/MakeBase.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -138,6 +138,7 @@
 
 # Hook to be called as the very first thing when running a normal build
 define AtRootMakeStart
+	$(if $(findstring -j,$(MAKEFLAGS)), $(error make -j is not supported, use make JOBS=n))
 	$(call PrintStartMessage)
 	$(call StartTimer)
 endef
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/makefiles/MakeHelpers.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -0,0 +1,185 @@
+#
+# 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.
+#
+
+################################################################
+#
+# This file contains helper functions for the top-level Makefile that does
+# not depend on the spec.gmk file having been read. (The purpose of this 
+# file is ju to avoid cluttering the top-level Makefile.)
+#
+################################################################
+
+ifndef _MAKEHELPERS_GMK
+_MAKEHELPERS_GMK := 1
+
+##############################
+# Stuff to run at include time
+##############################
+
+# Find out which variables were passed explicitely on the make command line. These
+# will be passed on to sub-makes, overriding spec.gmk settings.
+MAKE_ARGS=$(foreach var,$(subst =command,,$(filter %=command,$(foreach var,$(.VARIABLES),$(var)=$(firstword $(origin $(var)))))),$(var)=$($(var)))
+
+list_alt_overrides_with_origins=$(filter ALT_%=environment ALT_%=command,$(foreach var,$(.VARIABLES),$(var)=$(firstword $(origin $(var)))))
+list_alt_overrides=$(subst =command,,$(subst =environment,,$(list_alt_overrides_with_origins)))
+
+##############################
+# Functions
+##############################
+
+define fatal-error
+    # If the user specificed a "global" target (e.g. 'help'), do not exit but continue running
+    $$(if $$(findstring help,$$(MAKECMDGOALS)),,$$(error Cannot continue))
+endef
+
+define ParseLogLevel
+    ifeq ($$(origin VERBOSE),undefined)
+        # Setup logging according to LOG (but only if VERBOSE is not given)
+        ifeq ($$(LOG),)
+            # Set LOG to "warn" as default if not set (and no VERBOSE given)
+            LOG=warn
+        endif
+        ifeq ($$(LOG),warn)
+            VERBOSE=-s
+        else ifeq ($$(LOG),info)
+            VERBOSE=
+        else ifeq ($$(LOG),debug)
+            VERBOSE=
+        else ifeq ($$(LOG),trace)
+            VERBOSE=-d -p
+        else
+            $$(info Error: LOG must be one of: warn, info, debug or trace.)
+            $$(eval $$(call fatal-error))
+        endif
+    else
+        ifneq ($$(LOG),)
+            # We have both a VERBOSE and a LOG argument. This is OK only if this is a repeated call by ourselves,
+            # but complain if this is the top-level make call.
+            ifeq ($$(MAKELEVEL),0)
+                $$(info Cannot use LOG=$$(LOG) and VERBOSE=$$(VERBOSE) at the same time. Choose one.)
+                $$(eval $$(call fatal-error))
+            endif
+        endif
+    endif
+endef
+
+# TODO: Fix duplication in MakeBase.gmk
+define SetupLogging
+    ifneq ($(findstring $(LOG),debug trace),)
+        # Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
+        OLD_SHELL:=$$(SHELL)
+        SHELL = $$(warning Building $$@$$(if $$<, (from $$<))$(if $$?, ($$? newer)))$$(OLD_SHELL) -x
+    endif
+endef
+
+define ParseConfAndSpec
+    ifneq ($$(origin SPEC),undefined)
+        # We have been given a SPEC, check that it works out properly
+        ifeq ($$(wildcard $$(SPEC)),)
+            $$(info Cannot locate spec.gmk, given by SPEC=$$(SPEC))
+            $$(eval $$(call fatal-error))
+        endif
+        ifneq ($$(origin CONF),undefined)
+            # We also have a CONF argument. This is OK only if this is a repeated call by ourselves,
+            # but complain if this is the top-level make call.
+            ifeq ($$(MAKELEVEL),0)
+                $$(info Cannot use CONF=$$(CONF) and SPEC=$$(SPEC) at the same time. Choose one.)
+                $$(eval $$(call fatal-error))
+            endif
+        endif
+        # ... OK, we're satisfied, we'll use this SPEC later on
+    else
+        # Find all spec.gmk files in the build output directory
+        output_dir=$$(root_dir)/build
+        all_spec_files=$$(wildcard $$(output_dir)/*/spec.gmk)
+        ifeq ($$(all_spec_files),)
+            $$(info No configurations found for $$(root_dir)! Please run configure to create a configuration.)
+            $$(eval $$(call fatal-error))
+        endif
+        # Extract the configuration names from the path
+        all_confs=$$(patsubst %/spec.gmk,%,$$(patsubst $$(output_dir)/%,%,$$(all_spec_files)))
+
+        ifneq ($$(origin CONF),undefined)
+            # User have given a CONF= argument.
+            ifeq ($$(CONF),)
+                # If given CONF=, match all configurations
+                matching_confs=$$(strip $$(all_confs))
+            else
+                # Otherwise select those that contain the given CONF string
+                matching_confs=$$(strip $$(foreach var,$$(all_confs),$$(if $$(findstring $$(CONF),$$(var)),$$(var))))
+            endif
+            ifeq ($$(matching_confs),)
+                $$(info No configurations found matching CONF=$$(CONF))
+                $$(info Available configurations:)
+                $$(foreach var,$$(all_confs),$$(info * $$(var)))
+                $$(eval $$(call fatal-error))
+            else
+                ifeq ($$(words $$(matching_confs)),1)
+                    $$(info Building '$$(matching_confs)' (matching CONF=$$(CONF)))
+                else
+                    $$(info Building the following configurations (matching CONF=$$(CONF)):)
+                    $$(foreach var,$$(matching_confs),$$(info * $$(var)))
+                endif
+            endif
+
+            # Create a SPEC definition. This will contain the path to one or more spec.gmk files.
+            SPEC=$$(addsuffix /spec.gmk,$$(addprefix $$(output_dir)/,$$(matching_confs)))
+        else
+            # No CONF or SPEC given, check the available configurations
+            ifneq ($$(words $$(all_spec_files)),1)
+                $$(info No CONF or SPEC given, but more than one spec.gmk found in $$(output_dir).)
+                $$(info Available configurations:)
+                $$(foreach var,$$(all_confs),$$(info * $$(var)))
+                $$(info Please retry building with CONF=<config> or SPEC=<specfile>)
+                $$(eval $$(call fatal-error))
+            endif
+
+            # We found exactly one configuration, use it
+            SPEC=$$(strip $$(all_spec_files))
+        endif
+    endif
+endef
+
+define CheckEnvironment
+    # Find all environment or command line variables that begin with ALT.
+    $(if $(list_alt_overrides),
+        @$(PRINTF) "\nWARNING: You have the following ALT_ variables set:\n"
+    @$(PRINTF) "$(foreach var,$(list_alt_overrides),$(var)=$$$(var))\n"
+    @$(PRINTF) "ALT_ variables are deprecated and will be ignored. Please clean your environment.\n\n"
+    )
+endef
+
+define PrintStartMessage
+    $(if $(VERBOSE),,@$(ECHO) Running make as $(MAKE) $(MFLAGS) $(MAKE_ARGS))
+    $(call CheckEnvironment)
+    @$(ECHO) "Building OpenJDK for target $(if $(MAKECMDGOALS),'$(MAKECMDGOALS)','all') in configuration '$(CONF_NAME)'"
+endef
+
+define PrintEndMessage
+    @$(ECHO) "Finished building OpenJDK for target '$@'"
+    $(call CheckEnvironment)
+endef
+
+endif # _MAKEHELPERS_GMK
--- a/common/makefiles/Makefile	Wed Jul 05 18:15:28 2017 +0200
+++ b/common/makefiles/Makefile	Wed Jul 05 18:16:12 2017 +0200
@@ -26,241 +26,128 @@
 # This must be the first rule
 default: all
 
-# Find out which variables were passed explicitely on the make command line. These
-# will be passed on to sub-makes, overriding spec.gmk settings.
-MAKE_ARGS=$(foreach var,$(subst =command,,$(filter %=command,$(foreach var,$(.VARIABLES),$(var)=$(firstword $(origin $(var)))))),$(var)=$($(var)))
-
-define fatal-error
-    # If the user specificed a "global" target (e.g. 'help'), do not exit but continue running
-    $$(if $$(findstring help,$$(MAKECMDGOALS)),,$$(error Cannot continue))
-endef
-
-ifeq ($(origin VERBOSE),undefined)
-    # Setup logging according to LOG (but only if VERBOSE is not given)
-    ifeq ($(LOG),)
-        # Set LOG to "warn" as default if not set (and no VERBOSE given)
-        LOG=warn
-    endif
-    ifeq ($(LOG),warn)
-        VERBOSE=-s
-    else ifeq ($(LOG),info)
-        VERBOSE=
-    else ifeq ($(LOG),debug)
-        VERBOSE=
-    else ifeq ($(LOG),trace)
-        VERBOSE=-d -p
-    else
-        $(info Error: LOG must be one of: warn, info, debug or trace.)
-        $(eval $(call fatal-error))
-    endif
+# Locate this Makefile
+ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
+    makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
 else
-    ifneq ($(LOG),)
-        # We have both a VERBOSE and a LOG argument. This is OK only if this is a repeated call by ourselves,
-        # but complain if this is the top-level make call.
-        ifeq ($(MAKELEVEL),0)
-            $(info Cannot use LOG=$(LOG) and VERBOSE=$(VERBOSE) at the same time. Choose one.)
-            $(eval $(call fatal-error))
-        endif
-    endif
+    makefile_path:=$(lastword $(MAKEFILE_LIST))
 endif
-
-# TODO: Fix duplication in MakeBase.gmk
-define SetupLogging
-    ifneq ($(findstring $(LOG),debug trace),)
-        # Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
-        OLD_SHELL:=$$(SHELL)
-        SHELL = $$(warning Building $$@$$(if $$<, (from $$<))$(if $$?, ($$? newer)))$$(OLD_SHELL) -x
-    endif
-endef
-
-$(eval $(call SetupLogging))
-
-# Find all environment or command line variables that begin with ALT.
-list_alt_overrides_with_origins = $(filter ALT_%=environment ALT_%=command,$(foreach var,$(.VARIABLES),$(var)=$(firstword $(origin $(var)))))
-list_alt_overrides=$(subst =command,,$(subst =environment,,$(list_alt_overrides_with_origins)))
-
-ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
-    makefile_path=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
-else
-    makefile_path=$(lastword $(MAKEFILE_LIST))
-endif
-root_dir=$(patsubst %/common/makefiles/Makefile,%,$(makefile_path))
-output_dir=$(root_dir)/build
+root_dir:=$(patsubst %/common/makefiles/Makefile,%,$(makefile_path))
 
-ifneq ($(origin SPEC),undefined)
-    # We have been given a SPEC, check that it works out properly
-    ifeq ($(wildcard $(SPEC)),)
-        $(info Cannot locate spec.gmk, given by SPEC=$(SPEC))
-        $(eval $(call fatal-error))
-    endif
-    ifneq ($(origin CONF),undefined)
-        # We also have a CONF argument. This is OK only if this is a repeated call by ourselves,
-        # but complain if this is the top-level make call.
-        ifeq ($(MAKELEVEL),0)
-            $(info Cannot use CONF=$(CONF) and SPEC=$(SPEC) at the same time. Choose one.)
-            $(eval $(call fatal-error))
-        endif
-    endif
-    # ... OK, we're satisfied, we'll use this SPEC later on
-else
-    # Find all spec.gmk files in the build output directory
-    all_spec_files=$(wildcard $(output_dir)/*/spec.gmk)
-    ifeq ($(all_spec_files),)
-        $(info No configurations found for $(root_dir)! Please run configure to create a configuration.)
-        $(eval $(call fatal-error))
-    endif
-    # Extract the configuration names from the path
-    all_confs=$(patsubst %/spec.gmk,%,$(patsubst $(output_dir)/%,%,$(all_spec_files)))
+# ... and then we can include our helper functions
+include $(dir $(makefile_path))/MakeHelpers.gmk
 
-    ifneq ($(origin CONF),undefined)
-        # User have given a CONF= argument.
-        ifeq ($(CONF),)
-            # If given CONF=, match all configurations
-            matching_confs=$(strip $(all_confs))
-        else
-            # Otherwise select those that contain the given CONF string
-            matching_confs=$(strip $(foreach var,$(all_confs),$(if $(findstring $(CONF),$(var)),$(var))))
-        endif
-        ifeq ($(matching_confs),)
-            $(info No configurations found matching CONF=$(CONF))
-            $(info Available configurations:)
-            $(foreach var,$(all_confs),$(info * $(var)))
-            $(eval $(call fatal-error))
-        else
-            ifeq ($(words $(matching_confs)),1)
-                $(info Building '$(matching_confs)' (matching CONF=$(CONF)))
-            else
-                $(info Building the following configurations (matching CONF=$(CONF)):)
-                $(foreach var,$(matching_confs),$(info * $(var)))
-            endif
-        endif
+$(eval $(call ParseLogLevel))
+$(eval $(call SetupLogging))
+$(eval $(call ParseConfAndSpec))
 
-        # Create a SPEC definition. This will contain the path to one or more spec.gmk files.
-        SPEC=$(addsuffix /spec.gmk,$(addprefix $(output_dir)/,$(matching_confs)))
-    else
-        # No CONF or SPEC given, check the available configurations
-        ifneq ($(words $(all_spec_files)),1)
-            $(info No CONF or SPEC given, but more than one spec.gmk found in $(output_dir).)
-            $(info Available configurations:)
-            $(foreach var,$(all_confs),$(info * $(var)))
-            $(info Please retry building with CONF=<config> or SPEC=<specfile>)
-            $(eval $(call fatal-error))
-        endif
-
-        # We found exactly one configuration, use it
-        SPEC=$(strip $(all_spec_files))
-    endif
+# Setup number of jobs to use. -jN is unfortunately not available for us to parse from the command line,
+# hence this workaround.
+ifeq ($(JOBS),)
+    JOBS=$(NUM_CORES)
 endif
 
 ifneq ($(words $(SPEC)),1)
-# We have multiple configurations to build, call make repeatedly
-all jdk hotspot jaxws jaxp corba langtools install images packages clean dist-clean:
+### We have multiple configurations to build, call make repeatedly
+all jdk hotspot jaxws jaxp corba langtools install images clean dist-clean:
 	@$(foreach spec,$(SPEC),($(MAKE) -f $(makefile_path) SPEC=$(spec) $(VERBOSE) VERBOSE=$(VERBOSE) $@ $(MAKE_ARGS)) &&) true
 
-.PHONY: all jdk hotspot jaxws jaxp corba langtools install images packages clean dist-clean
+.PHONY: all jdk hotspot jaxws jaxp corba langtools install images clean dist-clean
 
 else
-# This is the main part of the Makefile, for the normal case with SPEC specifying a single existing spec.gmk file.
+### This is the main part of the Makefile, for the normal case with SPEC specifying a single existing spec.gmk file.
 
 # Now load the spec
--include $(SPEC)
+include $(SPEC)
 
 # Load the vital tools for all the makefiles. 
--include $(SRC_ROOT)/common/makefiles/MakeBase.gmk
+include $(SRC_ROOT)/common/makefiles/MakeBase.gmk
 
-# Remove any build.log from a previous run
+### Clean up from previous run
+
+# Remove any build.log from a previous run, if they exist
 ifneq (,$(BUILD_LOG))
-    $(shell $(RM) $(BUILD_LOG))
+    ifneq (,$(BUILD_LOG_PREVIOUS))
+        # Rotate old log
+        $(shell $(RM) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
+        $(shell $(MV) $(BUILD_LOG) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
+    else
+        $(shell $(RM) $(BUILD_LOG) 2> /dev/null)
+    endif
 endif
-
 # Remove any javac server logs and port files. This
 # prevents a new make run to reuse the previous servers.
 ifneq (,$(JAVAC_SERVERS))
     $(shell mkdir -p $(JAVAC_SERVERS) && rm -rf $(JAVAC_SERVERS)/*)
 endif
-# Reset the build timers.
-$(eval $(call ResetTimers))
 # Clean out any notifications from the previous build.
 $(shell find $(OUTPUT_ROOT) -name "_the.*.notify" $(FIND_DELETE))
 
-# If make was called explicitely with -j, don't add a -j ourself to sub-makes, since
-# this will be inherited automatically by make. Otherwise use our default for sub-makes.
-# The -j in MAKEFLAGS is only visible when executing a recipe, hence this macro.
-define GetMakeJobFlag
-    $(if $(findstring -j,$(MAKEFLAGS)),,-j$(NUM_CORES))
-endef
+# Reset the build timers.
+$(eval $(call ResetTimers))
 
-define CheckEnvironment
-    $(if $(list_alt_overrides),
-        @$(PRINTF) "\nWARNING: You have the following ALT_ variables set:\n"
-    @$(PRINTF) "$(foreach var,$(list_alt_overrides),$(var)=$$$(var))\n"
-    @$(PRINTF) "ALT_ variables are deprecated and will be ignored. Please clean your environment.\n"
-    )
-endef
-
-define PrintStartMessage
-    $(if $(VERBOSE),,@$(ECHO) Running make as $(MAKE) $(MFLAGS) $(MAKE_ARGS))
-    $(call CheckEnvironment)
-    @$(ECHO) "Building OpenJDK for target $(if $(MAKECMDGOALS),'$(MAKECMDGOALS)','all') in configuration '$(CONF_NAME)'"
-endef
-
-define PrintEndMessage
-    @$(ECHO) "Finished building OpenJDK for target '$@'"
-    $(call CheckEnvironment)
-endef
+### Main targets
 
 all: jdk
 	@$(if $(JAVAC_SERVERS),rm -rf $(JAVAC_SERVERS)/*.port)
 	@$(call AtRootMakeEnd)
 
-langtools: start-make
+langtools: start-make langtools-only
+langtools-only:
 	@$(call MakeStart,langtools,all)
-	@($(CD) $(LANGTOOLS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(call GetMakeJobFlag) $(LANGTOOLS_MAKE_ARGS) $(MAKE_ARGS))
+	@($(CD) $(LANGTOOLS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(MAKE_ARGS))
 	@$(call MakeFinish,langtools,all)
 
-corba: langtools
+corba: langtools corba-only
+corba-only:
 	@$(call MakeStart,corba,all)
-	@($(CD) $(CORBA_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(call GetMakeJobFlag) $(CORBA_MAKE_ARGS) $(MAKE_ARGS))
+	@($(CD) $(CORBA_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(MAKE_ARGS))
 	@$(call MakeFinish,corba,all)
 
-jaxp: langtools
+jaxp: langtools jaxp-only
+jaxp-only:
 	@$(call MakeStart,jaxp,all)
-	@($(CD) $(JAXP_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(call GetMakeJobFlag) $(CORBA_MAKE_ARGS) $(MAKE_ARGS))
+	@($(CD) $(JAXP_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(MAKE_ARGS))
 	@$(call MakeFinish,jaxp,all)
 
-jaxws: langtools jaxp
+jaxws: langtools jaxp jaxws-only
+jaxws-only:
 	@$(call MakeStart,jaxws,all)
-	@($(CD) $(JAXWS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(call GetMakeJobFlag) $(CORBA_MAKE_ARGS) $(MAKE_ARGS))
+	@($(CD) $(JAXWS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(MAKE_ARGS))
 	@$(call MakeFinish,jaxws,all)
 
-hotspot: langtools
+hotspot: langtools hotspot-only
+hotspot-only:
 	@$(call MakeStart,hotspot,all)
 	@($(CD) $(HOTSPOT_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) -j1 $(HOTSPOT_MAKE_ARGS) $(MAKE_ARGS))
 	@$(call MakeFinish,hotspot,all)
 
-jdk: langtools corba jaxp jaxws hotspot
+jdk: langtools corba jaxp jaxws hotspot jdk-only
+jdk-only:
 	@$(call MakeStart,jdk,all)
-	@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(call GetMakeJobFlag) $(JDK_MAKE_ARGS) $(MAKE_ARGS))
+	@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(MAKE_ARGS))
 	@$(call MakeFinish,jdk,all)
 
-images install packages: source-tips start-make jdk langtools corba jaxp jaxws hotspot
+images: source-tips start-make jdk langtools corba jaxp jaxws hotspot images-only
+images-only:
 	@$(call MakeStart,jdk-images,$@)
-	@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(call GetMakeJobFlag) $(JDK_MAKE_ARGS) $(MAKE_ARGS) $@)
+	@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(JDK_MAKE_ARGS) $(MAKE_ARGS) images)
 	@$(call MakeFinish,jdk-images,$@)
 	@$(if $(JAVAC_SERVERS),rm -rf $(JAVAC_SERVERS)/*.port)
 	@$(call AtRootMakeEnd)
 
-old-images: source-tips start-make jdk langtools corba jaxp jaxws hotspot
-	@$(call MakeStart,jdk-old-images,$@)
-	@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(call GetMakeJobFlag) $(JDK_MAKE_ARGS) $(MAKE_ARGS) $@)
-	@$(call MakeFinish,old-jdk-images,$@)
+install: source-tips start-make jdk langtools corba jaxp jaxws hotspot install-only
+install-only:
+	@$(call MakeStart,jdk-images,$@)
+	@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(JDK_MAKE_ARGS) $(MAKE_ARGS) install)
+	@$(call MakeFinish,jdk-images,$@)
 	@$(if $(JAVAC_SERVERS),rm -rf $(JAVAC_SERVERS)/*.port)
 	@$(call AtRootMakeEnd)
 
 start-make:
 	@$(call AtRootMakeStart)
 
-.PHONY: jdk hotspot jaxws jaxp corba langtools install images packages start-make
+.PHONY: jdk hotspot jaxws jaxp corba langtools install images start-make
 
 test: start-make
 	@$(call MakeStart,test,$(if $(TEST),$(TEST),all))
@@ -281,7 +168,7 @@
 
 # Remove everything, except the output from configure.
 clean:
-	@(cd $(OUTPUT_ROOT) && $(RM) -r `$(LS) $(OUTPUT_ROOT) | grep -v spec.gmk | grep -v Makefile | grep -v config.status | grep -v config.log | grep -v config.h | grep -v configure-arguments | grep -v "localdevenv.*" | grep -v uncygdrive.exe`)
+	@(cd $(OUTPUT_ROOT) && $(RM) -r `$(LS) $(OUTPUT_ROOT) | grep -v spec.gmk | grep -v spec.sh | grep -v Makefile | grep -v config.status | grep -v config.log | grep -v config.h | grep -v configure-arguments | grep -v "localdevenv.*" | grep -v uncygdrive.exe`)
 	@$(ECHO) Cleaned everything except the build configuration.
 .PHONY: clean
 
@@ -292,7 +179,7 @@
 .PHONY: dist-clean
 
 clean-jdk:
-	@(cd $(OUTPUT_ROOT) && $(RM) -r `$(LS) $(OUTPUT_ROOT) | grep -v spec.gmk | grep -v Makefile | grep -v config.status | grep -v config.log |  grep -v config.h | grep -v configure-arguments | \
+	@(cd $(OUTPUT_ROOT) && $(RM) -r `$(LS) $(OUTPUT_ROOT) | grep -v spec.gmk | grep -v spec.sh | grep -v Makefile | grep -v config.status | grep -v config.log |  grep -v config.h | grep -v configure-arguments | \
                                grep -v langtools | grep -v corba | grep -v jaxp | grep -v jaxws | grep -v hotspot`)
 	@$(ECHO) "Cleaned jdk build artifacts (but not langtools,corba,jaxp,jaxws,hotspot nor the build configuration)"
 .PHONY: clean
--- a/common/makefiles/NativeCompilation.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ b/common/makefiles/NativeCompilation.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -51,47 +51,55 @@
     # param 5 = the c compiler
     # param 6 = the c++ flags to the compiler
     # param 7 = the c++ compiler
+    # param 8 = the flags to the assembler
 
     ifneq (,$$(filter %.c,$2))
         # Compile as a C file
-        $1_$2_FLAGS=$4 $$($1_$(notdir $2)_CFLAGS)
+        $1_$2_FLAGS=$4 $$($1_$(notdir $2)_CFLAGS) -c
         $1_$2_COMP=$5
         $1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
     else ifneq (,$$(filter %.m,$2))
         # Compile as a objective-c file
-        $1_$2_FLAGS=-x objective-c $4 $$($1_$(notdir $2)_CFLAGS)
+        $1_$2_FLAGS=-x objective-c $4 $$($1_$(notdir $2)_CFLAGS) -c
         $1_$2_COMP=$5
         $1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
+    else ifneq (,$$(filter %.s,$2))
+        # Compile as assembler file
+        $1_$2_FLAGS=$8
+        $1_$2_COMP=$(AS)
+        $1_$2_DEP_FLAG:=
     else
         # Compile as a C++ file
-        $1_$2_FLAGS=$6 $$($1_$(notdir $2)_CXXFLAGS)
+        $1_$2_FLAGS=$6 $$($1_$(notdir $2)_CXXFLAGS) -c
         $1_$2_COMP=$7
         $1_$2_DEP_FLAG:=$(CXX_FLAG_DEPS)
     endif
     # Generate the .o (.obj) file name and place it in the bin dir.
-    $1_$2_OBJ:=$3/$$(patsubst %.cpp,%$(OBJ_SUFFIX),$$(patsubst %.c,%$(OBJ_SUFFIX),$$(patsubst %.m,%$(OBJ_SUFFIX),$$(notdir $2))))
+    $1_$2_OBJ:=$3/$$(patsubst %.cpp,%$(OBJ_SUFFIX),$$(patsubst %.c,%$(OBJ_SUFFIX),$$(patsubst %.m,%$(OBJ_SUFFIX),$$(patsubst %.s,%$(OBJ_SUFFIX),$$(notdir $2)))))
     # Only continue if this object file hasn't been processed already. This lets the first found
     # source file override any other with the same name.
     ifeq (,$$(findstring $$($1_$2_OBJ),$$($1_OBJS_SO_FAR)))
         $1_OBJS_SO_FAR+=$$($1_$2_OBJ)
-        # And this is the dependency file for this obj file.
-        $1_$2_DEP:=$$(patsubst %$(OBJ_SUFFIX),%.d,$$($1_$2_OBJ))
-        # Include previously generated dependency information. (if it exists)
-        -include $$($1_$2_DEP)
+        ifeq (,$$(filter %.s,$2))
+          # And this is the dependency file for this obj file.
+          $1_$2_DEP:=$$(patsubst %$(OBJ_SUFFIX),%.d,$$($1_$2_OBJ))
+          # Include previously generated dependency information. (if it exists)
+          -include $$($1_$2_DEP)
 
-        ifeq ($(COMPILER_TYPE),CL)
-            $1_$2_DEBUG_OUT_FLAGS:=-Fd$$(patsubst %$(OBJ_SUFFIX),%.pdb,$$($1_$2_OBJ)) \
-				   -Fm$$(patsubst %$(OBJ_SUFFIX),%.map,$$($1_$2_OBJ))
+          ifeq ($(COMPILER_TYPE),CL)
+              $1_$2_DEBUG_OUT_FLAGS:=-Fd$$(patsubst %$(OBJ_SUFFIX),%.pdb,$$($1_$2_OBJ)) \
+                                     -Fm$$(patsubst %$(OBJ_SUFFIX),%.map,$$($1_$2_OBJ))
+          endif
         endif
 
         $$($1_$2_OBJ) : $2
         ifeq ($(COMPILER_TYPE),CC)
 		$$(call COMPILING_MSG,$$(notdir $2))
-		$$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP) -c $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
+		$$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
         endif
         ifeq ($(COMPILER_TYPE),CL)
 		$$(call COMPILING_MSG,$$(notdir $2))
-		$$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEBUG_OUT_FLAGS) -c $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
+		$$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEBUG_OUT_FLAGS) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
         endif
     endif
 endef
@@ -107,9 +115,9 @@
     #    LDFLAGS_SUFFIX the linker flags to be added last on the commandline
     #        typically the libraries linked to.
     #    ARFLAGS the archiver flags to be used
-    #    BIN the directory where we store the object files
-    #    LIB the resulting library file
-    #    EXE the resulting exec file
+    #    OBJECT_DIR the directory where we store the object files
+    #    LIBRARY the resulting library file
+    #    PROGRAM the resulting exec file
     #    INCLUDES only pick source from these directories
     #    EXCLUDES do not pick source from these directories
     #    INCLUDE_FILES only compile exactly these files!
@@ -118,6 +126,9 @@
     #    RC_FLAGS flags for RC.
     #    MAPFILE mapfile
     #    REORDER reorder file
+    #    DEBUG_SYMBOLS add debug symbols (if configured on)
+    #    CC the compiler to use, default is $(CC)
+    #    LDEXE the linker to use for linking executables, default is $(LDEXE)
     $(if $2,$1_$(strip $2))
     $(if $3,$1_$(strip $3))
     $(if $4,$1_$(strip $4))
@@ -137,13 +148,94 @@
     $(if $(18),$1_$(strip $(18)))
     $(if $(19),$1_$(strip $(19)))
     $(if $(20),$1_$(strip $(20)))
+    $(if $(21),$1_$(strip $(21)))
+    $(if $(22),$(error Internal makefile error: Too many arguments to SetupNativeCompilation, please update NativeCompilation.gmk))
+
+    ifneq (,$$($1_BIN))
+        $$(error BIN has been replaced with OBJECT_DIR)
+    endif
+
+    ifneq (,$$($1_LIB))
+        $$(error LIB has been replaced with LIBRARY)
+    endif
+
+    ifneq (,$$($1_EXE))
+        $$(error EXE has been replaced with PROGRAM)
+    endif
+
+    ifneq (,$$($1_LIBRARY))
+        ifeq (,$$($1_OUTPUT_DIR))
+            $$(error LIBRARY requires OUTPUT_DIR)
+        endif
+
+        ifneq ($$($1_LIBRARY),$(basename $$($1_LIBRARY)))
+            $$(error directory of LIBRARY should be specified using OUTPUT_DIR)
+        endif
+
+        ifneq (,$(findstring $(SHARED_LIBRARY_SUFFIX),$$($1_LIBRARY)))
+            $$(error LIBRARY should be specified without SHARED_LIBRARY_SUFFIX: $(SHARED_LIBRARY_SUFFIX))
+        endif
+
+        ifneq (,$(findstring $(LIBRARY_PREFIX),$$($1_LIBRARY)))
+            $$(error LIBRARY should be specified without LIBRARY_PREFIX: $(LIBRARY_PREFIX))
+        endif
+
+        $1_BASENAME:=$(LIBRARY_PREFIX)$$($1_LIBRARY)$(SHARED_LIBRARY_SUFFIX)
+        $1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
+
+    endif
+
+    ifneq (,$$($1_STATIC_LIBRARY))
+        ifeq (,$$($1_OUTPUT_DIR))
+            $$(error STATIC_LIBRARY requires OUTPUT_DIR)
+        endif
+
+        ifneq ($$($1_STATIC_LIBRARY),$(basename $$($1_STATIC_LIBRARY)))
+            $$(error directory of STATIC_LIBRARY should be specified using OUTPUT_DIR)
+        endif
+
+        ifneq (,$(findstring $(STATIC_LIBRARY_SUFFIX),$$($1_STATIC_LIBRARY)))
+            $$(error STATIC_LIBRARY should be specified without STATIC_LIBRARY_SUFFIX: $(STATIC_LIBRARY_SUFFIX))
+        endif
+
+        ifneq (,$(findstring $(LIBRARY_PREFIX),$$($1_STATIC_LIBRARY)))
+            $$(error STATIC_LIBRARY should be specified without LIBRARY_PREFIX: $(LIBRARY_PREFIX))
+        endif
+
+        $1_BASENAME:=$(LIBRARY_PREFIX)$$($1_STATIC_LIBRARY)$(STATIC_LIBRARY_SUFFIX)
+        $1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
+    endif
+
+    ifneq (,$$($1_PROGRAM))
+        ifeq (,$$($1_OUTPUT_DIR))
+            $$(error PROGRAM requires OUTPUT_DIR)
+        endif
+
+        ifneq ($$($1_PROGRAM),$(basename $$($1_PROGRAM)))
+            $$(error directory of PROGRAM should be specified using OUTPUT_DIR)
+        endif
+
+        ifneq (,$(findstring $(EXE_SUFFIX),$$($1_PROGRAM)))
+            $$(error PROGRAM should be specified without EXE_SUFFIX: $(EXE_SUFFIX))
+        endif
+
+        $1_BASENAME:=$$($1_PROGRAM)$(EXE_SUFFIX)
+        $1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
+
+    endif
+
+    ifeq (,$$($1_TARGET))
+        $$(error Neither PROGRAM, LIBRARY nor STATIC_LIBRARY has been specified for SetupNativeCompilation)
+    endif
 
     ifeq (,$$($1_LANG))
         $$(error You have to specify LANG for native compilation $1)
     endif
     ifeq (C,$$($1_LANG))
+    ifeq ($$($1_LDEXE),)
+	    $1_LDEXE:=$(LDEXE)
+    endif
 	$1_LD:=$(LD)
-	$1_LDEXE:=$(LDEXE)
     else
        ifeq (C++,$$($1_LANG))
            $1_LD:=$(LDCXX)
@@ -153,8 +245,12 @@
        endif
     endif
 
+    ifeq ($$($1_CC),)
+        $1_CC:=$(CC)
+    endif
+
     # Make sure the dirs exist.
-    $$(shell $(MKDIR) -p $$($1_SRC) $$($1_BIN) $$(dir $$($1_LIB)) $$(dir $$($1_EXE)))
+    $$(shell $(MKDIR) -p $$($1_SRC) $$($1_OBJECT_DIR) $$($1_OUTPUT_DIR))
     # Find all files in the source trees. Sort to remove duplicates.
     $1_ALL_SRCS := $$(sort $$(foreach i,$$($1_SRC), $$(shell $(FIND) $$i -type f)))
     # Extract the C/C++ files.
@@ -163,7 +259,7 @@
     ifneq ($$($1_EXCLUDE_FILES),)
         $1_EXCLUDE_FILES:=$$(addprefix %,$$($1_EXCLUDE_FILES))
     endif
-    $1_SRCS     := $$(filter-out $$($1_EXCLUDE_FILES),$$(filter %.c %.cpp %.m,$$($1_ALL_SRCS)))
+    $1_SRCS     := $$(filter-out $$($1_EXCLUDE_FILES),$$(filter %.s %.c %.cpp %.m,$$($1_ALL_SRCS)))
     ifneq (,$$(strip $$($1_INCLUDE_FILES)))
         $1_SRCS := $$(filter $$($1_INCLUDE_FILES),$$($1_SRCS))
     endif
@@ -171,7 +267,7 @@
         $$(error No sources found for $1 when looking inside the dirs $$($1_SRC))
     endif
     # There can be only a single bin dir root, no need to foreach over the roots.
-    $1_BINS     := $$(wildcard $$($1_BIN)/*$(OBJ_SUFFIX))
+    $1_BINS     := $$(wildcard $$($1_OBJECT_DIR)/*$(OBJ_SUFFIX))
     # Now we have a list of all c/c++ files to compile: $$($1_SRCS)
     # and we have a list of all existing object files: $$($1_BINS)
 
@@ -187,37 +283,36 @@
 
     # Calculate the expected output from compiling the sources (sort to remove duplicates. Also provides
     # a reproducable order on the input files to the linker).
-    $1_EXPECTED_OBJS:=$$(sort $$(addprefix $$($1_BIN)/,$$(patsubst %.cpp,%$(OBJ_SUFFIX),$$(patsubst %.c,%$(OBJ_SUFFIX),$$(patsubst %.m,%$(OBJ_SUFFIX),$$(notdir $$($1_SRCS)))))))
-    $1 := $$($1_EXPECTED_OBJS)
+    $1_EXPECTED_OBJS:=$$(sort $$(addprefix $$($1_OBJECT_DIR)/,$$(patsubst %.cpp,%$(OBJ_SUFFIX),$$(patsubst %.c,%$(OBJ_SUFFIX),$$(patsubst %.m,%$(OBJ_SUFFIX),$$(patsubst %.s,%$(OBJ_SUFFIX),$$(notdir $$($1_SRCS))))))))
     # Are there too many object files on disk? Perhaps because some source file was removed?
     $1_SUPERFLOUS_OBJS:=$$(sort $$(filter-out $$($1_EXPECTED_OBJS),$$($1_BINS)))
     # Clean out the superfluous object files.
     $$(shell $(RM) -f $$($1_SUPERFLUOUS_OBJS))
 
-    # Pickup extra HOST_OS_API and/or PLATFORM dependent variables for CFLAGS.
-    $1_EXTRA_CFLAGS:=$$($1_CFLAGS_$(HOST_OS_API)) $$($1_CFLAGS_$(PLATFORM))
+    # Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables for CFLAGS.
+    $1_EXTRA_CFLAGS:=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_CFLAGS_$(OPENJDK_TARGET_OS))
     ifneq ($(DEBUG_LEVEL),release)
         # Pickup extra debug dependent variables for CFLAGS
         $1_EXTRA_CFLAGS+=$$($1_CFLAGS_debug)
-        $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(HOST_OS_API)_debug)
-        $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(PLATFORM)_debug)
+        $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)_debug)
+        $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_debug)
     else
         $1_EXTRA_CFLAGS+=$$($1_CFLAGS_release)
-        $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(HOST_OS_API)_release)
-        $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(PLATFORM)_release)
+        $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)_release)
+        $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_release)
     endif
 
-    # Pickup extra HOST_OS_API and/or PLATFORM dependent variables for CXXFLAGS.
-    $1_EXTRA_CXXFLAGS:=$$($1_CXXFLAGS_$(HOST_OS_API)) $$($1_CXXFLAGS_$(PLATFORM))
+    # Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables for CXXFLAGS.
+    $1_EXTRA_CXXFLAGS:=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS))
     ifneq ($(DEBUG_LEVEL),release)
         # Pickup extra debug dependent variables for CXXFLAGS
         $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_debug)
-        $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(HOST_OS_API)_debug)
-        $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(PLATFORM)_debug)
+        $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_API)_debug)
+        $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_debug)
     else
         $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_release)
-        $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(HOST_OS_API)_release)
-        $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(PLATFORM)_release)
+        $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_API)_release)
+        $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release)
     endif
 
     ifeq ($$($1_CXXFLAGS),)
@@ -232,33 +327,62 @@
           $1_EXTRA_CXXFLAGS += $$(CXX_FLAG_REORDER)
     endif
 
+    ifneq (no, $(ENABLE_DEBUG_SYMBOLS))
+	ifneq ($(OPENJDK_TARGET_OS), solaris)
+# <weird code />
+# There is very weird code in Defs-solaris.gmk that first sets variables as decribed below
+#   and then a couple of hundreds of line below resets them...
+#   this feels like a sure bug...but before this is confirmed, mimic this behaviour
+# (note: skip indenting this as it will surely be removed anyway)
+# <weird code />
+
+        ifneq (,$$($1_DEBUG_SYMBOLS))
+		$1_OPTIMIZATION := LOW
+		$1_EXTRA_CFLAGS += $(CFLAGS_DEBUG_SYMBOLS)
+		$1_EXTRA_CXXFLAGS += $(CXXFLAGS_DEBUG_SYMBOLS)
+        endif
+
+# <weird code />
+	endif
+# <weird code />
+    endif
+
+    ifeq (NONE, $$($1_OPTIMIZATION))
+	$1_EXTRA_CFLAGS += $$(C_O_FLAG_NONE)
+	$1_EXTRA_CXXFLAGS += $$(CXX_O_FLAG_NONE)
+    else ifeq (LOW, $$($1_OPTIMIZATION))
+	$1_EXTRA_CFLAGS += $$(C_O_FLAG_NORM)
+	$1_EXTRA_CXXFLAGS += $$(CXX_O_FLAG_NORM)
+    else ifeq (HIGH, $$($1_OPTIMIZATION))
+	$1_EXTRA_CFLAGS += $$(C_O_FLAG_HI)
+	$1_EXTRA_CXXFLAGS += $$(CXX_O_FLAG_HI)
+    else ifeq (HIGHEST, $$($1_OPTIMIZATION))
+	$1_EXTRA_CFLAGS += $$(C_O_FLAG_HIGHEST)
+	$1_EXTRA_CXXFLAGS += $$(CXX_O_FLAG_HIGHEST)
+    else ifneq (, $$($1_OPTIMIZATION))
+	$$(error Unknown value for OPTIMIZATION: $$($1_OPTIMIZATION))
+    endif
+
     # Now create a list of the packages that are about to compile. Used when sending source
     # in a batch to the compiler.
-    $$(shell $(RM) $$($1_BIN)/_the.list_of_sources)
-    $$(eval $$(call ListPathsSafelyNow,$1_SRCS,\n, >> $$($1_BIN)/_the.list_of_sources))
+    $$(shell $(RM) $$($1_OBJECT_DIR)/_the.list_of_sources)
+    $$(eval $$(call ListPathsSafelyNow,$1_SRCS,\n, >> $$($1_OBJECT_DIR)/_the.list_of_sources))
 
     # Now call add_native_source for each source file we are going to compile.
     $$(foreach p,$$($1_SRCS),\
-        $$(eval $$(call add_native_source,$1,$$p,$$($1_BIN),\
-                        $$($1_CFLAGS) $$($1_EXTRA_CFLAGS),$(CC),\
-			$$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS),$(CXX))))
+        $$(eval $$(call add_native_source,$1,$$p,$$($1_OBJECT_DIR),\
+                        $$($1_CFLAGS) $$($1_EXTRA_CFLAGS),$$($1_CC),\
+			$$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS),$(CXX),$$($1_ASFLAGS))))
 
     # On windows we need to create a resource file
-    ifeq ($(HOST_OS_API), winapi)
+    ifeq ($(OPENJDK_TARGET_OS_API), winapi)
         ifneq (,$$($1_VERSIONINFO_RESOURCE))
-            ifneq (,$$($1_LIB))
-                $1_BASENAME:=$$(basename $$(notdir $$($1_LIB)))
-            endif
-            ifneq (,$$($1_EXE))
-                $1_BASENAME:=$$(basename $$(notdir $$($1_EXE)))
-            endif
-            $1_RES:=$$($1_BIN)/$$($1_BASENAME).res
+            $1_RES:=$$($1_OBJECT_DIR)/$$($1_BASENAME).res
             $$($1_RES): $$($1_VERSIONINFO_RESOURCE)
 		$(RC) $$($1_RC_FLAGS) $(CC_OUT_OPTION)$$@ $$($1_VERSIONINFO_RESOURCE)
         endif
         ifneq (,$$($1_MANIFEST))
-            $1_PROGRAM:=$$(basename $$(notdir $$($1_EXE)))
-            $1_GEN_MANIFEST:=$$($1_BIN)/$$($1_PROGRAM).manifest
+            $1_GEN_MANIFEST:=$$($1_OBJECT_DIR)/$$($1_PROGRAM).manifest
             IMVERSIONVALUE:=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VERSION).$(COOKED_BUILD_NUMBER)
             $$($1_GEN_MANIFEST): $$($1_MANIFEST)
 		$(SED) 's%IMVERSION%$$(IMVERSIONVALUE)%g;s%PROGRAM%$$($1_PROGRAM)%g' $$< > $$@
@@ -266,54 +390,184 @@
     endif
 
     # mapfile doesnt seem to be implemented on macosx (yet??)
-    ifneq ($(HOST_OS),macosx)
-    ifneq ($(HOST_OS),windows)
-        $1_REAL_MAPFILE := $$($1_MAPFILE)
+    ifneq ($(OPENJDK_TARGET_CPU),ppc)
+    ifneq ($(OPENJDK_TARGET_CPU),arm)
+    ifneq ($(OPENJDK_TARGET_OS),macosx)
+    ifneq ($(OPENJDK_TARGET_OS),windows)
+        $1_REAL_MAPFILE:=$$($1_MAPFILE)
         ifneq (,$$($1_REORDER))
-            $1_REAL_MAPFILE := $$($1_BIN)/mapfile
+            $1_REAL_MAPFILE:=$$($1_OBJECT_DIR)/mapfile
 
             $$($1_REAL_MAPFILE) : $$($1_MAPFILE) $$($1_REORDER)
 		$$(MKDIR) -p $$(@D)
 		$$(CP) $$($1_MAPFILE) $$@.tmp
-		$$(SED) -e 's=OUTPUTDIR=$$($1_BIN)=' $$($1_REORDER) >> $$@.tmp
+		$$(SED) -e 's=OUTPUTDIR=$$($1_OBJECT_DIR)=' $$($1_REORDER) >> $$@.tmp
 		$$(MV) $$@.tmp $$@
         endif
     endif
     endif
+    endif
+    endif
 
-    # Pickup extra HOST_OS_API dependent variables (posix or winapi) and 
+    # Pickup extra OPENJDK_TARGET_OS_API dependent variables (posix or winapi) and 
     # (linux,solaris,windows,bsd) for LDFLAGS and LDFLAGS_SUFFIX
-    $1_EXTRA_LDFLAGS:=$$($1_LDFLAGS_$(HOST_OS_API)) $$($1_LDFLAGS_$(PLATFORM))
-    $1_EXTRA_LDFLAGS_SUFFIX:=$$($1_LDFLAGS_SUFFIX_$(HOST_OS_API)) $$($1_LDFLAGS_SUFFIX_$(PLATFORM))
+    $1_EXTRA_LDFLAGS:=$$($1_LDFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS))
+    $1_EXTRA_LDFLAGS_SUFFIX:=$$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS_API)) $$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS))
     ifneq (,$$($1_REAL_MAPFILE))
-	$1_EXTRA_LDFLAGS += $(call SET_SHARED_LIBRARY_MAPFILE,$$($1_REAL_MAPFILE))
+        $1_EXTRA_LDFLAGS += $(call SET_SHARED_LIBRARY_MAPFILE,$$($1_REAL_MAPFILE))
     endif
 
-    ifneq (,$$($1_LIB))
-        ifeq (dynamic,$$(patsubst %$(SHARED_LIBRARY_SUFFIX),dynamic,$$($1_LIB)))
-            # Generating a dynamic library.
-            $1_EXTRA_LDFLAGS+=$$(call SET_SHARED_LIBRARY_NAME,$$(notdir $$($1_LIB)))
-            $$($1_LIB) : $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_REAL_MAPFILE)
-	    	$$(call LINKING_MSG,$$(notdir $$($1_LIB)))
-		$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(LD_OUT_OPTION)$$($1_LIB) \
-			$$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX)
-        else
-            # Generating a static library, ie object file archive.
-            $$($1_LIB) : $$($1_EXPECTED_OBJS) $$($1_RES)
-	    	$$(call ARCHIVING_MSG,$$(notdir $$($1_LIB)))
-		$(AR) $$($1_AR_FLAGS) $(AR_OUT_OPTION)$$($1_LIB) $$($1_EXPECTED_OBJS) \
+    $1 := $$($1_TARGET)
+    ifneq (,$$($1_LIBRARY))
+        # Generating a dynamic library.
+        $1_EXTRA_LDFLAGS+=$$(call SET_SHARED_LIBRARY_NAME,$$($1_BASENAME))
+        ifeq ($(OPENJDK_TARGET_OS), windows)
+            $1_EXTRA_LDFLAGS+="-implib:$$($1_OBJECT_DIR)/$$($1_LIBRARY).lib"
+        endif
+
+        ifneq (,$$($1_DEBUG_SYMBOLS))
+            ifeq ($(ENABLE_DEBUG_SYMBOLS), yes)
+                ifeq ($(OPENJDK_TARGET_OS), windows)
+                    $1_EXTRA_LDFLAGS+="-pdb:$$($1_OBJECT_DIR)/$$($1_LIBRARY).pdb" \
+				      "-map:$$($1_OBJECT_DIR)/$$($1_LIBRARY).map"
+                endif
+
+                $$($1_OUTPUT_DIR)/% : $$($1_OBJECT_DIR)/%
+			$(CP) $$< $$@
+
+
+                ifeq ($(OPENJDK_TARGET_OS), solaris)
+                    # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
+                    # Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
+                    # empty section headers until a fixed $(OBJCOPY) is available.
+                    # An empty section header has sh_addr == 0 and sh_size == 0.
+                    # This problem has only been seen on Solaris X64, but we call this tool
+                    # on all Solaris builds just in case.
+                    #
+                    # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
+                    # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
+                    $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET) \
+					$(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
+			$(RM) $$@
+			$(FIX_EMPTY_SEC_HDR_FLAGS) $$<
+			$(OBJCOPY) --only-keep-debug $$< $$@
+			$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $$(@F) $$<
+                else # not solaris
+                    $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET)
+			$(RM) $$@
+			$(OBJCOPY) --only-keep-debug $$< $$@
+			$(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
+                endif # Touch to not retrigger rule on rebuild
+			$(TOUCH) $$@
+
+                ifeq ($(ZIP_DEBUGINFO_FILES), 1)
+                    $1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz
+
+                    ifeq ($(OPENJDK_TARGET_OS), windows)
+                        $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz : $$($1_TARGET)
+				$(CD) $$($1_OBJECT_DIR) \
+				&& $(ZIP) -q $$@ $$($1_LIBRARY).map $$($1_LIBRARY).pdb
+                    else
+                        $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz : $$($1_TARGET) \
+					$$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo
+				$(CD) $$($1_OBJECT_DIR) \
+				&& $(ZIP) -q $$@ $$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo 
+                    endif
+                else
+                    ifeq ($(OPENJDK_TARGET_OS), windows)
+                        $1 += $$($1_OUTPUT_DIR)/$$($1_LIBRARY).map \
+			      $$($1_OUTPUT_DIR)/$$($1_LIBRARY).pdb
+                    else
+                        $1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo
+                    endif
+                endif
+            endif
+        endif
+
+        $$($1_TARGET) : $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_REAL_MAPFILE)
+		$$(call LINKING_MSG,$$($1_BASENAME))
+		$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(LD_OUT_OPTION)$$@ \
+		$$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) \
+		$$($1_EXTRA_LDFLAGS_SUFFIX)
+
+    endif
+
+    ifneq (,$$($1_STATIC_LIBRARY))
+        # Generating a static library, ie object file archive.
+        $$($1_TARGET) : $$($1_EXPECTED_OBJS) $$($1_RES)
+	        $$(call ARCHIVING_MSG,$$($1_LIBRARY))
+	        $(AR) $$($1_AR_FLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_EXPECTED_OBJS) \
 			$$($1_RES) $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX)
-       endif
     endif
-    ifneq (,$$($1_EXE))
+
+    ifneq (,$$($1_PROGRAM))
         # A executable binary has been specified, setup the target for it.
-        $$($1_EXE) : $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_GEN_MANIFEST)
-	    	$$(call LINKING_EXE_MSG,$$(notdir $$($1_EXE)))
-		$$($1_LDEXE) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(EXE_OUT_OPTION)$$($1_EXE) \
+        ifneq (,$$($1_DEBUG_SYMBOLS))
+            ifeq ($(ENABLE_DEBUG_SYMBOLS), yes)
+                ifeq ($(OPENJDK_TARGET_OS), windows)
+                    $1_EXTRA_LDFLAGS+="-pdb:$$($1_OBJECT_DIR)/$$($1_PROGRAM).pdb" \
+				      "-map:$$($1_OBJECT_DIR)/$$($1_PROGRAM).map"
+                endif
+
+                $$($1_OUTPUT_DIR)/% : $$($1_OBJECT_DIR)/%
+			$(CP) $$< $$@
+
+                ifeq ($(OPENJDK_TARGET_OS), solaris)
+                    # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
+                    # Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
+                    # empty section headers until a fixed $(OBJCOPY) is available.
+                    # An empty section header has sh_addr == 0 and sh_size == 0.
+                    # This problem has only been seen on Solaris X64, but we call this tool
+                    # on all Solaris builds just in case.
+                    #
+                    # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
+                    # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
+                    $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET) \
+					$(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
+			$(RM) $$@
+			$(FIX_EMPTY_SEC_HDR_FLAGS) $$<
+			$(OBJCOPY) --only-keep-debug $$< $$@
+			$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $$(@F) $$<
+                else # not solaris
+                    $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET)
+			$(RM) $$@
+			$(OBJCOPY) --only-keep-debug $$< $$@
+			$(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
+                endif
+			$(TOUCH) $$@
+
+                ifeq ($(ZIP_DEBUGINFO_FILES), 1)
+                    $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).diz
+
+                    ifeq ($(OPENJDK_TARGET_OS), windows)
+                        $$($1_OBJECT_DIR)/$$($1_PROGRAM).diz : $$($1_TARGET)
+				$(CD) $$($1_OBJECT_DIR) \
+				&& $(ZIP) -q $$@ $$($1_PROGRAM).map $$($1_PROGRAM).pdb
+                    else
+                        $$($1_OBJECT_DIR)/$$(PROGRAM_PREFIX)$$($1_PROGRAM).diz : $$($1_TARGET) \
+					$$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo
+				$(CD) $$($1_OBJECT_DIR) \
+				&& $(ZIP) -q $$@ $$($1_PROGRAM).debuginfo 
+                    endif
+                else
+                    ifeq ($(OPENJDK_TARGET_OS), windows)
+                        $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).map \
+			      $$($1_OUTPUT_DIR)/$$($1_PROGRAM).pdb
+                    else
+                        $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).debuginfo
+                    endif
+                endif
+            endif
+        endif
+
+        $$($1_TARGET) : $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_GEN_MANIFEST)
+	    	$$(call LINKING_EXE_MSG,$$($1_BASENAME))
+		$$($1_LDEXE) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(EXE_OUT_OPTION)$$($1_TARGET) \
 			$$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) \
 			$$($1_EXTRA_LDFLAGS_SUFFIX)
         ifneq (,$$($1_GEN_MANIFEST))
 		$(MT) -nologo /manifest $$($1_GEN_MANIFEST) /outputresource:$$@;#1
         endif
+
     endif
 endef
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/makefiles/RMICompilation.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -0,0 +1,104 @@
+#
+# 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.
+#
+
+define SetupRMICompilation
+    # param 1 is a name for a variable to depend on.
+    # param 2 and up are named args.
+    #   CLASSES:=List of classes to generate stubs for
+    #   CLASSES_DIR:=Directory where to look for classes
+    #   STUB_CLASSES_DIR:=Directory in where to put stub classes
+    #   RUN_V11:=Set to run rmic with -v1.1
+    #   RUN_V12:=Set to run rmic with -v1.2
+    #   RUN_IIOP:=Set to run rmic with -iiop
+    #   RUN_IIOP_STDPKG:=Set to run rmic with -iiop -standardPackage
+    #   KEEP_GENERATED:=Set to keep generated sources around
+    $(if $2,$1_$(strip $2))
+    $(if $3,$1_$(strip $3))
+    $(if $4,$1_$(strip $4))
+    $(if $5,$1_$(strip $5))
+    $(if $6,$1_$(strip $6))
+    $(if $7,$1_$(strip $7))
+    $(if $8,$1_$(strip $8))
+    $(if $9,$1_$(strip $9))
+    $(if $(10),$(error Internal makefile error: Too many arguments to SetupRMICompilation, please update RMICompilation.gmk))
+
+
+    $1_DEP_FILE := $$($1_STUB_CLASSES_DIR)/$1_rmic
+
+    $1_CLASSES_SLASH := $$(subst .,/,$$($1_CLASSES))
+    $1_CLASS_FILES := $$(addprefix $$($1_CLASSES_DIR)/,$$(addsuffix .class,$$($1_CLASSES_SLASH)))
+    $1_STUB_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Stub.class,$$($1_CLASSES_SLASH)))
+    $1_TARGETS := $$($1_STUB_FILES)
+    $1_ARGS :=
+    ifneq (,$$($1_RUN_V11))
+        $1_SKEL_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Skel.class,$$($1_CLASSES_SLASH)))
+        $1_TARGETS += $$($1_SKEL_FILES)
+        $1_ARGS += -v1.1
+    endif
+    ifneq (,$$($1_RUN_V12))
+        $1_ARGS += -v1.2
+    endif
+
+    $1_TIE_BASE_FILES := $$(foreach f,$$($1_CLASSES_SLASH),$$(dir $$f)_$$(notdir $$f))
+    $1_TIE_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/org/omg/stub/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
+    $1_TIE_STDPKG_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
+
+    ifneq (,$$($1_RUN_IIOP))
+        $1_TARGETS += $$($1_TIE_FILES)
+        $1_ARGS += -iiop
+    endif
+    ifneq (,$$($1_RUN_IIOP_STDPKG))
+        $1_TARGETS += $$($1_TIE_STDPKG_FILES)
+        $1_ARGS2 := -iiop -standardPackage
+    endif
+
+    ifneq (,$$($1_KEEP_GENERATED))
+        $1_ARGS += -keepgenerated
+        $1_TARGETS += $$(subst .class,.java,$$($1_TARGETS))
+    endif
+
+    $1_DOLLAR_SAFE_CLASSES := $$(subst $$$$,\$$$$,$$($1_CLASSES))
+
+    $$($1_TARGETS): $$($1_DEP_FILE) $$($1_CLASS_FILES)
+
+    $$($1_DEP_FILE): $$($1_CLASS_FILES)
+	$(MKDIR) -p $$($1_STUB_CLASSES_DIR)
+	if [ "x$$($1_ARGS)" != "x" ]; then \
+	    $(ECHO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) &&\
+	    $(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \
+			-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES);\
+	fi;
+	if [ "x$$($1_ARGS2)" != "x" ]; then \
+	    $(ECHO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) &&\
+	    $(RMIC) $$($1_ARGS2) -classpath "$$($1_CLASSES_DIR)" \
+			-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES);\
+	fi;
+
+
+    $1 := $$($1_TARGETS)
+
+    # By marking as secondary, this "touch" file doesn't need to be touched and will never exist.
+    .SECONDARY: $$($1_DEP_FILE)
+endef
--- a/common/makefiles/RMICompile.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-#
-# 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.
-#
-
-define SetupRMICompilation
-    # param 1 is a name for a variable to depend on.
-    # param 2 and up are named args.
-    #   CLASSES:=List of classes to generate stubs for
-    #   CLASSES_DIR:=Directory where to look for classes
-    #   STUB_CLASSES_DIR:=Directory in where to put stub classes
-    #   RUN_V11:=Set to run rmic with -v1.1
-    #   RUN_V12:=Set to run rmic with -v1.2
-    #   RUN_IIOP:=Set to run rmic with -iiop
-    #   RUN_IIOP_STDPKG:=Set to run rmic with -iiop -standardPackage
-    #   KEEP_GENERATED:=Set to keep generated sources around
-    $(if $2,$1_$(strip $2))
-    $(if $3,$1_$(strip $3))
-    $(if $4,$1_$(strip $4))
-    $(if $5,$1_$(strip $5))
-    $(if $6,$1_$(strip $6))
-    $(if $7,$1_$(strip $7))
-    $(if $8,$1_$(strip $8))
-    $(if $9,$1_$(strip $9))
-
-
-    $1_DEP_FILE := $$($1_STUB_CLASSES_DIR)/$1_rmic
-
-    $1_CLASSES_SLASH := $$(subst .,/,$$($1_CLASSES))
-    $1_CLASS_FILES := $$(addprefix $$($1_CLASSES_DIR)/,$$(addsuffix .class,$$($1_CLASSES_SLASH)))
-    $1_STUB_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Stub.class,$$($1_CLASSES_SLASH)))
-    $1_TARGETS := $$($1_STUB_FILES)
-    $1_ARGS :=
-    ifneq (,$$($1_RUN_V11))
-        $1_SKEL_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Skel.class,$$($1_CLASSES_SLASH)))
-        $1_TARGETS += $$($1_SKEL_FILES)
-        $1_ARGS += -v1.1
-    endif
-    ifneq (,$$($1_RUN_V12))
-        $1_ARGS += -v1.2
-    endif
-
-    $1_TIE_BASE_FILES := $$(foreach f,$$($1_CLASSES_SLASH),$$(dir $$f)_$$(notdir $$f))
-    $1_TIE_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/org/omg/stub/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
-    $1_TIE_STDPKG_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
-
-    ifneq (,$$($1_RUN_IIOP))
-        $1_TARGETS += $$($1_TIE_FILES)
-        $1_ARGS += -iiop
-    endif
-    ifneq (,$$($1_RUN_IIOP_STDPKG))
-        $1_TARGETS += $$($1_TIE_STDPKG_FILES)
-        $1_ARGS2 := -iiop -standardPackage
-    endif
-
-    ifneq (,$$($1_KEEP_GENERATED))
-        $1_ARGS += -keepgenerated
-        $1_TARGETS += $$(subst .class,.java,$$($1_TARGETS))
-    endif
-
-    $1_DOLLAR_SAFE_CLASSES := $$(subst $$$$,\$$$$,$$($1_CLASSES))
-
-    $$($1_TARGETS): $$($1_DEP_FILE) $$($1_CLASS_FILES)
-
-    $$($1_DEP_FILE): $$($1_CLASS_FILES)
-	$(MKDIR) -p $$($1_STUB_CLASSES_DIR)
-	if [ "x$$($1_ARGS)" != "x" ]; then \
-	    $(ECHO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) &&\
-	    $(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \
-			-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES);\
-	fi;
-	if [ "x$$($1_ARGS2)" != "x" ]; then \
-	    $(ECHO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) &&\
-	    $(RMIC) $$($1_ARGS2) -classpath "$$($1_CLASSES_DIR)" \
-			-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES);\
-	fi;
-
-
-    $1 := $$($1_TARGETS)
-
-    # By marking as secondary, this "touch" file doesn't need to be touched and will never exist.
-    .SECONDARY: $$($1_DEP_FILE)
-endef
--- a/corba/.hgtags	Wed Jul 05 18:15:28 2017 +0200
+++ b/corba/.hgtags	Wed Jul 05 18:16:12 2017 +0200
@@ -167,3 +167,4 @@
 cd879aff5d3cc1f58829aab3116880aa19525b78 jdk8-b43
 439d9bf8e4ff204cc89c9974c1515a508b2cc6ff jdk8-b44
 747dad9e9d37d244a5c765a1afe9194f7ddae118 jdk8-b45
+30141e598d72a6146126cb86b034ed6d0bd191b3 jdk8-b46
--- a/corba/src/share/classes/com/sun/corba/se/impl/encoding/CachedCodeBase.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/corba/src/share/classes/com/sun/corba/se/impl/encoding/CachedCodeBase.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -22,7 +22,6 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package com.sun.corba.se.impl.encoding;
 
 import java.util.Hashtable;
@@ -32,7 +31,8 @@
 import com.sun.org.omg.SendingContext._CodeBaseImplBase;
 import com.sun.org.omg.SendingContext._CodeBaseStub;
 import com.sun.corba.se.spi.transport.CorbaConnection;
-
+import com.sun.corba.se.spi.ior.IOR;
+import com.sun.corba.se.spi.orb.ORB;
 /**
  * Provides the reading side with a per connection cache of
  * info obtained via calls to the remote CodeBase.
@@ -51,14 +51,24 @@
  *
  * Needs cache management.
  */
-// REVISIT: revert to package protected after framework merge.
 public class CachedCodeBase extends _CodeBaseImplBase
 {
     private Hashtable implementations, fvds, bases;
-    private CodeBase delegate;
+    private volatile CodeBase delegate;
     private CorbaConnection conn;
 
-    private static Hashtable iorToCodeBaseObjMap = new Hashtable();
+    private static Object iorMapLock = new Object();
+    private static Hashtable<IOR,CodeBase> iorMap = new Hashtable<>();
+
+    public static synchronized void cleanCache( ORB orb ) {
+        synchronized (iorMapLock) {
+            for (IOR ior : iorMap.keySet()) {
+                if (ior.getORB() == orb) {
+                    iorMap.remove(ior);
+                }
+            }
+        }
+    }
 
     public CachedCodeBase(CorbaConnection connection) {
         conn = connection;
@@ -68,7 +78,7 @@
         return null;
     }
 
-    public String implementation (String repId) {
+    public synchronized String implementation (String repId) {
         String urlResult = null;
 
         if (implementations == null)
@@ -86,7 +96,7 @@
         return urlResult;
     }
 
-    public String[] implementations (String[] repIds) {
+    public synchronized String[] implementations (String[] repIds) {
         String[] urlResults = new String[repIds.length];
 
         for (int i = 0; i < urlResults.length; i++)
@@ -95,7 +105,7 @@
         return urlResults;
     }
 
-    public FullValueDescription meta (String repId) {
+    public synchronized FullValueDescription meta (String repId) {
         FullValueDescription result = null;
 
         if (fvds == null)
@@ -113,7 +123,7 @@
         return result;
     }
 
-    public FullValueDescription[] metas (String[] repIds) {
+    public synchronized FullValueDescription[] metas (String[] repIds) {
         FullValueDescription[] results
             = new FullValueDescription[repIds.length];
 
@@ -123,7 +133,7 @@
         return results;
     }
 
-    public String[] bases (String repId) {
+    public synchronized String[] bases (String repId) {
 
         String[] results = null;
 
@@ -145,7 +155,7 @@
     // Ensures that we've used the connection's IOR to create
     // a valid CodeBase delegate.  If this returns false, then
     // it is not valid to access the delegate.
-    private boolean connectedCodeBase() {
+    private synchronized boolean connectedCodeBase() {
         if (delegate != null)
             return true;
 
@@ -165,7 +175,7 @@
             return false;
         }
 
-        synchronized(this) {
+        synchronized(iorMapLock) {
 
             // Recheck the condition to make sure another
             // thread didn't already do this while we waited
@@ -173,7 +183,8 @@
                 return true;
 
             // Do we have a reference initialized by another connection?
-            delegate = (CodeBase)CachedCodeBase.iorToCodeBaseObjMap.get(conn.getCodeBaseIOR());
+            delegate = CachedCodeBase.iorMap.get(conn.getCodeBaseIOR());
+
             if (delegate != null)
                 return true;
 
@@ -181,8 +192,7 @@
             delegate = CodeBaseHelper.narrow(getObjectFromIOR());
 
             // Save it for the benefit of other connections
-            CachedCodeBase.iorToCodeBaseObjMap.put(conn.getCodeBaseIOR(),
-                                                   delegate);
+            CachedCodeBase.iorMap.put(conn.getCodeBaseIOR(), delegate);
         }
 
         // It's now safe to use the delegate
--- a/corba/src/share/classes/com/sun/corba/se/impl/interceptors/PIHandlerImpl.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/corba/src/share/classes/com/sun/corba/se/impl/interceptors/PIHandlerImpl.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -58,7 +58,7 @@
 import org.omg.PortableInterceptor.TRANSPORT_RETRY;
 import org.omg.PortableInterceptor.USER_EXCEPTION;
 import org.omg.PortableInterceptor.PolicyFactory;
-import org.omg.PortableInterceptor.ObjectReferenceTemplate ;
+import org.omg.PortableInterceptor.ObjectReferenceTemplate;
 
 import com.sun.corba.se.pept.encoding.OutputObject;
 
@@ -112,10 +112,10 @@
         }
     }
 
-    private ORB orb ;
-    InterceptorsSystemException wrapper ;
-    ORBUtilSystemException orbutilWrapper ;
-    OMGSystemException omgWrapper ;
+    private ORB orb;
+    InterceptorsSystemException wrapper;
+    ORBUtilSystemException orbutilWrapper;
+    OMGSystemException omgWrapper;
 
     // A unique id used in ServerRequestInfo.
     // This does not correspond to the GIOP request id.
@@ -178,6 +178,21 @@
             }
         };
 
+    public void close() {
+        orb = null;
+        wrapper = null;
+        orbutilWrapper = null;
+        omgWrapper = null;
+        codecFactory = null;
+        arguments = null;
+        interceptorList = null;
+        interceptorInvoker = null;
+        current = null;
+        policyFactoryTable = null;
+        threadLocalClientRequestInfoStack = null;
+        threadLocalServerRequestInfoStack = null;
+    }
+
     // Class to contain all ThreadLocal data for ClientRequestInfo
     // maintenance.
     //
--- a/corba/src/share/classes/com/sun/corba/se/impl/interceptors/PINoOpHandlerImpl.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/corba/src/share/classes/com/sun/corba/se/impl/interceptors/PINoOpHandlerImpl.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -69,6 +69,9 @@
     public PINoOpHandlerImpl( ) {
     }
 
+    public void close() {
+    }
+
     public void initialize() {
     }
 
--- a/corba/src/share/classes/com/sun/corba/se/impl/monitoring/MonitoringManagerFactoryImpl.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/corba/src/share/classes/com/sun/corba/se/impl/monitoring/MonitoringManagerFactoryImpl.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -34,14 +34,18 @@
     private HashMap monitoringManagerTable = new HashMap();
 
     public synchronized MonitoringManager createMonitoringManager(
-        String nameOfTheRoot, String description )
+        String nameOfTheRoot, String description)
     {
         MonitoringManagerImpl m = null;
         m = (MonitoringManagerImpl)monitoringManagerTable.get(nameOfTheRoot);
         if (m == null) {
-            m = new MonitoringManagerImpl( nameOfTheRoot, description );
+            m = new MonitoringManagerImpl(nameOfTheRoot, description);
             monitoringManagerTable.put(nameOfTheRoot, m);
         }
         return m;
     }
+
+    public synchronized void remove(String nameOfTheRoot) {
+        monitoringManagerTable.remove(nameOfTheRoot);
+    }
 }
--- a/corba/src/share/classes/com/sun/corba/se/impl/monitoring/MonitoringManagerImpl.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/corba/src/share/classes/com/sun/corba/se/impl/monitoring/MonitoringManagerImpl.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -26,6 +26,7 @@
 package com.sun.corba.se.impl.monitoring;
 
 import com.sun.corba.se.spi.monitoring.MonitoringManager;
+import com.sun.corba.se.spi.monitoring.MonitoringManagerFactory;
 import com.sun.corba.se.spi.monitoring.MonitoredObject;
 import com.sun.corba.se.spi.monitoring.MonitoredObjectFactory;
 import com.sun.corba.se.spi.monitoring.MonitoringFactories;
@@ -33,18 +34,24 @@
 public class MonitoringManagerImpl implements MonitoringManager {
     private final MonitoredObject rootMonitoredObject;
 
-    MonitoringManagerImpl( String nameOfTheRoot, String description ) {
+    MonitoringManagerImpl(String nameOfTheRoot, String description) {
         MonitoredObjectFactory f =
             MonitoringFactories.getMonitoredObjectFactory();
         rootMonitoredObject =
-            f.createMonitoredObject( nameOfTheRoot, description );
+            f.createMonitoredObject(nameOfTheRoot, description);
+    }
+
+    public void clearState() {
+        rootMonitoredObject.clearState();
     }
 
-    public void clearState( ) {
-        rootMonitoredObject.clearState( );
+    public MonitoredObject getRootMonitoredObject() {
+        return rootMonitoredObject;
     }
 
-    public MonitoredObject getRootMonitoredObject( ) {
-        return rootMonitoredObject;
+    public void close() {
+        MonitoringManagerFactory f =
+            MonitoringFactories.getMonitoringManagerFactory();
+        f.remove(rootMonitoredObject.getName());
     }
 }
--- a/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -23,35 +23,37 @@
  * questions.
  */
 
-package com.sun.corba.se.impl.orb ;
+package com.sun.corba.se.impl.orb;
 
 import java.applet.Applet;
 
-import java.io.IOException ;
+import java.io.IOException;
 
 import java.lang.reflect.Constructor;
-import java.lang.reflect.Field ;
-import java.lang.reflect.Modifier ;
-import java.lang.reflect.InvocationTargetException ;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.lang.reflect.InvocationTargetException;
 
-import java.util.ArrayList ;
-import java.util.Iterator ;
-import java.util.Properties ;
-import java.util.Vector ;
-import java.util.Hashtable ;
-import java.util.Map ;
-import java.util.HashMap ;
-import java.util.LinkedList ;
-import java.util.Collection ;
-import java.util.Collections ;
-import java.util.StringTokenizer ;
-import java.util.Enumeration ;
-import java.util.WeakHashMap ;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Vector;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.StringTokenizer;
+import java.util.Enumeration;
+import java.util.WeakHashMap;
 
-import java.net.InetAddress ;
+import java.net.InetAddress;
 
 import java.security.PrivilegedAction;
-import java.security.AccessController ;
+import java.security.AccessController;
 
 import javax.rmi.CORBA.Util;
 import javax.rmi.CORBA.ValueHandler;
@@ -82,18 +84,18 @@
 import com.sun.org.omg.SendingContext.CodeBase;
 
 import com.sun.corba.se.pept.broker.Broker;
-import com.sun.corba.se.pept.protocol.ClientInvocationInfo ;
+import com.sun.corba.se.pept.protocol.ClientInvocationInfo;
 import com.sun.corba.se.pept.transport.ContactInfo;
 import com.sun.corba.se.pept.transport.ConnectionCache;
 import com.sun.corba.se.pept.transport.TransportManager;
 
 import com.sun.corba.se.spi.ior.IOR;
-import com.sun.corba.se.spi.ior.IdentifiableFactoryFinder ;
+import com.sun.corba.se.spi.ior.IdentifiableFactoryFinder;
 import com.sun.corba.se.spi.ior.TaggedComponentFactoryFinder;
-import com.sun.corba.se.spi.ior.IORFactories ;
-import com.sun.corba.se.spi.ior.ObjectKey ;
-import com.sun.corba.se.spi.ior.ObjectKeyFactory ;
-import com.sun.corba.se.spi.ior.iiop.IIOPFactories ;
+import com.sun.corba.se.spi.ior.IORFactories;
+import com.sun.corba.se.spi.ior.ObjectKey;
+import com.sun.corba.se.spi.ior.ObjectKeyFactory;
+import com.sun.corba.se.spi.ior.iiop.IIOPFactories;
 import com.sun.corba.se.spi.ior.iiop.GIOPVersion;
 import com.sun.corba.se.spi.oa.OAInvocationInfo;
 import com.sun.corba.se.spi.oa.ObjectAdapterFactory;
@@ -122,10 +124,10 @@
 import com.sun.corba.se.spi.transport.CorbaContactInfoListFactory;
 import com.sun.corba.se.spi.transport.CorbaTransportManager;
 import com.sun.corba.se.spi.legacy.connection.LegacyServerSocketManager;
-import com.sun.corba.se.spi.copyobject.CopierManager ;
-import com.sun.corba.se.spi.presentation.rmi.PresentationDefaults ;
-import com.sun.corba.se.spi.presentation.rmi.PresentationManager ;
-import com.sun.corba.se.spi.presentation.rmi.StubAdapter ;
+import com.sun.corba.se.spi.copyobject.CopierManager;
+import com.sun.corba.se.spi.presentation.rmi.PresentationDefaults;
+import com.sun.corba.se.spi.presentation.rmi.PresentationManager;
+import com.sun.corba.se.spi.presentation.rmi.StubAdapter;
 import com.sun.corba.se.spi.servicecontext.ServiceContextRegistry;
 
 import com.sun.corba.se.impl.corba.TypeCodeFactory;
@@ -140,6 +142,7 @@
 import com.sun.corba.se.impl.corba.RequestImpl;
 import com.sun.corba.se.impl.dynamicany.DynAnyFactoryImpl;
 import com.sun.corba.se.impl.encoding.EncapsOutputStream;
+import com.sun.corba.se.impl.encoding.CachedCodeBase;
 import com.sun.corba.se.impl.interceptors.PIHandlerImpl;
 import com.sun.corba.se.impl.interceptors.PINoOpHandlerImpl;
 import com.sun.corba.se.impl.ior.TaggedComponentFactoryFinderImpl;
@@ -185,6 +188,7 @@
 
     private java.lang.Object runObj = new java.lang.Object();
     private java.lang.Object shutdownObj = new java.lang.Object();
+    private java.lang.Object waitForCompletionObj = new java.lang.Object();
     private static final byte STATUS_OPERATING = 1;
     private static final byte STATUS_SHUTTING_DOWN = 2;
     private static final byte STATUS_SHUTDOWN = 3;
@@ -193,6 +197,7 @@
 
     // XXX Should we move invocation tracking to the first level server dispatcher?
     private java.lang.Object invocationObj = new java.lang.Object();
+    private int numInvocations = 0;
 
     // thread local variable to store a boolean to detect deadlock in
     // ORB.shutdown(true).
@@ -220,8 +225,6 @@
 
     private int transientServerId ;
 
-    private ThreadGroup threadGroup ;
-
     private ServiceContextRegistry serviceContextRegistry ;
 
     // Needed here to implement connect/disconnect
@@ -265,6 +268,7 @@
     private final Object urlOperationLock = new java.lang.Object() ;
 
     private CorbaServerRequestDispatcher insNamingDelegate ;
+
     // resolverLock must be used for all access to either resolver or
     // localResolver, since it is possible for the resolver to indirectly
     // refer to the localResolver.  Also used to protect access to
@@ -279,6 +283,8 @@
 
     private ObjectKeyFactory objectKeyFactory ;
 
+    private boolean orbOwnsThreadPoolManager = false ;
+
     private ThreadPoolManager threadpoolMgr;
 
     private void dprint( String msg )
@@ -322,11 +328,17 @@
 
     public ORBVersion getORBVersion()
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         return (ORBVersion)(orbVersionThreadLocal.get()) ;
     }
 
     public void setORBVersion(ORBVersion verObj)
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         orbVersionThreadLocal.set(verObj);
     }
 
@@ -347,46 +359,6 @@
         // end of this method.
         pihandler = new PINoOpHandlerImpl( );
 
-        // See bugs 4916766 and 4936203
-        // We intend to create new threads in a reliable thread group.
-        // This avoids problems if the application/applet
-        // creates a thread group, makes JavaIDL calls which create a new
-        // connection and ReaderThread, and then destroys the thread
-        // group. If our ReaderThreads were to be part of such destroyed thread
-        // group then it might get killed and cause other invoking threads
-        // sharing the same connection to get a non-restartable
-        // CommunicationFailure. We'd like to avoid that.
-        //
-        // Our solution is to create all of our threads in the highest thread
-        // group that we have access to, given our own security clearance.
-        //
-        try {
-            // try to get a thread group that's as high in the threadgroup
-            // parent-child hierarchy, as we can get to.
-            // this will prevent an ORB thread created during applet-init from
-            // being killed when an applet dies.
-            threadGroup = (ThreadGroup) AccessController.doPrivileged(
-                new PrivilegedAction() {
-                    public Object run() {
-                        ThreadGroup tg = Thread.currentThread().getThreadGroup() ;
-                        ThreadGroup ptg = tg ;
-                        try {
-                            while (ptg != null) {
-                                tg = ptg;
-                                ptg = tg.getParent();
-                            }
-                        } catch (SecurityException se) {
-                            // Discontinue going higher on a security exception.
-                        }
-                        return new ThreadGroup(tg, "ORB ThreadGroup");
-                    }
-                }
-            );
-        } catch (SecurityException e) {
-            // something wrong, we go back to the original code
-            threadGroup = Thread.currentThread().getThreadGroup();
-        }
-
         // This is the unique id of this server (JVM). Multiple incarnations
         // of this server will get different ids.
         // Compute transientServerId = milliseconds since Jan 1, 1970
@@ -547,6 +519,9 @@
 
     public void set_parameters( Properties props )
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         preInit( null, props ) ;
         DataCollector dataCollector =
             DataCollectorFactory.create( props, getLocalHostName() ) ;
@@ -788,6 +763,9 @@
      */
     public void notifyORB()
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         synchronized (this.svResponseReceived) {
             this.svResponseReceived.set();
             this.svResponseReceived.notify();
@@ -854,6 +832,8 @@
     // Note that we connect this if we have not already done so.
     public synchronized IOR getFVDCodeBaseIOR()
     {
+        checkShutdownState();
+
         if (codeBaseIOR != null) // i.e. We are already connected to it
             return codeBaseIOR;
 
@@ -1118,6 +1098,8 @@
 
     public synchronized void setTypeCodeForClass(Class c, TypeCodeImpl tci)
     {
+        checkShutdownState();
+
         if (typeCodeForClassMap == null)
             typeCodeForClassMap = Collections.synchronizedMap(
                 new WeakHashMap(64));
@@ -1128,6 +1110,8 @@
 
     public synchronized TypeCodeImpl getTypeCodeForClass(Class c)
     {
+        checkShutdownState();
+
         if (typeCodeForClassMap == null)
             return null;
         return (TypeCodeImpl)typeCodeForClassMap.get(c);
@@ -1210,6 +1194,10 @@
     {
         CorbaServerRequestDispatcher insnd ;
 
+        synchronized (this) {
+            checkShutdownState();
+        }
+
         if ((id == null) || (id.length() == 0))
             throw new InvalidName() ;
 
@@ -1253,66 +1241,88 @@
         }
     }
 
-    public void shutdown(boolean wait_for_completion)
-    {
-        // to wait for completion, we would deadlock, so throw a standard
-        // OMG exception.
-        if (wait_for_completion && ((Boolean)isProcessingInvocation.get()).booleanValue()) {
-            throw omgWrapper.shutdownWaitForCompletionDeadlock() ;
-        }
-
-        boolean doShutdown = false ;
+    public void shutdown(boolean wait_for_completion) {
+        boolean wait = false;
 
         synchronized (this) {
-            checkShutdownState() ;
+            checkShutdownState();
+
+            // This is to avoid deadlock: don't allow a thread that is
+            // processing a request to call shutdown( true ), because
+            // the shutdown would block waiting for the request to complete,
+            // while the request would block waiting for shutdown to complete.
+            if (wait_for_completion &&
+                isProcessingInvocation.get() == Boolean.TRUE) {
+                throw omgWrapper.shutdownWaitForCompletionDeadlock();
+            }
 
             if (status == STATUS_SHUTTING_DOWN) {
-                if (!wait_for_completion)
-                // If we are already shutting down and don't want
-                // to wait, nothing to do: return.
-                return ;
-            } else {
-                // The ORB status was STATUS_OPERATING, so start the shutdown.
-                status = STATUS_SHUTTING_DOWN ;
-                doShutdown = true ;
+                if (wait_for_completion) {
+                    wait = true;
+                } else {
+                    return;
+                }
             }
+
+            status = STATUS_SHUTTING_DOWN;
         }
 
-        // At this point, status is SHUTTING_DOWN.
-        // All shutdown calls with wait_for_completion == true must synchronize
-        // here.  Only the first call will be made with doShutdown == true.
+        // Avoid more than one thread performing shutdown at a time.
         synchronized (shutdownObj) {
-            if (doShutdown) {
-                // shutdownServants will set all POAManagers into the
-                // INACTIVE state, causing request to be rejected.
-                // If wait_for_completion is true, this will not return until
-                // all invocations have completed.
+            // At this point, the ORB status is certainly STATUS_SHUTTING_DOWN.
+            // If wait is true, another thread already called shutdown( true ),
+            // and so we wait for completion
+            if (wait) {
+                while (true) {
+                    synchronized (this) {
+                        if (status == STATUS_SHUTDOWN)
+                            break;
+                    }
+
+                    try {
+                        shutdownObj.wait();
+                    } catch (InterruptedException exc) {
+                        // NOP: just loop and wait until state is changed
+                    }
+                }
+            } else {
+                // perform the actual shutdown
                 shutdownServants(wait_for_completion);
 
+                if (wait_for_completion) {
+                    synchronized ( waitForCompletionObj ) {
+                        while (numInvocations > 0) {
+                            try {
+                                waitForCompletionObj.wait();
+                            } catch (InterruptedException ex) {}
+                        }
+                    }
+                }
+
                 synchronized (runObj) {
                     runObj.notifyAll();
                 }
 
-                synchronized (this) {
-                    status = STATUS_SHUTDOWN;
-                }
+                status = STATUS_SHUTDOWN;
+
+                shutdownObj.notifyAll();
             }
         }
     }
 
-    /** This method shuts down the ORB and causes orb.run() to return.
-     *  It will cause all POAManagers to be deactivated, which in turn
-     *  will cause all POAs to be deactivated.
-     */
+    // Cause all ObjectAdapaterFactories to clean up all of their internal state, which
+    // may include activated objects that have associated state and callbacks that must
+    // complete in order to shutdown.  This will cause new request to be rejected.
     protected void shutdownServants(boolean wait_for_completion) {
-        Iterator iter = requestDispatcherRegistry.getObjectAdapterFactories().iterator() ;
-        while (iter.hasNext()) {
-            ObjectAdapterFactory oaf = (ObjectAdapterFactory)iter.next() ;
-            oaf.shutdown( wait_for_completion ) ;
+        Set<ObjectAdapterFactory> oaset;
+        synchronized (this) {
+            oaset = new HashSet<>(requestDispatcherRegistry.getObjectAdapterFactories());
         }
+
+        for (ObjectAdapterFactory oaf : oaset)
+            oaf.shutdown(wait_for_completion);
     }
 
-    // REVISIT: was protected - made public for framework
     // Note that the caller must hold the ORBImpl lock.
     public void checkShutdownState()
     {
@@ -1327,21 +1337,40 @@
 
     public boolean isDuringDispatch()
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         Boolean value = (Boolean)(isProcessingInvocation.get()) ;
         return value.booleanValue() ;
     }
 
     public void startingDispatch()
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         synchronized (invocationObj) {
             isProcessingInvocation.set(Boolean.TRUE);
+            numInvocations++;
         }
     }
 
     public void finishedDispatch()
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         synchronized (invocationObj) {
-            isProcessingInvocation.set(Boolean.FALSE);
+            numInvocations--;
+            isProcessingInvocation.set(false);
+            if (numInvocations == 0) {
+                synchronized (waitForCompletionObj) {
+                    waitForCompletionObj.notifyAll();
+                }
+            } else if (numInvocations < 0) {
+                throw wrapper.numInvocationsAlreadyZero(
+                    CompletionStatus.COMPLETED_YES);
+            }
         }
     }
 
@@ -1350,12 +1379,12 @@
      *  not been shut down, it will start the shutdown process and block until
      *  the ORB has shut down before it destroys the ORB."
      */
-    public synchronized void destroy()
+    public void destroy()
     {
-        boolean shutdownFirst = false ;
+        boolean shutdownFirst = false;
 
         synchronized (this) {
-            shutdownFirst = (status == STATUS_OPERATING) ;
+            shutdownFirst = (status == STATUS_OPERATING);
         }
 
         if (shutdownFirst) {
@@ -1365,11 +1394,76 @@
         synchronized (this) {
             if (status < STATUS_DESTROYED) {
                 getCorbaTransportManager().close();
-                getPIHandler().destroyInterceptors() ;
+                getPIHandler().destroyInterceptors();
                 status = STATUS_DESTROYED;
             }
         }
+        synchronized (threadPoolManagerAccessLock) {
+            if (orbOwnsThreadPoolManager) {
+                try {
+                    threadpoolMgr.close();
+                    threadpoolMgr = null;
+                } catch (IOException exc) {
+                    wrapper.ioExceptionOnClose(exc);
+                }
+            }
+        }
 
+        try {
+            monitoringManager.close();
+            monitoringManager = null;
+        } catch (IOException exc) {
+            wrapper.ioExceptionOnClose(exc);
+        }
+
+        CachedCodeBase.cleanCache(this);
+        try {
+            pihandler.close();
+        } catch (IOException exc) {
+            wrapper.ioExceptionOnClose(exc);
+        }
+
+        super.destroy();
+
+        badServerIdHandlerAccessLock = null;
+        clientDelegateFactoryAccessorLock = null;
+        corbaContactInfoListFactoryAccessLock = null;
+
+        objectKeyFactoryAccessLock = null;
+        legacyServerSocketManagerAccessLock = null;
+        threadPoolManagerAccessLock = null;
+        transportManager = null;
+        legacyServerSocketManager = null;
+        OAInvocationInfoStack  = null;
+        clientInvocationInfoStack  = null;
+        codeBaseIOR = null;
+        dynamicRequests  = null;
+        svResponseReceived  = null;
+        runObj = null;
+        shutdownObj = null;
+        waitForCompletionObj = null;
+        invocationObj = null;
+        isProcessingInvocation = null;
+        typeCodeForClassMap  = null;
+        valueFactoryCache = null;
+        orbVersionThreadLocal = null;
+        requestDispatcherRegistry = null;
+        copierManager = null;
+        toaFactory = null;
+        poaFactory = null;
+        pihandler = null;
+        configData = null;
+        badServerIdHandler = null;
+        clientDelegateFactory = null;
+        corbaContactInfoListFactory = null;
+        resolver = null;
+        localResolver = null;
+        insNamingDelegate = null;
+        urlOperation = null;
+        taggedComponentFactoryFinder = null;
+        taggedProfileFactoryFinder = null;
+        taggedProfileTemplateFactoryFinder = null;
+        objectKeyFactory = null;
     }
 
     /**
@@ -1434,18 +1528,27 @@
 
     public OAInvocationInfo peekInvocationInfo()
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         StackImpl stack = (StackImpl)(OAInvocationInfoStack.get()) ;
         return (OAInvocationInfo)(stack.peek()) ;
     }
 
     public void pushInvocationInfo( OAInvocationInfo info )
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         StackImpl stack = (StackImpl)(OAInvocationInfoStack.get()) ;
         stack.push( info ) ;
     }
 
     public OAInvocationInfo popInvocationInfo()
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         StackImpl stack = (StackImpl)(OAInvocationInfoStack.get()) ;
         return (OAInvocationInfo)(stack.pop()) ;
     }
@@ -1459,6 +1562,9 @@
 
     public void initBadServerIdHandler()
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         synchronized (badServerIdHandlerAccessLock) {
             Class cls = configData.getBadServerIdHandler() ;
             if (cls != null) {
@@ -1477,6 +1583,9 @@
 
     public void setBadServerIdHandler( BadServerIdHandler handler )
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         synchronized (badServerIdHandlerAccessLock) {
             badServerIdHandler = handler;
         }
@@ -1484,6 +1593,9 @@
 
     public void handleBadServerId( ObjectKey okey )
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         synchronized (badServerIdHandlerAccessLock) {
             if (badServerIdHandler == null)
                 throw wrapper.badServerId() ;
@@ -1532,6 +1644,9 @@
 
     public int getTransientServerId()
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         if( configData.getORBServerIdPropertySpecified( ) ) {
             // ORBServerId is specified then use that value
             return configData.getPersistentServerId( );
@@ -1541,11 +1656,17 @@
 
     public RequestDispatcherRegistry getRequestDispatcherRegistry()
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         return requestDispatcherRegistry;
     }
 
     public ServiceContextRegistry getServiceContextRegistry()
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         return serviceContextRegistry ;
     }
 
@@ -1563,12 +1684,18 @@
     // XXX What about multi-homed host?
     public boolean isLocalHost( String hostName )
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         return hostName.equals( configData.getORBServerHost() ) ||
             hostName.equals( getLocalHostName() ) ;
     }
 
     public boolean isLocalServerId( int subcontractId, int serverId )
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         if ((subcontractId < ORBConstants.FIRST_POA_SCID) ||
             (subcontractId > ORBConstants.MAX_POA_SCID))
             return serverId == getTransientServerId( ) ;
@@ -1659,6 +1786,9 @@
 
     public ClientInvocationInfo createOrIncrementInvocationInfo()
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         StackImpl invocationInfoStack =
             (StackImpl) clientInvocationInfoStack.get();
         ClientInvocationInfo clientInvocationInfo = null;
@@ -1682,10 +1812,13 @@
 
     public void releaseOrDecrementInvocationInfo()
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
+        int entryCount = -1;
+        ClientInvocationInfo clientInvocationInfo = null;
         StackImpl invocationInfoStack =
             (StackImpl)clientInvocationInfoStack.get();
-        int entryCount = -1;
-        ClientInvocationInfo clientInvocationInfo = null;
         if (!invocationInfoStack.empty()) {
             clientInvocationInfo =
                 (ClientInvocationInfo)invocationInfoStack.peek();
@@ -1705,6 +1838,9 @@
 
     public ClientInvocationInfo getInvocationInfo()
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         StackImpl invocationInfoStack =
             (StackImpl) clientInvocationInfoStack.get();
         return (ClientInvocationInfo) invocationInfoStack.peek();
@@ -1719,6 +1855,9 @@
 
     public void setClientDelegateFactory( ClientDelegateFactory factory )
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         synchronized (clientDelegateFactoryAccessorLock) {
             clientDelegateFactory = factory ;
         }
@@ -1726,6 +1865,9 @@
 
     public ClientDelegateFactory getClientDelegateFactory()
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         synchronized (clientDelegateFactoryAccessorLock) {
             return clientDelegateFactory ;
         }
@@ -1735,6 +1877,9 @@
 
     public void setCorbaContactInfoListFactory( CorbaContactInfoListFactory factory )
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         synchronized (corbaContactInfoListFactoryAccessLock) {
             corbaContactInfoListFactory = factory ;
         }
@@ -1742,6 +1887,7 @@
 
     public synchronized CorbaContactInfoListFactory getCorbaContactInfoListFactory()
     {
+        checkShutdownState();
         return corbaContactInfoListFactory ;
     }
 
@@ -1750,6 +1896,9 @@
      */
     public void setResolver( Resolver resolver )
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         synchronized (resolverLock) {
             this.resolver = resolver ;
         }
@@ -1760,6 +1909,9 @@
      */
     public Resolver getResolver()
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         synchronized (resolverLock) {
             return resolver ;
         }
@@ -1770,6 +1922,9 @@
      */
     public void setLocalResolver( LocalResolver resolver )
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         synchronized (resolverLock) {
             this.localResolver = resolver ;
         }
@@ -1780,6 +1935,9 @@
      */
     public LocalResolver getLocalResolver()
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         synchronized (resolverLock) {
             return localResolver ;
         }
@@ -1790,6 +1948,9 @@
      */
     public void setURLOperation( Operation stringToObject )
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         synchronized (urlOperationLock) {
             urlOperation = stringToObject ;
         }
@@ -1800,6 +1961,9 @@
      */
     public Operation getURLOperation()
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         synchronized (urlOperationLock) {
             return urlOperation ;
         }
@@ -1807,6 +1971,9 @@
 
     public void setINSDelegate( CorbaServerRequestDispatcher sdel )
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         synchronized (resolverLock) {
             insNamingDelegate = sdel ;
         }
@@ -1814,16 +1981,25 @@
 
     public TaggedComponentFactoryFinder getTaggedComponentFactoryFinder()
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         return taggedComponentFactoryFinder ;
     }
 
     public IdentifiableFactoryFinder getTaggedProfileFactoryFinder()
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         return taggedProfileFactoryFinder ;
     }
 
     public IdentifiableFactoryFinder getTaggedProfileTemplateFactoryFinder()
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         return taggedProfileTemplateFactoryFinder ;
     }
 
@@ -1831,6 +2007,9 @@
 
     public ObjectKeyFactory getObjectKeyFactory()
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         synchronized (objectKeyFactoryAccessLock) {
             return objectKeyFactory ;
         }
@@ -1838,6 +2017,9 @@
 
     public void setObjectKeyFactory( ObjectKeyFactory factory )
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         synchronized (objectKeyFactoryAccessLock) {
             objectKeyFactory = factory ;
         }
@@ -1864,6 +2046,9 @@
 
     public LegacyServerSocketManager getLegacyServerSocketManager()
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         synchronized (legacyServerSocketManagerAccessLock) {
             if (legacyServerSocketManager == null) {
                 legacyServerSocketManager = new LegacyServerSocketManagerImpl(this);
@@ -1876,6 +2061,9 @@
 
     public void setThreadPoolManager(ThreadPoolManager mgr)
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         synchronized (threadPoolManagerAccessLock) {
             threadpoolMgr = mgr;
         }
@@ -1883,9 +2071,13 @@
 
     public ThreadPoolManager getThreadPoolManager()
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         synchronized (threadPoolManagerAccessLock) {
             if (threadpoolMgr == null) {
-                threadpoolMgr = new ThreadPoolManagerImpl( threadGroup );
+                threadpoolMgr = new ThreadPoolManagerImpl();
+                orbOwnsThreadPoolManager = true;
             }
             return threadpoolMgr;
         }
@@ -1893,6 +2085,9 @@
 
     public CopierManager getCopierManager()
     {
+        synchronized (this) {
+                checkShutdownState();
+        }
         return copierManager ;
     }
 } // Class ORBImpl
--- a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/threadpool/ThreadPoolImpl.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/corba/src/share/classes/com/sun/corba/se/impl/orbutil/threadpool/ThreadPoolImpl.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -25,6 +25,18 @@
 
 package com.sun.corba.se.impl.orbutil.threadpool;
 
+import java.io.IOException;
+import java.io.Closeable;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+import java.util.List;
+import java.util.ArrayList;
+
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
+
 import com.sun.corba.se.spi.orbutil.threadpool.NoSuchWorkQueueException;
 import com.sun.corba.se.spi.orbutil.threadpool.ThreadPool;
 import com.sun.corba.se.spi.orbutil.threadpool.Work;
@@ -36,12 +48,27 @@
 import com.sun.corba.se.spi.monitoring.MonitoringConstants;
 import com.sun.corba.se.spi.monitoring.MonitoredObject;
 import com.sun.corba.se.spi.monitoring.MonitoringFactories;
+import com.sun.corba.se.spi.orb.ORB;
 import com.sun.corba.se.spi.monitoring.LongMonitoredAttributeBase;
 
+import com.sun.corba.se.impl.logging.ORBUtilSystemException;
+import com.sun.corba.se.impl.orbutil.ORBConstants;
+import com.sun.corba.se.spi.logging.CORBALogDomains;
+
 public class ThreadPoolImpl implements ThreadPool
 {
-    private static int threadCounter = 0; // serial counter useful for debugging
+    // serial counter useful for debugging
+    private static AtomicInteger threadCounter = new AtomicInteger(0);
+    private static final ORBUtilSystemException wrapper =
+        ORBUtilSystemException.get(CORBALogDomains.RPC_TRANSPORT);
+
 
+    // Any time currentThreadCount and/or availableWorkerThreads is updated
+    // or accessed this ThreadPool's WorkQueue must be locked. And, it is
+    // expected that this ThreadPool's WorkQueue is the only object that
+    // updates and accesses these values directly and indirectly though a
+    // call to a method in this ThreadPool. If any call to update or access
+    // those values must synchronized on this ThreadPool's WorkQueue.
     private WorkQueue workQueue;
 
     // Stores the number of available worker threads
@@ -65,14 +92,11 @@
     // Running count of the work items processed
     // Set the value to 1 so that divide by zero is avoided in
     // averageWorkCompletionTime()
-    private long processedCount = 1;
+    private AtomicLong processedCount = new AtomicLong(1);
 
     // Running aggregate of the time taken in millis to execute work items
     // processed by the threads in the threadpool
-    private long totalTimeTaken = 0;
-
-    // Lock for protecting state when required
-    private Object lock = new Object();
+    private AtomicLong totalTimeTaken = new AtomicLong(0);
 
     // Name of the ThreadPool
     private String name;
@@ -81,7 +105,10 @@
     private MonitoredObject threadpoolMonitoredObject;
 
     // ThreadGroup in which threads should be created
-    private ThreadGroup threadGroup ;
+    private ThreadGroup threadGroup;
+
+    Object workersLock = new Object();
+    List<WorkerThread> workers = new ArrayList<>();
 
     /**
      * This constructor is used to create an unbounded threadpool
@@ -90,7 +117,7 @@
         inactivityTimeout = ORBConstants.DEFAULT_INACTIVITY_TIMEOUT;
         maxWorkerThreads = Integer.MAX_VALUE;
         workQueue = new WorkQueueImpl(this);
-        threadGroup = tg ;
+        threadGroup = tg;
         name = threadpoolName;
         initializeMonitoring();
     }
@@ -121,6 +148,30 @@
         initializeMonitoring();
     }
 
+    // Note that this method should not return until AFTER all threads have died.
+    public void close() throws IOException {
+
+        // Copy to avoid concurrent modification problems.
+        List<WorkerThread> copy = null;
+        synchronized (workersLock) {
+            copy = new ArrayList<>(workers);
+        }
+
+        for (WorkerThread wt : copy) {
+            wt.close();
+            while (wt.getState() != Thread.State.TERMINATED) {
+                try {
+                    wt.join();
+                } catch (InterruptedException exc) {
+                    wrapper.interruptedJoinCallWhileClosingThreadPool(exc, wt, this);
+                }
+            }
+        }
+
+        threadGroup = null;
+    }
+
+
     // Setup monitoring for this threadpool
     private void initializeMonitoring() {
         // Get root monitored object
@@ -217,8 +268,8 @@
      * or notify waiting threads on the queue for available work
      */
     void notifyForAvailableWork(WorkQueue aWorkQueue) {
-        synchronized (lock) {
-            if (availableWorkerThreads == 0) {
+        synchronized (aWorkQueue) {
+            if (availableWorkerThreads < aWorkQueue.workItemsInQueue()) {
                 createWorkerThread();
             } else {
                 aWorkQueue.notify();
@@ -227,120 +278,145 @@
     }
 
 
+    private Thread createWorkerThreadHelper( String name ) {
+        // Thread creation needs to be in a doPrivileged block
+        // if there is a non-null security manager for two reasons:
+        // 1. The creation of a thread in a specific ThreadGroup
+        //    is a privileged operation.  Lack of a doPrivileged
+        //    block here causes an AccessControlException
+        //    (see bug 6268145).
+        // 2. We want to make sure that the permissions associated
+        //    with this thread do NOT include the permissions of
+        //    the current thread that is calling this method.
+        //    This leads to problems in the app server where
+        //    some threads in the ThreadPool randomly get
+        //    bad permissions, leading to unpredictable
+        //    permission errors (see bug 6021011).
+        //
+        //    A Java thread contains a stack of call frames,
+        //    one for each method called that has not yet returned.
+        //    Each method comes from a particular class.  The class
+        //    was loaded by a ClassLoader which has an associated
+        //    CodeSource, and this determines the Permissions
+        //    for all methods in that class.  The current
+        //    Permissions for the thread are the intersection of
+        //    all Permissions for the methods on the stack.
+        //    This is part of the Security Context of the thread.
+        //
+        //    When a thread creates a new thread, the new thread
+        //    inherits the security context of the old thread.
+        //    This is bad in a ThreadPool, because different
+        //    creators of threads may have different security contexts.
+        //    This leads to occasional unpredictable errors when
+        //    a thread is re-used in a different security context.
+        //
+        //    Avoiding this problem is simple: just do the thread
+        //    creation in a doPrivileged block.  This sets the
+        //    inherited security context to that of the code source
+        //    for the ORB code itself, which contains all permissions
+        //    in either Java SE or Java EE.
+        WorkerThread thread = new WorkerThread(threadGroup, name);
+        synchronized (workersLock) {
+            workers.add(thread);
+        }
+
+        // The thread must be set to a daemon thread so the
+        // VM can exit if the only threads left are PooledThreads
+        // or other daemons.  We don't want to rely on the
+        // calling thread always being a daemon.
+        // Note that no exception is possible here since we
+        // are inside the doPrivileged block.
+        thread.setDaemon(true);
+
+        wrapper.workerThreadCreated(thread, thread.getContextClassLoader());
+
+        thread.start();
+        return null;
+    }
+
+
     /**
      * To be called from the workqueue to create worker threads when none
      * available.
      */
     void createWorkerThread() {
-        WorkerThread thread;
-
-        synchronized (lock) {
-            if (boundedThreadPool) {
-                if (currentThreadCount < maxWorkerThreads) {
-                    thread = new WorkerThread(threadGroup, getName());
-                    currentThreadCount++;
+        final String name = getName();
+        synchronized (workQueue) {
+            try {
+                if (System.getSecurityManager() == null) {
+                    createWorkerThreadHelper(name);
                 } else {
-                    // REVIST - Need to create a thread to monitor the
-                    // the state for deadlock i.e. all threads waiting for
-                    // something which can be got from the item in the
-                    // workqueue, but there is no thread available to
-                    // process that work item - DEADLOCK !!
-                    return;
+                    // If we get here, we need to create a thread.
+                    AccessController.doPrivileged(
+                            new PrivilegedAction() {
+                        public Object run() {
+                            return createWorkerThreadHelper(name);
+                        }
+                    }
+                    );
                 }
-            } else {
-                thread = new WorkerThread(threadGroup, getName());
-                currentThreadCount++;
+            } catch (Throwable t) {
+                // Decrementing the count of current worker threads.
+                // But, it will be increased in the finally block.
+                decrementCurrentNumberOfThreads();
+                wrapper.workerThreadCreationFailure(t);
+            } finally {
+                incrementCurrentNumberOfThreads();
             }
         }
-
-        // The thread must be set to a daemon thread so the
-        // VM can exit if the only threads left are PooledThreads
-        // or other daemons.  We don't want to rely on the
-        // calling thread always being a daemon.
-
-        // Catch exceptions since setDaemon can cause a
-        // security exception to be thrown under netscape
-        // in the Applet mode
-        try {
-            thread.setDaemon(true);
-        } catch (Exception e) {
-            // REVISIT - need to do some logging here
-        }
-
-        thread.start();
     }
 
-    /**
-    * This method will return the minimum number of threads maintained
-    * by the threadpool.
-    */
     public int minimumNumberOfThreads() {
         return minWorkerThreads;
     }
 
-    /**
-    * This method will return the maximum number of threads in the
-    * threadpool at any point in time, for the life of the threadpool
-    */
     public int maximumNumberOfThreads() {
         return maxWorkerThreads;
     }
 
-    /**
-    * This method will return the time in milliseconds when idle
-    * threads in the threadpool are removed.
-    */
     public long idleTimeoutForThreads() {
         return inactivityTimeout;
     }
 
-    /**
-    * This method will return the total number of threads currently in the
-    * threadpool. This method returns a value which is not synchronized.
-    */
     public int currentNumberOfThreads() {
-        synchronized (lock) {
+        synchronized (workQueue) {
             return currentThreadCount;
         }
     }
 
-    /**
-    * This method will return the number of available threads in the
-    * threadpool which are waiting for work. This method returns a
-    * value which is not synchronized.
-    */
+    void decrementCurrentNumberOfThreads() {
+        synchronized (workQueue) {
+            currentThreadCount--;
+        }
+    }
+
+    void incrementCurrentNumberOfThreads() {
+        synchronized (workQueue) {
+            currentThreadCount++;
+        }
+    }
+
     public int numberOfAvailableThreads() {
-        synchronized (lock) {
+        synchronized (workQueue) {
             return availableWorkerThreads;
         }
     }
 
-    /**
-    * This method will return the number of busy threads in the threadpool
-    * This method returns a value which is not synchronized.
-    */
     public int numberOfBusyThreads() {
-        synchronized (lock) {
+        synchronized (workQueue) {
             return (currentThreadCount - availableWorkerThreads);
         }
     }
 
-    /**
-     * This method returns the average elapsed time taken to complete a Work
-     * item in milliseconds.
-     */
     public long averageWorkCompletionTime() {
-        synchronized (lock) {
-            return (totalTimeTaken / processedCount);
+        synchronized (workQueue) {
+            return (totalTimeTaken.get() / processedCount.get());
         }
     }
 
-    /**
-     * This method returns the number of Work items processed by the threadpool
-     */
     public long currentProcessedCount() {
-        synchronized (lock) {
-            return processedCount;
+        synchronized (workQueue) {
+            return processedCount.get();
         }
     }
 
@@ -357,15 +433,37 @@
 
 
     private static synchronized int getUniqueThreadId() {
-        return ThreadPoolImpl.threadCounter++;
+        return ThreadPoolImpl.threadCounter.incrementAndGet();
+    }
+
+    /**
+     * This method will decrement the number of available threads
+     * in the threadpool which are waiting for work. Called from
+     * WorkQueueImpl.requestWork()
+     */
+    void decrementNumberOfAvailableThreads() {
+        synchronized (workQueue) {
+            availableWorkerThreads--;
+        }
+    }
+
+    /**
+     * This method will increment the number of available threads
+     * in the threadpool which are waiting for work. Called from
+     * WorkQueueImpl.requestWork()
+     */
+    void incrementNumberOfAvailableThreads() {
+        synchronized (workQueue) {
+            availableWorkerThreads++;
+        }
     }
 
 
-    private class WorkerThread extends Thread
+    private class WorkerThread extends Thread implements Closeable
     {
         private Work currentWork;
         private int threadId = 0; // unique id for the thread
-        // thread pool this WorkerThread belongs too
+        private volatile boolean closeCalled = false;
         private String threadPoolName;
         // name seen by Thread.getName()
         private StringBuffer workerThreadName = new StringBuffer();
@@ -377,100 +475,61 @@
             setName(composeWorkerThreadName(threadPoolName, "Idle"));
         }
 
-        public void run() {
-            while (true) {
-                try {
+        public synchronized void close() {
+            closeCalled = true;
+            interrupt();
+        }
 
-                    synchronized (lock) {
-                        availableWorkerThreads++;
-                    }
+        private void resetClassLoader() {
 
-                    // Get some work to do
-                    currentWork = ((WorkQueueImpl)workQueue).requestWork(inactivityTimeout);
+        }
 
-                    synchronized (lock) {
-                        availableWorkerThreads--;
-                        // It is possible in notifyForAvailableWork that the
-                        // check for availableWorkerThreads = 0 may return
-                        // false, because the availableWorkerThreads has not been
-                        // decremented to zero before the producer thread added
-                        // work to the queue. This may create a deadlock, if the
-                        // executing thread needs information which is in the work
-                        // item queued in the workqueue, but has no thread to work
-                        // on it since none was created because availableWorkerThreads = 0
-                        // returned false.
-                        // The following code will ensure that a thread is always available
-                        // in those situations
-                        if  ((availableWorkerThreads == 0) &&
-                                (workQueue.workItemsInQueue() > 0)) {
-                            createWorkerThread();
-                        }
-                    }
+        private void performWork() {
+            long start = System.currentTimeMillis();
+            try {
+                currentWork.doWork();
+            } catch (Throwable t) {
+                wrapper.workerThreadDoWorkThrowable(this, t);
+            }
+            long elapsedTime = System.currentTimeMillis() - start;
+            totalTimeTaken.addAndGet(elapsedTime);
+            processedCount.incrementAndGet();
+        }
 
-                    // Set the thread name for debugging.
-                    setName(composeWorkerThreadName(threadPoolName,
-                                      Integer.toString(this.threadId)));
-
-                    long start = System.currentTimeMillis();
+        public void run() {
+            try  {
+                while (!closeCalled) {
+                    try {
+                        currentWork = ((WorkQueueImpl)workQueue).requestWork(
+                            inactivityTimeout);
+                        if (currentWork == null)
+                            continue;
+                    } catch (InterruptedException exc) {
+                        wrapper.workQueueThreadInterrupted( exc, getName(),
+                           Boolean.valueOf(closeCalled));
 
-                    try {
-                        // Do the work
-                        currentWork.doWork();
+                        continue ;
                     } catch (Throwable t) {
-                        // Ignore all errors.
-                        ;
+                         wrapper.workerThreadThrowableFromRequestWork(this, t,
+                                workQueue.getName());
+
+                        continue;
                     }
 
-                    long end = System.currentTimeMillis();
-
-
-                    synchronized (lock) {
-                        totalTimeTaken += (end - start);
-                        processedCount++;
-                    }
+                    performWork();
 
                     // set currentWork to null so that the work item can be
-                    // garbage collected
+                    // garbage collected without waiting for the next work item.
                     currentWork = null;
 
-                    setName(composeWorkerThreadName(threadPoolName, "Idle"));
-
-                } catch (TimeoutException e) {
-                    // This thread timed out waiting for something to do.
-
-                    synchronized (lock) {
-                        availableWorkerThreads--;
-
-                        // This should for both bounded and unbounded case
-                        if (currentThreadCount > minWorkerThreads) {
-                            currentThreadCount--;
-                            // This thread can exit.
-                            return;
-                        } else {
-                            // Go back to waiting on workQueue
-                            continue;
-                        }
-                    }
-                } catch (InterruptedException ie) {
-                    // InterruptedExceptions are
-                    // caught here.  Thus, threads can be forced out of
-                    // requestWork and so they have to reacquire the lock.
-                    // Other options include ignoring or
-                    // letting this thread die.
-                    // Ignoring for now. REVISIT
-                    synchronized (lock) {
-                        availableWorkerThreads--;
-                    }
-
-                } catch (Throwable e) {
-
-                    // Ignore any exceptions that currentWork.process
-                    // accidently lets through, but let Errors pass.
-                    // Add debugging output?  REVISIT
-                    synchronized (lock) {
-                        availableWorkerThreads--;
-                    }
-
+                    resetClassLoader();
+                }
+            } catch (Throwable e) {
+                // This should not be possible
+                wrapper.workerThreadCaughtUnexpectedThrowable(this,e);
+            } finally {
+                synchronized (workersLock) {
+                    workers.remove(this);
                 }
             }
         }
--- a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/threadpool/ThreadPoolManagerImpl.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/corba/src/share/classes/com/sun/corba/se/impl/orbutil/threadpool/ThreadPoolManagerImpl.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -25,6 +25,15 @@
 
 package com.sun.corba.se.impl.orbutil.threadpool;
 
+import java.io.IOException;
+
+import java.security.PrivilegedAction;
+import java.security.AccessController;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+import com.sun.corba.se.spi.orb.ORB;
+
 import com.sun.corba.se.spi.orbutil.threadpool.NoSuchThreadPoolException;
 import com.sun.corba.se.spi.orbutil.threadpool.ThreadPool;
 import com.sun.corba.se.spi.orbutil.threadpool.ThreadPoolManager;
@@ -33,21 +42,102 @@
 import com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl;
 import com.sun.corba.se.impl.orbutil.ORBConstants;
 
+import com.sun.corba.se.impl.logging.ORBUtilSystemException;
+import com.sun.corba.se.impl.orbutil.ORBConstants;
+import com.sun.corba.se.spi.logging.CORBALogDomains;
+
+
 public class ThreadPoolManagerImpl implements ThreadPoolManager
 {
-    private ThreadPool threadPool ;
+    private ThreadPool threadPool;
+    private ThreadGroup threadGroup;
+
+    private static final ORBUtilSystemException wrapper =
+        ORBUtilSystemException.get(CORBALogDomains.RPC_TRANSPORT);
+
+    public ThreadPoolManagerImpl() {
+        threadGroup = getThreadGroup();
+        threadPool = new ThreadPoolImpl(threadGroup,
+            ORBConstants.THREADPOOL_DEFAULT_NAME);
+    }
+
+    private static AtomicInteger tgCount = new AtomicInteger();
+
+
+    private ThreadGroup getThreadGroup() {
+        ThreadGroup tg;
 
-    public ThreadPoolManagerImpl( ThreadGroup tg )
-    {
-        // Use unbounded threadpool in J2SE ORB
-        // ThreadPoolManager from s1as appserver code base can be set in the
-        // ORB. ThreadPools in the appserver are bounded. In that situation
-        // the ThreadPool in this ThreadPoolManager will have its threads
-        // die after the idle timeout.
-        // XXX Should there be cleanup when ORB.shutdown is called if the
-        // ORB owns the ThreadPool?
-        threadPool = new ThreadPoolImpl( tg,
-            ORBConstants.THREADPOOL_DEFAULT_NAME ) ;
+        // See bugs 4916766 and 4936203
+        // We intend to create new threads in a reliable thread group.
+        // This avoids problems if the application/applet
+        // creates a thread group, makes JavaIDL calls which create a new
+        // connection and ReaderThread, and then destroys the thread
+        // group. If our ReaderThreads were to be part of such destroyed thread
+        // group then it might get killed and cause other invoking threads
+        // sharing the same connection to get a non-restartable
+        // CommunicationFailure. We'd like to avoid that.
+        //
+        // Our solution is to create all of our threads in the highest thread
+        // group that we have access to, given our own security clearance.
+        //
+        try {
+            // try to get a thread group that's as high in the threadgroup
+            // parent-child hierarchy, as we can get to.
+            // this will prevent an ORB thread created during applet-init from
+            // being killed when an applet dies.
+            tg = AccessController.doPrivileged(
+                new PrivilegedAction<ThreadGroup>() {
+                    public ThreadGroup run() {
+                        ThreadGroup tg = Thread.currentThread().getThreadGroup();
+                        ThreadGroup ptg = tg;
+                        try {
+                            while (ptg != null) {
+                                tg = ptg;
+                                ptg = tg.getParent();
+                            }
+                        } catch (SecurityException se) {
+                            // Discontinue going higher on a security exception.
+                        }
+                        return new ThreadGroup(tg, "ORB ThreadGroup " + tgCount.getAndIncrement());
+                    }
+                }
+            );
+        } catch (SecurityException e) {
+            // something wrong, we go back to the original code
+            tg = Thread.currentThread().getThreadGroup();
+        }
+
+        return tg;
+    }
+
+    public void close() {
+        try {
+            threadPool.close();
+        } catch (IOException exc) {
+            wrapper.threadPoolCloseError();
+        }
+
+        try {
+            boolean isDestroyed = threadGroup.isDestroyed();
+            int numThreads = threadGroup.activeCount();
+            int numGroups = threadGroup.activeGroupCount();
+
+            if (isDestroyed) {
+                wrapper.threadGroupIsDestroyed(threadGroup);
+            } else {
+                if (numThreads > 0)
+                    wrapper.threadGroupHasActiveThreadsInClose(threadGroup, numThreads);
+
+                if (numGroups > 0)
+                    wrapper.threadGroupHasSubGroupsInClose(threadGroup, numGroups);
+
+                threadGroup.destroy();
+            }
+        } catch (IllegalThreadStateException exc) {
+            wrapper.threadGroupDestroyFailed(exc, threadGroup);
+        }
+
+        threadGroup = null;
     }
 
     /**
--- a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/threadpool/WorkQueueImpl.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/corba/src/share/classes/com/sun/corba/se/impl/orbutil/threadpool/WorkQueueImpl.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -111,24 +111,23 @@
         return workqueueMonitoredObject;
     }
 
-    public void addWork(Work work) {
-        synchronized (this) {
+    public synchronized void addWork(Work work) {
             workItemsAdded++;
             work.setEnqueueTime(System.currentTimeMillis());
             theWorkQueue.addLast(work);
             ((ThreadPoolImpl)workerThreadPool).notifyForAvailableWork(this);
-        }
     }
 
-    Work requestWork(long waitTime)
-        throws TimeoutException, InterruptedException
+    synchronized Work requestWork(long waitTime) throws TimeoutException, InterruptedException
     {
         Work workItem;
-        synchronized (this) {
+        ((ThreadPoolImpl)workerThreadPool).incrementNumberOfAvailableThreads();
+
             if (theWorkQueue.size() != 0) {
                 workItem = (Work)theWorkQueue.removeFirst();
                 totalTimeInQueue += System.currentTimeMillis() - workItem.getEnqueueTime();
                 workItemsDequeued++;
+                ((ThreadPoolImpl)workerThreadPool).decrementNumberOfAvailableThreads();
                 return workItem;
             }
 
@@ -145,6 +144,7 @@
                         workItem = (Work)theWorkQueue.removeFirst();
                         totalTimeInQueue += System.currentTimeMillis() - workItem.getEnqueueTime();
                         workItemsDequeued++;
+                        ((ThreadPoolImpl)workerThreadPool).decrementNumberOfAvailableThreads();
                         return workItem;
                     }
 
@@ -152,12 +152,13 @@
 
                 } while (remainingWaitTime > 0);
 
+                ((ThreadPoolImpl)workerThreadPool).decrementNumberOfAvailableThreads();
                 throw new TimeoutException();
 
             } catch (InterruptedException ie) {
+                ((ThreadPoolImpl)workerThreadPool).decrementNumberOfAvailableThreads();
                 throw ie;
             }
-        }
     }
 
     public void setThreadPool(ThreadPool workerThreadPool) {
--- a/corba/src/share/classes/com/sun/corba/se/impl/protocol/CorbaMessageMediatorImpl.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/corba/src/share/classes/com/sun/corba/se/impl/protocol/CorbaMessageMediatorImpl.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -1666,7 +1666,9 @@
         ((CDRInputObject)messageMediator.getInputObject()).unmarshalHeader();
 
         ORB orb = (ORB)messageMediator.getBroker();
-        orb.checkShutdownState();
+        synchronized (orb) {
+            orb.checkShutdownState();
+        }
 
         ObjectKey okey = messageMediator.getObjectKey();
         if (orb.subcontractDebugFlag) {
--- a/corba/src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/corba/src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -69,8 +69,8 @@
     private HashMap listenerThreads;
     private Map readerThreads;
     private boolean selectorStarted;
-    private boolean closed;
-    private ORBUtilSystemException wrapper ;
+    private volatile boolean closed;
+    private ORBUtilSystemException wrapper;
 
 
     public SelectorImpl(ORB orb)
--- a/corba/src/share/classes/com/sun/corba/se/spi/logging/data/ORBUtil.mc	Wed Jul 05 18:15:28 2017 +0200
+++ b/corba/src/share/classes/com/sun/corba/se/spi/logging/data/ORBUtil.mc	Wed Jul 05 18:16:12 2017 +0200
@@ -1,6 +1,6 @@
 ;
 
-; Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+; Copyright (c) 2003, 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
@@ -62,6 +62,7 @@
 	    (IS_LOCAL_REQUIRES_STUB 43 WARNING "Call to StubAdapter.isLocal did not pass a stub")
 	    (REQUEST_REQUIRES_STUB 44 WARNING "Call to StubAdapter.request did not pass a stub")
 	    (BAD_ACTIVATE_TIE_CALL 45 WARNING "Call to StubAdapter.activateTie did not pass a valid Tie")
+            (IO_EXCEPTION_ON_CLOSE 46 FINE "Useless exception on call to Closeable.close()")
 	    )
 	(BAD_PARAM
 	    (NULL_PARAM 1 WARNING "Null parameter")
@@ -291,7 +292,31 @@
 	    (JAVA_STREAM_INIT_FAILED 95 WARNING "Java stream initialization failed")
 	    (DUPLICATE_ORB_VERSION_SERVICE_CONTEXT 96 WARNING "An ORBVersionServiceContext was already in the service context list")
 	    (DUPLICATE_SENDING_CONTEXT_SERVICE_CONTEXT 97 WARNING "A SendingContextServiceContext was already in the service context list")
+            (WORK_QUEUE_THREAD_INTERRUPTED 98 FINE "Worker Thread from thread pool {0} was interrupted: closeCalled is {1}.")
+            (WORKER_THREAD_CREATED
+             104 FINE "Worker thread {0} has been created with ClassLoader {1}")
+            (WORKER_THREAD_THROWABLE_FROM_REQUEST_WORK
+             109 FINE "Worker thread {0} caught throwable {1} when requesting work from work queue {2}.")
+            (WORKER_THREAD_NOT_NEEDED
+             110 FINE "Worker thread {0} will exit; current thread count, {1}, greater than minunum worker threads needed, {2}.")
+            (WORKER_THREAD_DO_WORK_THROWABLE
+             111 FINE "Worker thread {0} caught throwable {1} while executing work.")
+            (WORKER_THREAD_CAUGHT_UNEXPECTED_THROWABLE
+             112 WARNING "Worker thread {0} caught unexpected throwable {1}.")
+            (WORKER_THREAD_CREATION_FAILURE
+             113 SEVERE "Worker thread creation failure; cause {0}.")
+            (WORKER_THREAD_SET_NAME_FAILURE
+             114 WARNING "Unable to set worker thread {0} name to {1}; cause {2}.")
+            (WORK_QUEUE_REQUEST_WORK_NO_WORK_FOUND
+             116 WARNING "Ignoring unexpected {0} when retrieving of work from work queue, {1}.")
+            (THREAD_POOL_CLOSE_ERROR 126 WARNING "Error in closing ThreadPool")
+            (THREAD_GROUP_IS_DESTROYED 127 WARNING "ThreadGroup {0} is already destroyed: can't destroy it")
+            (THREAD_GROUP_HAS_ACTIVE_THREADS_IN_CLOSE 128 WARNING "ThreadGroup {0} has {1} active threads: destroy may cause exception")
+            (THREAD_GROUP_HAS_SUB_GROUPS_IN_CLOSE 129 WARNING "ThreadGroup {0} has {1} sub-thread groups: destroy may cause exception")
+            (THREAD_GROUP_DESTROY_FAILED 130 WARNING "ThreadGroup {0} could not be destroyed")
+            (INTERRUPTED_JOIN_CALL_WHILE_CLOSING_THREAD_POOL 131 WARNING "Join was interrupted on thread {0} while closing ThreadPool {1}")
 	    )
+
 	(MARSHAL 
 	    (CHUNK_OVERFLOW 1 WARNING "Data read past end of chunk without closing the chunk")
 	    (UNEXPECTED_EOF 2 WARNING "Grow buffer strategy called underflow handler")
--- a/corba/src/share/classes/com/sun/corba/se/spi/monitoring/MonitoringManager.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/corba/src/share/classes/com/sun/corba/se/spi/monitoring/MonitoringManager.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -24,6 +24,7 @@
  */
 package com.sun.corba.se.spi.monitoring;
 
+import java.io.Closeable;
 import com.sun.corba.se.spi.orb.ORB;
 import com.sun.corba.se.spi.monitoring.MonitoredObject;
 import java.util.*;
@@ -39,7 +40,7 @@
  * @author Hemanth Puttaswamy
  * </p>
  */
-public interface MonitoringManager {
+public interface MonitoringManager extends Closeable {
 
   ///////////////////////////////////////
   // operations
--- a/corba/src/share/classes/com/sun/corba/se/spi/monitoring/MonitoringManagerFactory.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/corba/src/share/classes/com/sun/corba/se/spi/monitoring/MonitoringManagerFactory.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -40,4 +40,6 @@
      */
     MonitoringManager createMonitoringManager( String nameOfTheRoot,
         String description );
+
+    void remove(String nameOfTheRoot);
 }
--- a/corba/src/share/classes/com/sun/corba/se/spi/orb/ORB.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/corba/src/share/classes/com/sun/corba/se/spi/orb/ORB.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -171,7 +171,7 @@
 
     private static Map staticWrapperMap = new ConcurrentHashMap();
 
-    private MonitoringManager monitoringManager;
+    protected MonitoringManager monitoringManager;
 
     // There is only one instance of the PresentationManager
     // that is shared between all ORBs.  This is necessary
@@ -226,6 +226,14 @@
         globalPM.setStubFactoryFactory( true, dynamicStubFactoryFactory ) ;
     }
 
+    public void destroy() {
+        wrapper = null;
+        omgWrapper = null;
+        typeCodeMap = null;
+        primitiveTypeCodeConstants = null;
+        byteBufferPool = null;
+    }
+
     /** Get the single instance of the PresentationManager
      */
     public static PresentationManager getPresentationManager()
@@ -302,6 +310,9 @@
     // Typecode support: needed in both ORBImpl and ORBSingleton
     public TypeCodeImpl get_primitive_tc(int kind)
     {
+        synchronized (this) {
+            checkShutdownState();
+        }
         try {
             return primitiveTypeCodeConstants[kind] ;
         } catch (Throwable t) {
@@ -311,15 +322,20 @@
 
     public synchronized void setTypeCode(String id, TypeCodeImpl code)
     {
+        checkShutdownState();
         typeCodeMap.put(id, code);
     }
 
     public synchronized TypeCodeImpl getTypeCode(String id)
     {
+        checkShutdownState();
         return (TypeCodeImpl)typeCodeMap.get(id);
     }
 
     public MonitoringManager getMonitoringManager( ) {
+        synchronized (this) {
+            checkShutdownState();
+        }
         return monitoringManager;
     }
 
@@ -434,6 +450,9 @@
      */
     public Logger getLogger( String domain )
     {
+        synchronized (this) {
+            checkShutdownState();
+        }
         ORBData odata = getORBData() ;
 
         // Determine the correct ORBId.  There are 3 cases:
@@ -510,6 +529,9 @@
     //       This method must also be inherited by both ORB and ORBSingleton.
     public ByteBufferPool getByteBufferPool()
     {
+        synchronized (this) {
+            checkShutdownState();
+        }
         if (byteBufferPool == null)
             byteBufferPool = new ByteBufferPoolImpl(this);
 
--- a/corba/src/share/classes/com/sun/corba/se/spi/orbutil/threadpool/ThreadPool.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/corba/src/share/classes/com/sun/corba/se/spi/orbutil/threadpool/ThreadPool.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -25,9 +25,15 @@
 
 package com.sun.corba.se.spi.orbutil.threadpool;
 
+import java.io.Closeable;
 
-public interface ThreadPool
+/** This interface defines a thread pool execution service.  The ORB uses this
+ * interface, which preceeds the JDK 5 ExecutorService.  Note that the close
+ * method must be called in order to reclaim thread resources.
+ */
+public interface ThreadPool extends Closeable
 {
+
     /**
     * This method will return any instance of the WorkQueue. If the ThreadPool
     * instance only services one WorkQueue then that WorkQueue instance will
--- a/corba/src/share/classes/com/sun/corba/se/spi/orbutil/threadpool/ThreadPoolManager.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/corba/src/share/classes/com/sun/corba/se/spi/orbutil/threadpool/ThreadPoolManager.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -25,7 +25,9 @@
 
 package com.sun.corba.se.spi.orbutil.threadpool;
 
-public interface ThreadPoolManager
+import java.io.Closeable;
+
+public interface ThreadPoolManager extends Closeable
 {
     /**
     * This method will return an instance of the threadpool given a threadpoolId,
--- a/corba/src/share/classes/com/sun/corba/se/spi/protocol/PIHandler.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/corba/src/share/classes/com/sun/corba/se/spi/protocol/PIHandler.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -25,6 +25,8 @@
 
 package com.sun.corba.se.spi.protocol;
 
+import java.io.Closeable;
+
 import org.omg.PortableInterceptor.ObjectReferenceTemplate ;
 import org.omg.PortableInterceptor.Interceptor ;
 import org.omg.PortableInterceptor.Current ;
@@ -51,7 +53,7 @@
 /** This interface defines the PI interface that is used to interface the rest of the
  * ORB to the PI implementation.
  */
-public interface PIHandler {
+public interface PIHandler extends Closeable {
     /** Complete the initialization of the PIHandler.  This will execute the methods
     * on the ORBInitializers, if any are defined.  This must be done here so that
     * the ORB can obtain the PIHandler BEFORE the ORBInitializers run, since they
--- a/corba/src/share/classes/com/sun/corba/se/spi/protocol/RequestDispatcherRegistry.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/corba/src/share/classes/com/sun/corba/se/spi/protocol/RequestDispatcherRegistry.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -37,33 +37,59 @@
  * This is a registry of all subcontract ID dependent objects.  This includes:
  * LocalClientRequestDispatcherFactory, ClientRequestDispatcher, ServerRequestDispatcher, and
  * ObjectAdapterFactory.
- * XXX Should the registerXXX methods take an scid or not?  I think we
- * want to do this so that the same instance can be shared across multiple
- * scids (and this is already true for ObjectAdapterFactory and LocalClientRequestDispatcherFactory),
- * but this will require some changes for ClientRequestDispatcher and ServerRequestDispatcher.
  */
 public interface RequestDispatcherRegistry {
-    // XXX needs javadocs!
 
+    /** Register a ClientRequestDispatcher for a particular subcontract ID.
+     * The subcontract ID appears in the ObjectKey of an object reference, and is used
+     * to control how a remote method invocation is processed by the ORB for a
+     * particular kind of object reference.
+     */
     void registerClientRequestDispatcher( ClientRequestDispatcher csc, int scid) ;
 
+    /** Get the ClientRequestDispatcher for subcontract ID scid.
+     */
     ClientRequestDispatcher getClientRequestDispatcher( int scid ) ;
 
+    /** Register a LocalClientRequestDispatcher for a particular subcontract ID.
+     * The subcontract ID appears in the ObjectKey of an object reference, and is used
+     * to control how a particular kind of colocated request is processed.
+     */
     void registerLocalClientRequestDispatcherFactory( LocalClientRequestDispatcherFactory csc, int scid) ;
 
+    /** Get the LocalClientRequestDispatcher for subcontract ID scid.
+     */
     LocalClientRequestDispatcherFactory getLocalClientRequestDispatcherFactory( int scid ) ;
 
+    /** Register a CorbaServerRequestDispatcher for a particular subcontract ID.
+     * The subcontract ID appears in the ObjectKey of an object reference, and is used
+     * to control how a particular kind of request is processed when received by the ORB.
+     */
     void registerServerRequestDispatcher( CorbaServerRequestDispatcher ssc, int scid) ;
 
+    /** Get the CorbaServerRequestDispatcher for subcontract ID scid.
+     */
     CorbaServerRequestDispatcher getServerRequestDispatcher(int scid) ;
 
+    /** Register a CorbaServerRequestDispatcher for handling an explicit object key name.
+     * This is used for non-standard invocations such as INS and the bootstrap name service.
+     */
     void registerServerRequestDispatcher( CorbaServerRequestDispatcher ssc, String name ) ;
 
+    /** Get the CorbaServerRequestDispatcher for a particular object key.
+     */
     CorbaServerRequestDispatcher getServerRequestDispatcher( String name ) ;
 
+    /** Register an ObjectAdapterFactory for a particular subcontract ID.
+     * This controls how Object references are created and managed.
+     */
     void registerObjectAdapterFactory( ObjectAdapterFactory oaf, int scid) ;
 
+    /** Get the ObjectAdapterFactory for a particular subcontract ID scid.
+     */
     ObjectAdapterFactory getObjectAdapterFactory( int scid ) ;
 
-    Set getObjectAdapterFactories() ;
+    /** Return the set of all ObjectAdapterFactory instances that are registered.
+     */
+    Set<ObjectAdapterFactory> getObjectAdapterFactories();
 }
--- a/hotspot/.hgtags	Wed Jul 05 18:15:28 2017 +0200
+++ b/hotspot/.hgtags	Wed Jul 05 18:16:12 2017 +0200
@@ -258,3 +258,4 @@
 831e5c76a20af18f3c08c5a95ed31be0e128a010 jdk8-b44
 9d5f20961bc5846fa8d098d534effafbbdae0a58 jdk8-b45
 40e5a3f2907ed02b335c7caa8ecf068cc801380d hs24-b15
+cf37a594c38db2ea926954154636f9f81da2e032 jdk8-b46
--- a/jaxp/.hgtags	Wed Jul 05 18:15:28 2017 +0200
+++ b/jaxp/.hgtags	Wed Jul 05 18:16:12 2017 +0200
@@ -167,3 +167,4 @@
 eff4ece9c8bc43b3ce2b3758574c4c20147f0689 jdk8-b43
 0b3f3a4ce13930430b32b616a717dfc7fe385b28 jdk8-b44
 57476f66e13c55eea2f2fe2b858369a4c64b9936 jdk8-b45
+300f45e990643af230d6cca39477ff62c44a9a54 jdk8-b46
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java	Wed Jul 05 18:16:12 2017 +0200
@@ -2609,6 +2609,18 @@
         if (str == null) {
             return str;
         }
+        int len = str.length(), i=0, ch;
+        for (; i < len; i++) {
+            ch = str.charAt(i);
+            // if it's not an ASCII 7 character, break here, and use UTF-8 encoding
+            if (ch >= 128)
+                break;
+        }
+
+        // we saw no non-ascii-7 character
+        if (i == len) {
+            return str;
+        }
 
         // get UTF-8 bytes for the string
         StringBuffer buffer = new StringBuffer();
@@ -2620,11 +2632,11 @@
             // should never happen
             return str;
         }
-        int len = bytes.length;
-        int ch;
+
+        len = bytes.length;
 
         // for each byte
-        for (int i = 0; i < len; i++) {
+        for (i = 0; i < len; i++) {
             b = bytes[i];
             // for non-ascii character: make it positive, then escape
             if (b < 0) {
--- a/jaxws/.hgtags	Wed Jul 05 18:15:28 2017 +0200
+++ b/jaxws/.hgtags	Wed Jul 05 18:16:12 2017 +0200
@@ -167,3 +167,4 @@
 f00c12994562c2f68d348a7c3e829374a89294e2 jdk8-b43
 f6a417540ef124c9b4123d07da5e26f2ab909949 jdk8-b44
 e80ac58b5ba904f24e125c742c30d0d740f05f86 jdk8-b45
+ae368a83c2404b65c9e38c65e2aa081f2201ca74 jdk8-b46
--- a/jdk/.hgtags	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/.hgtags	Wed Jul 05 18:16:12 2017 +0200
@@ -167,3 +167,4 @@
 b3246687c3695dff6f461bb407f9db88f7d072e7 jdk8-b43
 db471a7af03168e4441c245b1d9976f720a7cb77 jdk8-b44
 b92353a01aa049bc508fc56f0347d5934b7c4390 jdk8-b45
+8d2ed9d58453c8049715a72a6d26b6b66b37a94c jdk8-b46
--- a/jdk/makefiles/CompileDemos.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/CompileDemos.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -215,7 +215,7 @@
      # Param 5 = libs for posix
      # Param 6 = libs for winapi
      # Param 7 = libs for solaris
-     BUILD_DEMO_JVMTI_$1_EXTRA_SRC:=	$$(wildcard $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/demo/jvmti/$1) \
+     BUILD_DEMO_JVMTI_$1_EXTRA_SRC:=	$$(wildcard $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/demo/jvmti/$1) \
 					$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/share/demo/jvmti/,$2))
      BUILD_DEMO_JVMTI_$1_EXTRA_INC:=$$(addprefix -I,$$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC))
      BUILD_DEMO_JVMTI_$1_LANG:=C
@@ -227,18 +227,26 @@
          $1_EXTRA_CXX:=$(LIBCXX)
          BUILD_DEMO_JVMTI_$1_O_FLAG:=$(CXX_O_FLAG_NORM)
      endif
+
+     $1_CXXFLAGS:=$(CXXFLAGS_JDKLIB) $$(BUILD_DEMO_JVMTI_$1_O_FLAG) -I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3
+     ifeq ($1-$(OPENJDK_TARGET_CPU_ARCH),waiters-sparc)
+       $1_FILTER:=-xregs=no%appl
+       $1_CXXFLAGS:=$$(filter-out $$($1_FILTER),$$($1_CXXFLAGS))
+     endif
+
      $$(eval $$(call SetupNativeCompilation,BUILD_DEMO_JVMTI_$1,\
 		SRC:=$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC),\
 		LANG:=$$(BUILD_DEMO_JVMTI_$1_LANG),\
 		CFLAGS:=$(CFLAGS_JDKLIB) $$(BUILD_DEMO_JVMTI_$1_O_FLAG) -I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3,\
-		CXXFLAGS:=$(CXXFLAGS_JDKLIB) $$(BUILD_DEMO_JVMTI_$1_O_FLAG) -I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3,\
+		CXXFLAGS:=$$($1_CXXFLAGS),\
 		LDFLAGS:=$(LDFLAGS_JDKLIB),\
 		LDFLAGS_SUFFIX:=$$($1_EXTRA_CXX),\
 		LDFLAGS_SUFFIX_posix:=$5,\
 		LDFLAGS_SUFFIX_winapi:=$6,\
 		LDFLAGS_SUFFIX_solaris:=-lc $7,\
-		BIN:=$(JDK_OUTPUTDIR)/newdemoobjs/jvmti/$1,\
-		LIB:=$(JDK_OUTPUTDIR)/newdemo/jvmti/$1/lib/$(LIBRARY_PREFIX)$1$(SHARED_LIBRARY_SUFFIX)))
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/newdemoobjs/jvmti/$1,\
+		OUTPUT_DIR:=$(JDK_OUTPUTDIR)/newdemo/jvmti/$1/lib,\
+		LIBRARY:=$1))
 
     $$(eval $$(call SetupZipArchive,BUILD_DEMO_JVMTI_SRC_$1,\
 		SRC:=$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC),\
@@ -262,7 +270,7 @@
          BUILD_DEMOS += $(JDK_OUTPUTDIR)/newdemo/jvmti/$1/$1.jar
      endif
 
-     BUILD_DEMOS += 	$(JDK_OUTPUTDIR)/newdemo/jvmti/$1/lib/$(LIBRARY_PREFIX)$1$(SHARED_LIBRARY_SUFFIX) \
+     BUILD_DEMOS += 	$$(BUILD_DEMO_JVMTI_$1) \
 			$(JDK_OUTPUTDIR)/newdemo/jvmti/$1/src.zip \
 			$(JDK_OUTPUTDIR)/newdemo/jvmti/$1/README.txt
 endef
@@ -274,7 +282,7 @@
 # hprof contains error messages using __FILE__ macro. These expand to the absolute path
 # in the new build system and relative in the old, causing the binaries to differ.
 $(eval $(call SetupJVMTIDemo,hprof,			java_crw_demo,\
-		-I$(JDK_TOPDIR)/src/share/npt -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/npt,C,\
+		-I$(JDK_TOPDIR)/src/share/npt -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/npt,C,\
 		-ldl,ws2_32.lib winmm.lib,-lsocket -lnsl))
 
 $(eval $(call SetupJVMTIDemo,minst,			agent_util java_crw_demo))
@@ -349,7 +357,7 @@
 
 ##################################################################################################
 
-ifeq ($(PLATFORM), solaris)
+ifeq ($(OPENJDK_TARGET_OS), solaris)
 
 $(JDK_OUTPUTDIR)/newdemoclasses/jni/Poller/% : $(JDK_TOPDIR)/src/solaris/demo/jni/Poller/%
 		$(MKDIR) -p $(@D)
@@ -386,8 +394,9 @@
 		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
                         -I$(JDK_OUTPUTDIR)/newdemoclasses/jni/Poller, \
 		LDFLAGS:=$(LDFLAGS_JDKLIB), \
-		BIN:=$(JDK_OUTPUTDIR)/newdemoobjs/jni/Poller,\
-		LIB:=$(JDK_OUTPUTDIR)/newdemoobjs/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)))
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/newdemoobjs/jni/Poller,\
+                OUTPUT_DIR:=$(JDK_OUTPUTDIR)/newdemoobjs, \
+		LIBRARY:=Poller))
 
 #
 # We can only compile native code after jar has been build (since we depend on generated .h files)
--- a/jdk/makefiles/CompileJavaClasses.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/CompileJavaClasses.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -45,7 +45,7 @@
 		com/sun/tools/example/debug/gui \
 		com/oracle/security
 
-ifeq ($(PLATFORM)-$(ARCH_DATA_MODEL),windows-64)
+ifeq ($(OPENJDK_TARGET_OS)-$(ARCH_DATA_MODEL),windows-64)
      EXCLUDES += sun/security/pkcs11
 endif
 
@@ -61,7 +61,7 @@
    EXFILES := $(JDK_TOPDIR)/src/share/classes/javax/crypto/JarVerifier.java
 endif
 
-ifneq ($(PLATFORM),solaris)
+ifneq ($(OPENJDK_TARGET_OS),solaris)
    # Exclude Solaris nio and two security related files in src/share/classes
    EXFILES += SolarisAclFileAttributeView.java \
 	SolarisFileStore.java \
@@ -71,37 +71,34 @@
 	SolarisUserDefinedFileAttributeView.java \
 	SolarisWatchService.java \
 	SolarisAclFileAttributeView.java \
-	SolarisFileStore.java \
-	SolarisFileSystem.java \
-	SolarisFileSystemProvider.java \
-	SolarisUserDefinedFileAttributeView.java \
-	SolarisNativeDispatcher.java \
-	SolarisWatchService.java \
 	SolarisLoginModule.java \
 	SolarisSystem.java \
+	sun/nio/ch/EventPortSelectorImpl.java \
+	sun/nio/ch/EventPortSelectorProvider.java \
+	sun/nio/ch/EventPortWrapper.java \
 	sun/tools/attach/SolarisAttachProvider.java \
 	sun/tools/attach/SolarisVirtualMachine.java
 endif
 
 # In the old build, this isn't excluded on macosx, even though it probably
 # should be.
-ifneq ($(PLATFORM),macosx)
+ifneq ($(OPENJDK_TARGET_OS),macosx)
 	EXFILES+=WrapperGenerator.java
 endif
 
-ifneq ($(PLATFORM),windows)
+ifneq ($(OPENJDK_TARGET_OS),windows)
     # Exclude Window security related files in src/share/classes
     EXFILES+=NTLoginModule.java \
              NTSystem.java
 
 endif
 
-ifeq ($(PLATFORM),windows)
+ifeq ($(OPENJDK_TARGET_OS),windows)
     # Don't build GTK L&F on Windows
     EXCLUDES+=	com/sun/java/swing/plaf/gtk
 endif
 
-ifneq ($(PLATFORM),linux)
+ifneq ($(OPENJDK_TARGET_OS),linux)
     EXFILES+=sun/tools/attach/LinuxAttachProvider.java \
 	sun/tools/attach/LinuxVirtualMachine.java \
 	sun/nio/fs/LinuxDosFileAttributeView.java \
@@ -113,7 +110,7 @@
 	sun/nio/fs/LinuxWatchService.java
 endif
 
-ifneq ($(PLATFORM),macosx)
+ifneq ($(OPENJDK_TARGET_OS),macosx)
     EXFILES+=sun/nio/fs/BsdFileStore.java \
 	     sun/nio/fs/BsdFileSystem.java \
              sun/nio/fs/BsdFileSystemProvider.java \
@@ -137,11 +134,11 @@
 endif
 
 # Used on windows and macosx
-ifeq (,$(filter $(PLATFORM), windows macosx))
+ifeq (,$(filter $(OPENJDK_TARGET_OS), windows macosx))
     EXFILES+=sun/awt/AWTCharset.java
 endif
 
-ifneq ($(PLATFORM), macosx)
+ifneq ($(OPENJDK_TARGET_OS), macosx)
 #
 # Not in rt.jar on solaris and linux...(windows not checked)
 #     in rt.jar on macosx ??
@@ -192,7 +189,7 @@
 # Exclude another implicitly not included file.
 EXFILES+=sun/util/locale/AsciiUtil.java
 
-ifeq (,$(filter $(PLATFORM), solaris macosx))
+ifeq (,$(filter $(OPENJDK_TARGET_OS), solaris macosx))
 #
 # only solaris and macosx
 #
@@ -205,7 +202,7 @@
 	 -linux-ppc.java
 
 # TODO: Is this necessary?
-ifeq ($(PLATFORM), windows)
+ifeq ($(OPENJDK_TARGET_OS), windows)
     EXFILES+=sun/nio/ch/AbstractPollSelectorImpl.java \
 	sun/nio/ch/DevPollArrayWrapper.java \
 	sun/nio/ch/DevPollSelectorImpl.java \
@@ -248,18 +245,24 @@
 
 ifndef OPENJDK
     CLOSED_SRC_DIRS:=$(JDK_TOPDIR)/src/closed/share/classes \
-		     $(JDK_TOPDIR)/src/closed/$(LEGACY_HOST_OS_API)/classes
+		     $(JDK_TOPDIR)/src/closed/$(LEGACY_OPENJDK_TARGET_OS_API)/classes
 endif
 
 MACOSX_SRC_DIRS :=
-ifeq ($(PLATFORM),macosx)
+ifeq ($(OPENJDK_TARGET_OS),macosx)
      MACOSX_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/classes
 
      # this files are duplicated in MACOSX_SRC_DIRS
      EXFILES+= $(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java \
                $(JDK_TOPDIR)/src/solaris/classes/sun/java2d/BackBufferCapsProvider.java \
                $(JDK_TOPDIR)/src/solaris/classes/java/net/DefaultInterface.java \
-	       $(JDK_TOPDIR)/src/solaris/classes/java/lang/ClassLoaderHelper.java
+               $(JDK_TOPDIR)/src/solaris/classes/java/lang/ClassLoaderHelper.java
+
+     # JObjC.jar contains 1.5 byte-code...so skip it here :-(
+     # MACOSX_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/native/jobjc/src
+     # EXCLUDES+= tests/java/com/apple/jobjc
+
+     EXCLUDES+= com/apple/jobjc
 endif
 
 # The exception handling of swing beaninfo
@@ -272,7 +275,7 @@
 $(eval $(call SetupJavaCompilation,BUILD_JDK,\
                 SETUP:=GENERATE_JDKBYTECODE,\
 		SRC:=$(JDK_TOPDIR)/src/share/classes \
-		     $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes \
+		     $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/classes \
 		     $(MACOSX_SRC_DIRS) \
 		     $(JDK_OUTPUTDIR)/gensrc \
 		     $(JDK_OUTPUTDIR)/gensrc_swing/javax/swing/beaninfo \
@@ -297,7 +300,7 @@
 JDK_BASE_HEADER_JAVA_FILES:=$(patsubst %,$(JDK_TOPDIR)/src/share/classes/%.java,\
 				$(subst .,/,$(JDK_BASE_HEADER_CLASSES)))
 
-ifeq ($(PLATFORM),windows)
+ifeq ($(OPENJDK_TARGET_OS),windows)
     JDK_BASE_HEADER_CLASSES_WINDOWS:=sun.nio.ch.PollArrayWrapper
     JDK_BASE_HEADER_CLASSES+=$(JDK_BASE_HEADER_CLASSES_WINDOWS)
     JDK_BASE_HEADER_JAVA_FILES+=$(patsubst %,$(JDK_TOPDIR)/src/windows/classes/%.java,\
@@ -348,6 +351,53 @@
 
 ##########################################################################################
 
+ifeq ($(OPENJDK_TARGET_OS),macosx)
+#
+# JObjC.jar is compiled with BOOT_JAVAC which (may) not support the "-h" flag.
+#   so we first compile classes with BOOT_JAVAC and then with JDK_JAVAC :-(
+#
+$(eval $(call SetupJavaCompiler,GENERATE_15BYTECODE,\
+     JAVAC:=$(JAVAC),\
+     FLAGS:=-source 1.5 -target 1.5 -g -bootclasspath $(BOOT_RTJAR) -cp $(JDK_OUTPUTDIR)/../langtools/dist/lib/classes.jar $(DISABLE_WARNINGS),\
+     SERVER_DIR:=$(JAVAC_SERVERS),\
+     SERVER_JVM:=$(SERVER_JAVA),\
+     MODE:=$(JAVAC_USE_MODE),\
+     USE_DEPS:=$(JAVAC_USE_DEPS)))
+
+$(eval $(call SetupJavaCompilation,BUILD_JOBJC_JAR,\
+		SETUP:=GENERATE_15BYTECODE,\
+		SRC:=$(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/java \
+		     $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/java \
+		     $(JDK_OUTPUTDIR)/gensrc, \
+		INCLUDES := com/apple/jobjc,\
+                EXCLUDES := tests/java/com/apple/jobjc,\
+		BIN:=$(JDK_OUTPUTDIR)/jobjc_classes,\
+		JAR:=$(JDK_OUTPUTDIR)/lib/JObjC.jar, \
+		JARINDEX := true))
+
+$(BUILD_JOBJC_JAR) : $(BUILD_JDK)
+
+JARS += $(JDK_OUTPUTDIR)/lib/JObjC.jar
+
+$(eval $(call SetupJavaCompilation,BUILD_JOBJC_HEADERS_JAR,\
+		SETUP:=GENERATE_JDKBYTECODE,\
+		SRC:=$(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/java \
+		     $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/java \
+		     $(JDK_OUTPUTDIR)/gensrc, \
+		INCLUDES := com/apple/jobjc,\
+                EXCLUDES := tests/java/com/apple/jobjc,\
+		BIN:=$(JDK_OUTPUTDIR)/jobjc_classes_headers,\
+		JAR:=$(JDK_OUTPUTDIR)/jobjc_classes_headers/dummy.jar, \
+		HEADERS:=$(JDK_OUTPUTDIR)/gensrc_headers))
+
+$(BUILD_JOBJC_HEADERS_JAR) : $(BUILD_JDK)
+
+JARS += $(JDK_OUTPUTDIR)/jobjc_classes_headers/dummy.jar
+
+endif
+
+##########################################################################################
+
 # copy with -a to preserve timestamps so dependencies down the line aren't messed up
 all: $(BUILD_JDK) $(JARS) $(COPY_EXTRA) $(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin \
 	$(JDK_OUTPUTDIR)/classes/_the.jdk.base.headers
--- a/jdk/makefiles/CompileLaunchers.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/CompileLaunchers.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -32,17 +32,25 @@
 # Setup the java compilers for the JDK build.
 include Setup.gmk
 
+# Build tools
+include Tools.gmk
+
 BUILD_LAUNCHERS=
 
 define SetupLauncher
     # TODO: Fix mapfile on solaris. Won't work with ld as linker.
     # Parameter 1 is the name of the launcher (java,javac,jar...)
-    # Parameter 2 are extra CFLAGS
-    # Parameter 3 are extra LDFLAGS
-    # Parameter 4 are extra LDFLAGS_SUFFIX_posix
-    # Parameter 5 are extra LDFLAGS_SUFFIX_winapi
+    # Parameter 2 is extra CFLAGS
+    # Parameter 3 is extra LDFLAGS
+    # Parameter 4 is extra LDFLAGS_SUFFIX_posix
+    # Parameter 5 is extra LDFLAGS_SUFFIX_winapi
+    # Parameter 6 is optional Windows JLI library (full path)
+    # Parameter 7 is optional Windows resource (RC) flags
+    # Parameter 8 is optional Windows version resource file (.rc)
+    # Parameter 9  is different output dir
+    # Parameter 10 is FULL DEBUG SYMBOLS (set value to turn OFF, since most(all) seems to have it)
 
-    $1_WINDOWS_JLI_LIB:=$(JDK_OUTPUTDIR)/objs/jli.lib
+    $1_WINDOWS_JLI_LIB:=$(JDK_OUTPUTDIR)/objs/libjli/jli.lib
     ifneq ($6,)
         $1_WINDOWS_JLI_LIB:=$6
     endif
@@ -51,33 +59,73 @@
         $1_VERSION_INFO_RESOURCE:=$8
     endif
 
+    $1_LDFLAGS := $3
+    ifeq ($(OPENJDK_TARGET_OS), macosx)
+        $1_LDFLAGS += -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+                       -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks
+    endif
+
+    $1_LDFLAGS_SUFFIX :=
+    ifeq ($(USE_EXTERNAL_LIBZ), true)
+        $1_LDFLAGS_SUFFIX += -lz
+    endif
+
+    ifeq ($(OPENJDK_TARGET_OS), macosx)
+        $1_LDFLAGS_SUFFIX += -Wl,-all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \
+                             -framework Cocoa -framework Security -framework ApplicationServices \
+                             -sectcreate __TEXT __info_plist $(JDK_TOPDIR)/src/macosx/lib/Info-cmdline.plist
+    endif
+
+
+    $1_OUTPUT_DIR_ARG:=$9
+    ifeq (,$$($1_OUTPUT_DIR_ARG))
+        $1_OUTPUT_DIR_ARG:=$(JDK_OUTPUTDIR)/bin
+    endif
+
+    $1_DEBUG_SYMBOLS:=yes
+    ifneq (,$(10))
+      $1_DEBUG_SYMBOLS:=
+    endif
+
+    $1_OPTIMIZATION:= LOW
+
+    # TODO: maybe it's better to move this if-statement out of this function
+    ifeq ($(1),java)
+      $1_OPTIMIZATION:=HIGH
+    endif
+
     $(call SetupNativeCompilation,BUILD_LAUNCHER_$1,\
 	SRC:=$(JDK_TOPDIR)/src/share/bin,\
 	INCLUDE_FILES:=main.c,\
 	LANG:=C,\
-	CFLAGS:=$(CFLAGS_JDKEXE) $(C_O_FLAG_NORM) \
+	OPTIMIZATION :=$$($1_OPTIMIZATION), \
+	CFLAGS:=$(CFLAGS_JDKEXE) \
 		-I$(JDK_TOPDIR)/src/share/bin \
-		-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/bin \
-		-I$(JDK_TOPDIR)/src/$(PLATFORM)/bin \
+		-I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/bin \
+		-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS)/bin \
                 -DFULL_VERSION='"$(FULL_VERSION)"' \
                 -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
                 -DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \
 		-DLIBARCHNAME='"$(ARCH)"' \
-		-DLAUNCHER_NAME='"openjdk"' \
+		-DLAUNCHER_NAME='"java"' \
 		-DPROGNAME='"$1"' $(DPACKAGEPATH) \
 		$2,\
 	CFLAGS_linux:=-fPIC,\
+        CFLAGS_solaris:=-KPIC -DHAVE_GETHRTIME,\
 	LDFLAGS:=$(LDFLAGS_JDKEXE) \
                  $(call SET_SHARED_LIBRARY_ORIGIN,../lib/$(LIBARCH)/jli) \
                  $(call SET_SHARED_LIBRARY_ORIGIN,../jre/lib/$(LIBARCH)/jli) \
-		 $3,\
+		 $$($1_LDFLAGS),\
 	MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/launchers/mapfile-$(ARCH), \
-        LDFLAGS_SUFFIX:=$(LDFLAGS_JDKEXE_SUFFIX),\
+        LDFLAGS_SUFFIX:=$(LDFLAGS_JDKEXE_SUFFIX) $$($1_LDFLAGS_SUFFIX),\
 	LDFLAGS_SUFFIX_posix:=$4 -lc,\
 	LDFLAGS_SUFFIX_winapi:=$$($1_WINDOWS_JLI_LIB) \
-			       $(JDK_OUTPUTDIR)/objs/java.lib advapi32.lib $5,\
-	BIN:=$(JDK_OUTPUTDIR)/objs/$1_objs,\
-	EXE:=$(JDK_OUTPUTDIR)/objs/$1$(EXE_SUFFIX),\
+			       $(JDK_OUTPUTDIR)/objs/libjava/java.lib advapi32.lib $5,\
+	LDFLAGS_SUFFIX_solaris := -lthread $(LIBDL), \
+	OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/$1_objs,\
+	OUTPUT_DIR:=$$($1_OUTPUT_DIR_ARG),\
+	PROGRAM:=$1,\
+	DEBUG_SYMBOLS:=$$($1_DEBUG_SYMBOLS),\
 	VERSIONINFO_RESOURCE:=$$($1_VERSION_INFO_RESOURCE),\
 	RC_FLAGS:=$(RC_FLAGS)\
 		  /D "JDK_FNAME=$1$(EXE_SUFFIX)" \
@@ -86,13 +134,22 @@
 		  $7,\
 	MANIFEST:=$(JDK_TOPDIR)/src/windows/resource/java.manifest)
 
-    BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin/$1$(EXE_SUFFIX)
+    BUILD_LAUNCHERS += $$(BUILD_LAUNCHER_$1)
+
+    ifeq ($(OPENJDK_TARGET_OS),macosx)
+        $$(BUILD_LAUNCHER_$1) : $(JDK_OUTPUTDIR)/objs/libjli_static.a
+    endif
+
+    ifeq ($(OPENJDK_TARGET_OS),windows)
+        $$(BUILD_LAUNCHER_$1) : $(JDK_OUTPUTDIR)/objs/libjava/java.lib \
+				$$($1_WINDOWS_JLI_LIB)
+    endif    	 
 endef
 
 ##########################################################################################
 
-XLIBS:=-lX11
-ifeq ($(PLATFORM),macosx)
+XLIBS:=$(X_LIBS) -lX11
+ifeq ($(OPENJDK_TARGET_OS),macosx)
     DPACKAGEPATH:=-DPACKAGE_PATH='"$(PACKAGE_PATH)"'
     XLIBS:=
 endif
@@ -108,17 +165,17 @@
     $(JDK_OUTPUTDIR)/objs/jli_static.lib,$(JAVA_RC_FLAGS),\
     $(JDK_TOPDIR)/src/windows/resource/java.rc))
 
-ifeq ($(HOST_OS),windows)
+ifeq ($(OPENJDK_TARGET_OS),windows)
     $(eval $(call SetupLauncher,javaw,\
         -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib,\
         $(JDK_OUTPUTDIR)/objs/jli_static.lib,$(JAVA_RC_FLAGS),\
         $(JDK_TOPDIR)/src/windows/resource/java.rc))
 endif
 
-ifeq ($(PLATFORM),solaris)
+ifeq ($(OPENJDK_TARGET_OS),solaris)
     THREAD_LIB:=-lthread
 endif
-ifeq ($(PLATFORM),linux)
+ifeq ($(OPENJDK_TARGET_OS),linux)
     THREAD_LIB:=-lpthread
 endif
 
@@ -271,7 +328,7 @@
 $(eval $(call SetupLauncher,jcmd,\
     -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.tools.jcmd.JCmd"$(COMMA) }'))
 
-ifeq ($(PLATFORM),windows)
+ifeq ($(OPENJDK_TARGET_OS),windows)
     $(eval $(call SetupLauncher,kinit,\
         -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Kinit"$(COMMA) }'))
 
@@ -286,8 +343,10 @@
 # The order of the object files on the link command line affects the size of the resulting
 # binary (at least on linux) which causes the size to differ between old and new build.
 ifeq ($(USE_EXTERNAL_LIBZ), true)
+UNPACKEXE_CFLAGS := -DSYSTEM_ZLIB
 UNPACKEXE_ZIPOBJS := -lz
 else
+UNPACKEXE_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
 UNPACKEXE_ZIPOBJS := 	$(JDK_OUTPUTDIR)/objs/libzip/zcrc32$(OBJ_SUFFIX) \
 		     	$(JDK_OUTPUTDIR)/objs/libzip/deflate$(OBJ_SUFFIX) \
 			$(JDK_OUTPUTDIR)/objs/libzip/trees$(OBJ_SUFFIX) \
@@ -299,27 +358,31 @@
 			$(JDK_OUTPUTDIR)/objs/libzip/inftrees$(OBJ_SUFFIX) \
 			$(JDK_OUTPUTDIR)/objs/libzip/inffast$(OBJ_SUFFIX)
 
+endif
 
-$(JDK_OUTPUTDIR)/bin/unpack200$(EXE_SUFFIX): $(UNPACKEXE_ZIPOBJS)
-
+ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
+     UNPACKEXE_CFLAGS += -xregs=no%appl
 endif
 
 $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE,\
                 SRC:=$(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack,\
 		EXCLUDE_FILES:=jni.cpp,\
 		LANG:=C,\
-		CFLAGS:=$(CXXFLAGS_JDKEXE) $(CXX_O_FLAG_NORM) \
-			 -DFULL \
-			 -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5,\
+		OPTIMIZATION := LOW, \
+		CFLAGS:=$(UNPACKEXE_CFLAGS) $(CXXFLAGS_JDKEXE)\
+			 -DFULL, \
 		CFLAGS_release:=-DPRODUCT,\
 		CFLAGS_linux:=-fPIC,\
+		CFLAGS_solaris := -KPIC, \
+		CFLAGS_macosx := -fPIC, \
 		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libunpack/mapfile-vers-unpack200, \
 		LDFLAGS:=$(LDFLAGS_JDKEXE) \
 			 $(call SET_SHARED_LIBRARY_ORIGIN), \
 		LDFLAGS_SUFFIX:=$(UNPACKEXE_ZIPOBJS) $(LIBCXX),\
 		LDFLAGS_SUFFIX_solaris:=-lc,\
-		BIN:=$(JDK_OUTPUTDIR)/objs/unpackexe,\
-		EXE:=$(JDK_OUTPUTDIR)/objs/unpack200$(EXE_SUFFIX),\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/unpackexe,\
+		OUTPUT_DIR:=$(JDK_OUTPUTDIR)/bin,\
+		PROGRAM:=unpack200,\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
 			  /D "JDK_FNAME=unpack200.exe" \
@@ -327,7 +390,13 @@
 			  /D "JDK_FTYPE=0x1L",\
 		MANIFEST:=$(JDK_TOPDIR)/src/windows/resource/unpack200_proto.exe.manifest))
 
-BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin/unpack200$(EXE_SUFFIX)
+ifneq ($(USE_EXTERNAL_LIBZ), true)
+
+$(BUILD_UNPACKEXE) : $(UNPACKEXE_ZIPOBJS)
+
+endif
+
+BUILD_LAUNCHERS += $(BUILD_UNPACKEXE)
 
 ##########################################################################################
 
@@ -335,7 +404,7 @@
 BUILD_JEXEC := 
 BUILD_JEXEC_SRC :=
 BUILD_JEXEC_INC :=
-BUILD_JEXEC_DST := $(JDK_OUTPUTDIR)/lib/$(LIBARCH)/jexec$(EXE_SUFFIX)
+BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib/$(LIBARCH)
 
 #
 # UNHANDLED:
@@ -345,30 +414,30 @@
 #
 # jdk/make/java/Makefile
 #
-ifeq ($(PLATFORM), solaris)
+ifeq ($(OPENJDK_TARGET_OS), solaris)
 	ifeq ($(ARCH_DATA_MODEL), 32)
 		BUILD_JEXEC := 1
 	endif
 endif
 
-ifeq ($(PLATFORM), linux)
+ifeq ($(OPENJDK_TARGET_OS), linux)
 	BUILD_JEXEC := 1
-endif # PLATFORM
+endif # OPENJDK_TARGET_OS
 
 #
 # jdk/make/java/jexec/Makefile
 #
 ifeq ($(BUILD_JEXEC), 1)
 
-	ifeq ($(PLATFORM),windows)
-	else ifeq ($(PLATFORM),macosx)
+	ifeq ($(OPENJDK_TARGET_OS),windows)
+	else ifeq ($(OPENJDK_TARGET_OS),macosx)
 		BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/macosx/bin
 	else
 		BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/solaris/bin
 	endif
 
-	ifeq ($(PLATFORM), linux)
-		BUILD_JEXEC_DST := $(JDK_OUTPUTDIR)/lib/jexec$(EXE_SUFFIX)
+	ifeq ($(OPENJDK_TARGET_OS), linux)
+                BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib
 		BUILD_JEXEC_INC += -I$(JDK_TOPDIR)/src/share/bin
 	endif
 endif
@@ -382,13 +451,15 @@
 		SRC:=$(BUILD_JEXEC_SRC),\
 		INCLUDE_FILES:=jexec.c,\
 		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKEXE) $(C_O_FLAG_NORM) \
+		OPTIMIZATION := LOW, \
+		CFLAGS:=$(CFLAGS_JDKEXE)\
                         $(BUILD_JEXEC_INC), \
 		LDFLAGS:=$(LDFLAGS_JDKEXE), \
-		BIN:=$(JDK_OUTPUTDIR)/objs/jexec_obj,\
-		EXE:=$(BUILD_JEXEC_DST)))
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/jexec_obj,\
+		OUTPUT_DIR:=$(BUILD_JEXEC_DST_DIR),\
+		PROGRAM:=jexec))
 
-	BUILD_LAUNCHERS += $(BUILD_JEXEC_DST)
+	BUILD_LAUNCHERS += $(BUILD_JEXEC)
 endif
 
 ##########################################################################################
@@ -397,10 +468,10 @@
 # The java-rmi.cgi script in bin/ only gets delivered in certain situations
 #
 JAVA_RMI_CGI:=$(JDK_OUTPUTDIR)/bin/java-rmi.cgi
-ifeq ($(PLATFORM), linux)
+ifeq ($(OPENJDK_TARGET_OS), linux)
   BUILD_LAUNCHERS += $(JAVA_RMI_CGI)
 endif
-ifeq ($(PLATFORM), solaris)
+ifeq ($(OPENJDK_TARGET_OS), solaris)
   ifeq ($(ARCH_DATA_MODEL), 32)
     BUILD_LAUNCHERS += $(JAVA_RMI_CGI)
   endif
@@ -413,12 +484,13 @@
 # images bin dir. This weird behavior is mimicked here in the converted makefiles for
 # now. Should probably just be deleted.
 # http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6512052
-ifeq ($(HOST_OS_API),winapi)
+ifeq ($(OPENJDK_TARGET_OS_API),winapi)
     $(eval $(call SetupLauncher,java-rmi,\
         -DEXPAND_CLASSPATH_WILDCARDS,\
-        $(call SET_SHARED_LIBRARY_MAPFILE,$(JDK_TOPDIR)/makefiles/java/main/java/mapfile-$(ARCH))))
+        $(call SET_SHARED_LIBRARY_MAPFILE,$(JDK_TOPDIR)/makefiles/java/main/java/mapfile-$(ARCH)),\
+        ,,,,,$(JDK_OUTPUTDIR)/objs))
 
-    $(JAVA_RMI_CGI): $(JDK_OUTPUTDIR)/objs/java-rmi$(EXE_SUFFIX)
+    $(JAVA_RMI_CGI): $(BUILD_LAUNCHER_java-rmi)
 	$(MKDIR) -p $(@D)
 	$(CP) $< $@
 
@@ -432,11 +504,6 @@
 
 ##########################################################################################
 
-$(JDK_OUTPUTDIR)/bin/% : $(JDK_OUTPUTDIR)/objs/%
-	$(ECHO) Copying $(@F)
-	$(MKDIR) -p $(@D)
-	$(CP) $< $@
-
 $(BUILD_LAUNCHERS) : $(JDK_TOPDIR)/makefiles/CompileLaunchers.gmk
 
 all: $(BUILD_LAUNCHERS)
--- a/jdk/makefiles/CompileNativeLibraries.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/CompileNativeLibraries.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -35,13 +35,16 @@
 # Copy files (can now depend on $(COPY_FILES))
 include CopyFiles.gmk
 
+# Build tools
+include Tools.gmk
+
 # Include the javah generated headers.
 CFLAGS_JDKLIB += -I$(JDK_OUTPUTDIR)/gensrc_headers
 CXXFLAGS_JDKLIB += -I$(JDK_OUTPUTDIR)/gensrc_headers
 
-# Put the libraries here. Different locations for different host apis.
-ifeq ($(HOST_OS_API),posix)
-    ifneq ($(HOST_OS),macosx)
+# Put the libraries here. Different locations for different target apis.
+ifeq ($(OPENJDK_TARGET_OS_API),posix)
+    ifneq ($(OPENJDK_TARGET_OS),macosx)
         INSTALL_LIBRARIES_HERE:=$(JDK_OUTPUTDIR)/lib/$(LIBARCH)
         LIBARCHDIR=$(LIBARCH)/
     else
@@ -52,465 +55,213 @@
     INSTALL_LIBRARIES_HERE:=$(JDK_OUTPUTDIR)/bin
 endif
 
-$(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX) : $(JDK_OUTPUTDIR)/objs/%$(SHARED_LIBRARY_SUFFIX)
-	$(ECHO) Copying $(@F)
-	$(CP) $< $@
-
 BUILD_LIBRARIES=
 
-# TODO: Temporary until awt is converted:
-# OBJDIRNAME is the name of the directory where the object code is to
-#   be placed. It's name depends on whether the data model architecture 
-#   is 32-bit or not.
-ifneq ($(ARCH_DATA_MODEL), 32)
-  OBJDIRNAME  = obj$(ARCH_DATA_MODEL)$(OBJDIRNAME_SUFFIX)
-else
-  OBJDIRNAME  = obj$(OBJDIRNAME_SUFFIX)
-endif
+# Absolute paths to lib files on windows for use in LDFLAGS. Should figure out a more
+# elegant solution to this.
+WIN_VERIFY_LIB := $(JDK_OUTPUTDIR)/objs/libverify/verify.lib
+WIN_JAVA_LIB := $(JDK_OUTPUTDIR)/objs/libjava/java.lib
+WIN_AWT_LIB := $(JDK_OUTPUTDIR)/objs/libawt/awt.lib
 
 ##########################################################################################
 
-BUILD_LIBZIP_FILES := \
-        CRC32.c \
-	Adler32.c \
-	Deflater.c \
-	Inflater.c \
-	ZipFile.c \
-	zip_util.c
-
-ifeq ($(USE_EXTERNAL_LIBZ),true)
-	LIBZ := -lz
-else
-BUILD_LIBZIP_FILES += \
-	compress.c \
-	deflate.c \
-	gzclose.c \
-	gzlib.c \
-	gzread.c \
-	gzwrite.c \
-	infback.c \
-	inffast.c \
-	inflate.c \
-	inftrees.c \
-	trees.c \
-	uncompr.c \
-	zadler32.c \
-	zcrc32.c \
-	zutil.c
-	LIBZ_INCLUDE := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
+BUILD_LIBFDLIBM_OPTIMIZATION:=HIGH
+
+ifneq ($(OPENJDK_TARGET_OS), solaris)
+      BUILD_LIBFDLIBM_OPTIMIZATION:=NONE
 endif
 
-$(eval $(call SetupNativeCompilation,BUILD_LIBZIP,\
-                SRC:=$(JDK_TOPDIR)/src/share/native/java/util/zip \
-                     $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5,\
-		INCLUDE_FILES := $(BUILD_LIBZIP_FILES), \
-		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
-                        $(LIBZ_INCLUDE) \
-		        -I$(JDK_TOPDIR)/src/share/native/java/io \
-                        -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/java/io,\
-		CFLAGS_posix:=-DUSE_MMAP -UDEBUG,\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libzip/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(EXPORT_ZIP_FUNCS), \
-		LDFLAGS_winapi:=-export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \
-                                -export:ZIP_ReadEntry -export:ZIP_GetNextEntry jvm.lib \
-                                java.lib,\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(LIBZ),\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libzip,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)zip$(SHARED_LIBRARY_SUFFIX)))
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)zip$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)zip$(SHARED_LIBRARY_SUFFIX)
-
-##########################################################################################
-
-LIBUNPACK_LIB_FILE := $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX)
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK,\
-                SRC:=$(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack,\
-		EXCLUDE_FILES:=main.cpp,\
-		LANG:=C++,\
-		CFLAGS:=$(CXXFLAGS_JDKLIB) $(CXX_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
-			 -DNO_ZLIB -DUNPACK_JNI -DFULL,\
-		CFLAGS_release:=-DPRODUCT,\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libunpack/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB)\
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_winapi:=-map:$(JDK_OUTPUTDIR)/objs/unpack.map /debug \
-				jvm.lib java.lib,\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
-		LDFLAGS_SUFFIX_posix:=$(LIBCXX),\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libunpack,\
-		LIB:=$(LIBUNPACK_LIB_FILE),\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=unpack.dll" \
-			  /D "JDK_INTERNAL_NAME=unpack" \
-			  /D "JDK_FTYPE=0x2L"))
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX)
-
-ifeq ($(HOST_OS_API),winapi)
-    $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)unpack.map: $(LIBUNPACK_LIB_FILE)
-	$(ECHO) Copying $(@F)
-	$(CP) $(patsubst %$(SHARED_LIBRARY_SUFFIX),%.map,$<) $@
-
-    $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)unpack.pdb: $(LIBUNPACK_LIB_FILE)
-	$(ECHO) Copying $(@F)
-	$(CP) $(patsubst %$(SHARED_LIBRARY_SUFFIX),%.pdb,$<) $@
-endif
-
-##########################################################################################
-
-BUILD_LIBFDLIBM_OPTIMIZATION:= $(C_O_FLAG_HI)
-
-ifneq ($(PLATFORM), solaris)
-      BUILD_LIBFDLIBM_OPTIMIZATION := $(C_O_FLAG_NONE)
-endif
-
-ifneq ($(PLATFORM),macosx)
+ifneq ($(OPENJDK_TARGET_OS),macosx)
 $(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM,\
+                STATIC_LIBRARY:=fdlibm,\
+                OUTPUT_DIR:=$(JDK_OUTPUTDIR)/objs,\
                 SRC:=$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/src,\
 		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(BUILD_LIBFDLIBM_OPTIMIZATION) \
+		OPTIMIZATION:=$(BUILD_LIBFDLIBM_OPTIMIZATION), \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
 			-I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include,\
 		CFLAGS_winapi_debug:=-DLOGGING,\
 		ARFLAGS:=$(ARFLAGS),\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libfdlibm,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX)))
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libfdlibm))
+
+BUILD_LIBRARIES += $(BUILD_LIBFDLIBM)
+
 else
 #
 # On macosx they do partial (incremental) linking of fdlibm
 #   code it here...rather than add support to NativeCompilation
 #   as this is firt time I see it
 $(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM,\
+                LIBRARY:=fdlibm,\
+                OUTPUT_DIR:=$(JDK_OUTPUTDIR)/objs/libfdlibm,\
                 SRC:=$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/src,\
 		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(BUILD_LIBFDLIBM_OPTIMIZATION) \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
 			-I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include,\
-		LDFLAGS := -nostdlib -r,\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libfdlibm,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fdlibm$(SHARED_LIBRARY_SUFFIX)))
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX) : \
-	$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fdlibm$(SHARED_LIBRARY_SUFFIX)
+		LDFLAGS:=-nostdlib -r,\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libfdlibm))
+
+$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX) : $(BUILD_LIBFDLIBM)
 	$(CP) -a $< $@
-endif
-
 
 BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX)
-
-##########################################################################################
-
-LIBATTACH_EXCLUDE_FILES:=
-ifneq ($(PLATFORM),solaris)
-    LIBATTACH_EXCLUDE_FILES+=SolarisVirtualMachine.c
-endif
-ifneq ($(PLATFORM),linux)
-    LIBATTACH_EXCLUDE_FILES+=LinuxVirtualMachine.c
-endif
-ifneq ($(PLATFORM),macosx)
-    LIBATTACH_EXCLUDE_FILES+=BsdVirtualMachine.c
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBATTACH,\
-                SRC:=$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/tools/attach,\
-		EXCLUDE_FILES:=$(LIBATTACH_EXCLUDE_FILES),\
-		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS),\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libattach/mapfile-$(PLATFORM), \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_solaris:=-ldoor,\
-		LDFLAGS_winapi:=psapi.lib advapi32.lib java.lib jvm.lib,\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libattach,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX)))
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX)
-
-##########################################################################################
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBDT_SOCKET,\
-                SRC:=$(JDK_TOPDIR)/src/share/transport/socket \
-			$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/transport/socket,\
-		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) -DUSE_MMAP $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
-                        -I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(PLATFORM) \
-                        -I$(JDK_TOPDIR)/src/share/transport/socket \
-		        -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/transport/socket \
-                        -I$(JDK_TOPDIR)/src/share/back/export \
-                        -I$(JDK_TOPDIR)/src/share/back,\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libdt_socket/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB), \
-		LDFLAGS_SUFFIX_linux:=-lpthread,\
-		LDFLAGS_SUFFIX_solaris:=-lnsl -lsocket,\
-		LDFLAGS_SUFFIX_winapi:=-export:jdwpTransport_OnLoad ws2_32.lib,\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libdt_socket,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)dt_socket$(SHARED_LIBRARY_SUFFIX)))
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)dt_socket$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)dt_socket$(SHARED_LIBRARY_SUFFIX)
-
-##########################################################################################
-
-ifeq ($(HOST_OS_API),winapi)
-
-  $(eval $(call SetupNativeCompilation,BUILD_LIBDT_SHMEM,\
-                SRC:= $(JDK_TOPDIR)/src/share/native/com/sun/tools/jdi \
-			$(JDK_TOPDIR)/src/share/transport/shmem \
-			$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/transport/shmem,\
-		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) -DUSE_MMAP $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS)\
-                        -I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(PLATFORM) \
-                        -I$(JDK_TOPDIR)/src/share/transport/shmem \
-		        -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/transport/shmem \
-                        -I$(JDK_TOPDIR)/src/share/back/export, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB),\
-		LDFLAGS_winapi:=-export:jdwpTransport_OnLoad,\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libdt_shmem,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)dt_shmem$(SHARED_LIBRARY_SUFFIX)))
-
-  BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)dt_shmem$(SHARED_LIBRARY_SUFFIX)
-
-endif # PLATFORM
-
-##########################################################################################
-# JDWP_LOGGING causes log messages to be compiled into the library. These reference the 
-# __FILE__ macro which here expands to the absolute path of the file while the old build 
-# system used a relative path. This causes the binaries to differ in size.
-$(eval $(call SetupNativeCompilation,BUILD_LIBJDWP,\
-                SRC:=$(JDK_TOPDIR)/src/share/back $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/back,\
-		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) -DJDWP_LOGGING $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS)\
-		 -I$(JDK_TOPDIR)/src/share/transport/export \
-                 -I$(JDK_TOPDIR)/src/share/back/export \
-                 -I$(JDK_TOPDIR)/src/share/npt \
-                 -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/npt \
-                 -I$(JDK_TOPDIR)/src/share/back \
-                 -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/back \
-		 -I$(JDK_OUTPUTDIR)/gensrc_jdwp_headers,\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjdwp/mapfile-vers, \
-		LDFLAGS:=$(filter-out -ljava,$(LDFLAGS_JDKLIB)), \
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
-		LDFLAGS_SUFFIX_linux:=$(LIBDL),\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libjdwp,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jdwp$(SHARED_LIBRARY_SUFFIX)))
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jdwp$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)jdwp$(SHARED_LIBRARY_SUFFIX)
-
-##########################################################################################
-
-LIBJAAS_MAPFILE :=
-ifneq ($(PLATFORM),solaris)
-   LIBJAAS_EXCLUDE_FILES:=Solaris.c
-else
-   # only on solaris...wonder why
-   LIBJAAS_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjaas/mapfile-vers
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBJAAS,\
-                SRC:=$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/com/sun/security/auth/module,\
-		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS),\
-		MAPFILE := $(LIBJAAS_MAPFILE),\
-		LDFLAGS:=$(filter-out -ljava,$(LDFLAGS_JDKLIB)) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_winapi:=netapi32.lib user32.lib mpr.lib advapi32.lib,\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
-		EXCLUDE_FILES:=$(LIBJAAS_EXCLUDE_FILES),\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libjaas,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jaas$(SHARED_LIBRARY_SUFFIX)))
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jaas$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
-
-BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jaas$(SHARED_LIBRARY_SUFFIX)
-
-# Oddly enough, it is called jaas_nt.dll under winapi and libjaas_unix.so under posix.
-ifeq ($(PLATFORM),windows)
-    $(INSTALL_LIBRARIES_HERE)/jaas_nt.dll : $(JDK_OUTPUTDIR)/objs/jaas.dll
-	$(ECHO) Copying $(@F)
-	$(CP) $< $@
-    BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/jaas_nt.dll
-else
-    $(INSTALL_LIBRARIES_HERE)/libjaas_unix$(SHARED_LIBRARY_SUFFIX) : $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jaas$(SHARED_LIBRARY_SUFFIX)
-	$(ECHO) Copying $(@F)
-	$(CP) $< $@
-    BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/libjaas_unix$(SHARED_LIBRARY_SUFFIX)
 endif
 
 ##########################################################################################
 
-ifeq ($(HOST_OS_API),posix)
-  # TODO make this work on macosx
-  ifneq ($(HOST_OS),macosx)
-
-    $(eval $(call SetupNativeCompilation,BUILD_LIBSCTP,\
-                SRC:=$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/nio/ch/sctp,\
+BUILD_LIBVERIFY_SRC:=check_code.c check_format.c
+
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+	ifneq ($(ARCH), amd64)
+		BUILD_LIBVERIFY_REORDER:=$(JDK_TOPDIR)/makefiles/mapfiles/libverify/reorder-$(ARCH)
+	endif
+endif
+
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY,\
+		LIBRARY:=verify, \
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+		SRC:=$(JDK_TOPDIR)/src/share/native/common,\
+		INCLUDE_FILES:=$(BUILD_LIBVERIFY_SRC),\
 		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS)\
-			-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch \
-			-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch/sctp \
-			-I$(JDK_TOPDIR)/src/share/native/java/net \
-			-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/nio/ch \
-			-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/java/net,\
-		CFLAGS_linux:=-Werror,\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libsctp/mapfile-vers, \
+		OPTIMIZATION:=HIGH, \
+		CFLAGS:=$(CFLAGS_JDKLIB),\
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libverify/mapfile-vers, \
 		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX_linux:=-lpthread,\
-		LDFLAGS_SUFFIX_posix:=$(LIBDL) -lnio -lnet,\
-		LDFLAGS_SUFFIX_solaris:=-lsocket,\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
-		INCLUDE_FILES:=SctpNet.c SctpChannelImpl.c SctpServerChannelImpl.c,\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libsctp,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)sctp$(SHARED_LIBRARY_SUFFIX)))
-
-    BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)sctp$(SHARED_LIBRARY_SUFFIX)
-
-    $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)sctp$(SHARED_LIBRARY_SUFFIX) : $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)nio$(SHARED_LIBRARY_SUFFIX)
-  endif
-endif
-
-##########################################################################################
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBJSDT,\
-                SRC:=$(JDK_TOPDIR)/src/share/native/sun/tracing/dtrace\
-			$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/tracing/dtrace,\
-		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS)\
-			-I$(JDK_TOPDIR)/src/share/native/sun/tracing/dtrace,\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjsdt/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(LIBDL),\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libjsdt,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jsdt$(SHARED_LIBRARY_SUFFIX)))
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jsdt$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)jsdt$(SHARED_LIBRARY_SUFFIX)
+			 $(call SET_SHARED_LIBRARY_ORIGIN), \
+		LDFLAGS_SUFFIX_posix:=-ljvm -lc,\
+		LDFLAGS_SUFFIX_windows:=jvm.lib,\
+		REORDER:=$(BUILD_LIBVERIFY_REORDER),\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libverify,\
+		DEBUG_SYMBOLS:=true))
+
+BUILD_LIBRARIES += $(BUILD_LIBVERIFY)
 
 ##########################################################################################
 
-ifdef OPENJDK
-    # TODO: Update awt lib path when awt is converted
-    $(eval $(call SetupNativeCompilation,BUILD_LIBLCMS,\
-                SRC:=$(JDK_TOPDIR)/src/share/native/sun/java2d/cmm/lcms \
-		     $(JDK_TOPDIR)/src/share/native/sun/java2d/,\
-		INCLUDE_FILES:=cmscam02.c cmscgats.c cmscnvrt.c cmserr.c \
-			       cmsgamma.c cmsgmt.c cmsintrp.c cmsio0.c \
-			       cmsio1.c cmslut.c cmsmd5.c cmsmtrx.c \
-			       cmsnamed.c cmsopt.c cmspack.c cmspcs.c \
-			       cmsplugin.c cmsps2.c cmssamp.c cmssm.c \
-			       cmstypes.c cmsvirt.c cmswtpnt.c cmsxform.c \
-			       LCMS.c,\
+LIBJAVA_SRC_DIRS:=$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/java/lang \
+		$(JDK_TOPDIR)/src/share/native/java/lang \
+		$(JDK_TOPDIR)/src/share/native/java/lang/ref \
+		$(JDK_TOPDIR)/src/share/native/java/lang/reflect \
+		$(JDK_TOPDIR)/src/share/native/java/io \
+		$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/java/io \
+		$(JDK_TOPDIR)/src/share/native/java/nio \
+		$(JDK_TOPDIR)/src/share/native/java/security \
+		$(JDK_TOPDIR)/src/share/native/common \
+		$(JDK_TOPDIR)/src/share/native/sun/misc \
+		$(JDK_TOPDIR)/src/share/native/sun/reflect \
+		$(JDK_TOPDIR)/src/share/native/java/sql \
+		$(JDK_TOPDIR)/src/share/native/java/util \
+		$(JDK_TOPDIR)/src/share/native/java/util/concurrent/atomic \
+		$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/common \
+		$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/java/util \
+		$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/security/provider \
+		$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/io
+
+#
+# TODO
+#
+ARCHPROPNAME:=$(LIBARCH)
+ifeq ($(OPENJDK_TARGET_OS)-$(ARCH), solaris-i586)
+     ARCHPROPNAME:=x86
+else ifeq ($(OPENJDK_TARGET_OS)-$(ARCH_DATA_MODEL), windows-32)
+     ARCHPROPNAME:=x86
+else ifeq ($(OPENJDK_TARGET_OS), macosx)
+     ARCHPROPNAME:=$(ARCH)
+endif
+
+LIBJAVA_CFLAGS:=$(foreach dir,$(LIBJAVA_SRC_DIRS),-I$(dir)) \
+		  -I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include \
+                  -DARCHPROPNAME='"$(ARCHPROPNAME)"'
+
+LIBJAVA_CFLAGS += -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
+                  -DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \
+                  -DJDK_MICRO_VERSION='"$(JDK_MICRO_VERSION)"' \
+                  -DJDK_BUILD_NUMBER='"$(JDK_BUILD_NUMBER)"' 
+
+ifneq (,$(JDK_UPDATE_VERSION))
+	LIBJAVA_CFLAGS += -DJDK_UPDATE_VERSION='"$(JDK_UPDATE_VERSION)"'
+endif
+
+LIBJAVA_EXCLUDE_FILES:=check_code.c check_format.c
+
+ifneq ($(OPENJDK_TARGET_OS),macosx)
+	LIBJAVA_EXCLUDE_FILES += java_props_macosx.c
+else
+	BUILD_LIBJAVA_java_props_md.c_CFLAGS:=-x objective-c
+endif
+
+ifeq ($(OPENJDK_TARGET_OS),windows)
+        LIBJAVA_EXCLUDE_FILES += \
+		UNIXProcess_md.c \
+		UnixFileSystem_md.c \
+		FileSystemPreferences.c
+else
+	LIBJAVA_EXCLUDE_FILES += \
+		ProcessImpl_md.c \
+		Win32FileSystem_md.c \
+		WinNTFileSystem_md.c \
+		dirent_md.c \
+		WindowsPreferences.c \
+		sun/security/provider/WinCAPISeedGenerator.c \
+		sun/io/Win32ErrorMode.c
+endif
+
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+    ifneq ($(ARCH), amd64)
+        LIBJAVA_REORDER:=$(JDK_TOPDIR)/makefiles/mapfiles/libjava/reorder-$(ARCH)
+    endif
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA,\
+		LIBRARY:=java,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+		SRC:=$(LIBJAVA_SRC_DIRS),\
+		EXCLUDES:=fdlibm/src zip, \
+		EXCLUDE_FILES:=$(LIBJAVA_EXCLUDE_FILES), \
 		LANG:=C,\
-		CFLAGS:=$(filter-out -xc99=%none,$(CFLAGS_JDKLIB)) $(C_O_FLAG_NORM) \
-			$(SHARED_LIBRARY_FLAGS) \
-			-I$(JDK_TOPDIR)/src/share/native/sun/java2d \
-			-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug,\
-		CFLAGS_solaris:=-xc99=no_lib,\
-		CFLAGS_winapi:=-DCMS_IS_WINDOWS_,\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/liblcms/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB), \
-		LDFLAGS_solaris:=/usr/lib$(ISA_DIR)/libm.so.2,\
-		LDFLAGS_winapi:=awt.lib java.lib,\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
-		LDFLAGS_SUFFIX_posix:=-lawt,\
-		LDFLAGS_SUFFIX_linux:=-lm,\
-		BIN:=$(JDK_OUTPUTDIR)/objs/liblcms,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)lcms$(SHARED_LIBRARY_SUFFIX)))
-
-    BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)lcms$(SHARED_LIBRARY_SUFFIX)
-
-    $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)lcms$(SHARED_LIBRARY_SUFFIX) : \
-	$(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt$(SHARED_LIBRARY_SUFFIX)
-endif
+		OPTIMIZATION:=HIGH, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
+                        $(LIBJAVA_CFLAGS),\
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjava/mapfile-vers, \
+		LDFLAGS:=$(LDFLAGS_JDKLIB) \
+			 $(call SET_SHARED_LIBRARY_ORIGIN), \
+		LDFLAGS_windows:=-export:winFileHandleOpen -export:handleLseek \
+				 $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) jvm.lib \
+				 shell32.lib delayimp.lib /DELAYLOAD:shell32.dll \
+				 advapi32.lib,\
+		LDFLAGS_SUFFIX_posix:=-ljvm -lverify, \
+		LDFLAGS_SUFFIX_solaris:=-lnsl -lsocket -lscf $(LIBDL) $(BUILD_LIBFDLIBM) -lc,\
+		LDFLAGS_SUFFIX_linux:=$(LIBDL) $(BUILD_LIBFDLIBM),\
+		LDFLAGS_SUFFIX_macosx:=$(BUILD_LIBFDLIBM) \
+                                         -framework CoreFoundation \
+                                         -framework Security -framework SystemConfiguration, \
+		REORDER:=$(LIBJAVA_REORDER), \
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjava))
+
+BUILD_LIBRARIES += $(BUILD_LIBJAVA)
+
+$(BUILD_LIBJAVA) : $(LIBJLI_BINARY)
+
+$(BUILD_LIBJAVA) : $(BUILD_LIBVERIFY)
+
+$(BUILD_LIBJAVA) : $(BUILD_LIBFDLIBM)
 
 ##########################################################################################
 
-ifdef OPENJDK
-    BUILD_LIBJPEG_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjpeg/mapfile-vers
-else
-    BUILD_LIBJPEG_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjpeg/mapfile-vers-closed
-    BUILD_LIBJPEG_CLOSED_SRC := $(JDK_TOPDIR)/src/closed/share/native/sun/awt/image/jpeg
-    BUILD_LIBJPEG_CLOSED_INCLUDES := -I$(BUILD_LIBJPEG_CLOSED_SRC)
-endif
-
-BUILD_LIBJPEG_REORDER :=
-ifeq ($(PLATFORM), solaris)
-    ifneq ($(ARCH), amd64)
-        BUILD_LIBJPEG_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libjpeg/reorder-$(ARCH)
-    endif
-endif
-
-# Suppress gcc warnings like "variable might be clobbered by 'longjmp'
-# or 'vfork'": this warning indicates that some variable is placed to
-# a register by optimized compiler and it's value might be lost on longjmp().
-# Recommended way to avoid such warning is to declare the variable as
-# volatile to prevent the optimization. However, this approach does not
-# work because we have to declare all variables as volatile in result.
-#ifndef CROSS_COMPILE_ARCH
-#    CC_43_OR_NEWER := \
-#        $(shell $(EXPR) $(CC_MAJORVER) \> 4 \| \
-#              \( $(CC_MAJORVER) = 4 \& $(CC_MINORVER) \>= 3 \) )
-#    ifeq ($(CC_43_OR_NEWER),1)
-#        BUILD_LIBJPEG_CFLAGS_linux += -Wno-clobbered
-#    endif
-#endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBJPEG,\
-                SRC:=$(BUILD_LIBJPEG_CLOSED_SRC) \
-		     $(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg,\
-		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_HIGHEST) $(SHARED_LIBRARY_FLAGS) \
-			$(BUILD_LIBJPEG_CLOSED_INCLUDES) \
-			-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg,\
-		MAPFILE := $(BUILD_LIBJPEG_MAPFILE), \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_linux:=$(LIBDL),\
-		LDFLAGS_winapi:=java.lib jvm.lib,\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
-		REORDER := $(BUILD_LIBJPEG_REORDER),\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libjpeg,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jpeg$(SHARED_LIBRARY_SUFFIX)))
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jpeg$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)jpeg$(SHARED_LIBRARY_SUFFIX)
-
-##########################################################################################
-
-BUILD_LIBMLIB_SRC := $(JDK_TOPDIR)/src/share/native/sun/awt/medialib
-BUILD_LIBMLIB_CFLAGS := -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES \
+BUILD_LIBMLIB_SRC:=$(JDK_TOPDIR)/src/share/native/sun/awt/medialib
+BUILD_LIBMLIB_CFLAGS:=-D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES \
 			-I$(BUILD_LIBMLIB_SRC) \
-			-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/awt/medialib 
-
-BUILD_LIBMLIB_LDLIBS :=
-BUILD_LIBMLIB_IMAGE_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libmlib_image/mapfile-vers
-
-ifneq ($(PLATFORM), sparc)
+			-I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/awt/medialib 
+
+BUILD_LIBMLIB_LDLIBS:=
+BUILD_LIBMLIB_IMAGE_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libmlib_image/mapfile-vers
+
+ifneq ($(OPENJDK_TARGET_OS), sparc)
+#
+# Yes, this will always be true (until someone makes an OS called sparc)
+#   but this is how it was writtin in old system...keep it like this for now
+#
 	BUILD_LIBMLIB_CFLAGS += -DMLIB_NO_LIBSUNMATH
 endif
 
@@ -518,43 +269,44 @@
 	BUILD_LIBMLIB_CFLAGS += -DMLIB_OS64BIT
 endif
 
-ifneq ($(PLATFORM), windows)
+ifneq ($(OPENJDK_TARGET_OS), windows)
 	BUILD_LIBMLIB_LDLIBS += $(LIBM) $(LIBDL)
 endif
 
 $(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE,\
-		SRC:=$(BUILD_LIBMLIB_SRC),\
+		LIBRARY:=mlib_image,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+                SRC:=$(BUILD_LIBMLIB_SRC),\
 		EXCLUDE_FILES:=awt_ImagingLib.c mlib_c_ImageBlendTable.c,\
 		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_HIGHEST) $(SHARED_LIBRARY_FLAGS) \
+		OPTIMIZATION:=HIGHEST, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
                         $(BUILD_LIBMLIB_CFLAGS),\
-		MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \
+		MAPFILE:=$(BUILD_LIBMLIB_IMAGE_MAPFILE), \
 		LDFLAGS:=$(LDFLAGS_JDKLIB) \
                          $(BUILD_LIBMLIB_LDLIBS) \
 			 $(call SET_SHARED_LIBRARY_ORIGIN),\
 		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
-                LDFLAGS_SUFFIX_posix := -lm,\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libmlib_image,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)mlib_image$(SHARED_LIBRARY_SUFFIX)))
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)mlib_image$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)mlib_image$(SHARED_LIBRARY_SUFFIX)
+                LDFLAGS_SUFFIX_posix:=-lm,\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libmlib_image))
+
+$(BUILD_LIBMLIB_IMAGE) : $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBMLIB_IMAGE)
 
 ##########################################################################################
 
-ifeq ($(PLATFORM),solaris)
+ifeq ($(OPENJDK_TARGET_OS),solaris)
 ifeq ($(ARCH),sparc)
-	BUILD_LIBMLIB_IMAGE_V := 1
+	BUILD_LIBMLIB_IMAGE_V:=1
 else ifeq ($(ARCH), sparcv9)
-	BUILD_LIBMLIB_IMAGE_V := 1
+	BUILD_LIBMLIB_IMAGE_V:=1
 endif
 endif
 
 ifeq ($(BUILD_LIBMLIB_IMAGE_V), 1)
 
-BUILD_LIBMLIB_IMAGE_V_FILES :=  \
+BUILD_LIBMLIB_IMAGE_V_FILES:=\
         mlib_v_ImageLookUp.c \
         mlib_ImageCreate.c \
         mlib_ImageAffine.c \
@@ -648,1185 +400,355 @@
         mlib_ImageUtils.c \
         mlib_ImageDivTables.c
 
-#
-# TODO
-#
-# ASFLAGS += -P
-# INLINE = $(PLATFORM_SRC)/native/sun/awt/medialib/vis_$(ARCH_DATA_MODEL).il
+BUILD_LIBMLIB_V_CFLAGS := $(filter-out -DMLIB_NO_LIBSUNMATH,$(BUILD_LIBMLIB_CFLAGS))
 
 $(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE_V,\
-		SRC:=$(JDK_TOPDIR)/src/share/native/sun/awt/medialib \
+		LIBRARY:=mlib_image_v, \
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+                SRC:=$(JDK_TOPDIR)/src/share/native/sun/awt/medialib \
 		     $(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib,\
 		LANG:=C,\
-		INCLUDE_FILES := $(BUILD_LIBMLIB_IMAGE_V_FILES),\
-		CFLAGS:=$(BUILD_LIBMLIB_CFLAGS) \
-                        $(CFLAGS_JDKLIB) $(C_O_FLAG_HI) $(SHARED_LIBRARY_FLAGS) \
-		MAPFILE := $(JDK_TOPDIR)/$(BUILD_LIBMLIB_IMAGE_MAPFILE), \
+		INCLUDE_FILES:=$(BUILD_LIBMLIB_IMAGE_V_FILES),\
+		OPTIMIZATION:=HIGHEST, \
+		CFLAGS:=-xarch=sparcvis \
+                      $(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib/vis_$(ARCH_DATA_MODEL).il\
+                      $(BUILD_LIBMLIB_V_CFLAGS) \
+                      $(CFLAGS_JDKLIB), \
+		MAPFILE:=$(BUILD_LIBMLIB_IMAGE_MAPFILE), \
 		LDFLAGS:=$(LDFLAGS_JDKLIB) \
                          $(BUILD_LIBMLIB_LDLIBS) \
 			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libmlib_image_v,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)mlib_image_v$(SHARED_LIBRARY_SUFFIX)))
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)mlib_image_v$(SHARED_LIBRARY_SUFFIX)
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libmlib_image_v))
+
+BUILD_LIBRARIES += $(BUILD_LIBMLIB_IMAGE_V)
 
 endif
 
 ##########################################################################################
 
-ifndef OPENJDK
-    FONT_HEADERS := -I$(CLOSED_SRC)/share/native/$(PKGDIR)/t2k
-    BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libfontmanager/mapfile-vers
-    LIBFONTMANAGER_EXCLUDE_FILES += freetypeScaler.c
-else
-    FONT_HEADERS := $(FREETYPE2_CFLAGS)
-    BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libfontmanager/mapfile-vers.openjdk
-    BUILD_LIBFONTMANAGER_FONTLIB := $(FREETYPE2_LIBS)
-endif
-
-ifeq ($(PLATFORM),windows)
-    LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
-				    X11TextRenderer.c
-else
-    LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c \
-				    lcdglyph.c
-endif
-
-BUILD_LIBFONTMANAGER_CFLAGS_COMMON := $(SHARED_LIBRARY_FLAGS) \
-			-DLE_STANDALONE -DHEADLESS \
-			$(FONT_HEADERS) \
-			-I$(JDK_TOPDIR)/src/share/native/sun/font \
-			-I$(JDK_TOPDIR)/src/share/native/sun/font/layout \
-			-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
-			-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/awt \
-			-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-			-I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
-			-I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
-			-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d \
-			-I$(JDK_TOPDIR)/src/share/native/sun/java2d
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER,\
-                SRC:=$(JDK_TOPDIR)/src/share/native/sun/font\
-		     $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/font,\
-		EXCLUDE_FILES:=$(LIBFONTMANAGER_EXCLUDE_FILES) \
-			       AccelGlyphCache.c,\
-		LANG:=C++,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(BUILD_LIBFONTMANAGER_CFLAGS_COMMON),\
-		CXXFLAGS:=$(CXXFLAGS_JDKLIB) $(BUILD_LIBFONTMANAGER_CFLAGS_COMMON),\
-		CFLAGS_posix:=$(C_O_FLAG_HI),\
-		CXXFLAGS_posix:=$(CXX_O_FLAG_HI),\
-		CFLAGS_windows=$(C_O_FLAG_NORM)\
-				-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/windows \
-				-DCC_NOEX, \
-		MAPFILE := $(BUILD_LIBFONTMANAGER_MAPFILE), \
-		LDFLAGS:=$(subst -Xlinker -z -Xlinker defs,,$(LDFLAGS_JDKLIB)) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_windows:=advapi32.lib user32.lib gdi32.lib awt.lib java.lib,\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) \
-				$(BUILD_LIBFONTMANAGER_FONTLIB),\
-		LDFLAGS_SUFFIX_linux:=-lawt $(LIBM) $(LIBCXX),\
-		LDFLAGS_SUFFIX_solaris:=-lawt -lawt_xawt -lc $(LIBM) $(LIBCXX),\
-		LDFLAGS_SUFFIX_macosx:=-lawt $(LIBM) $(LIBCXX) -undefined dynamic_lookup,\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libfontmanager,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fontmanager$(SHARED_LIBRARY_SUFFIX)))
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fontmanager$(SHARED_LIBRARY_SUFFIX) : \
-	$(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt$(SHARED_LIBRARY_SUFFIX)
-
-ifneq (,$(findstring $(PLATFORM),solaris macosx))
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fontmanager$(SHARED_LIBRARY_SUFFIX) : \
-	$(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_xawt$(SHARED_LIBRARY_SUFFIX)
-endif
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)fontmanager$(SHARED_LIBRARY_SUFFIX)
-
-##########################################################################################
-
-ifndef OPENJDK
-
-#    ifeq ($(PLATFORM), linux)
-#        ifeq ("$(CC_VER_MAJOR)", "3")
-#            OTHER_LDLIBS  += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic
-#        endif                           
-#    endif
-#
-# The resulting size of the t2k lib file is (at least on linux) dependant on the order of 
-# the input .o files. Because of this the new build will differ in size to the old build.
-    BUILD_LIBT2K_CFLAGS_COMMON:=-I$(JDK_TOPDIR)/src/share/native/sun/font \
-		            -I$(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k \
-		            -I$(JDK_TOPDIR)/src/closed/share/native/sun/font \
-		            -I$(JDK_TOPDIR)/src/share/share/native/sun/font \
-		            -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/font \
-		            -I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
-		            -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
-		            -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d \
-		            -I$(JDK_TOPDIR)/src/share/native/sun/java2d
-
-    $(eval $(call SetupNativeCompilation,BUILD_LIBT2K,\
-                SRC:=$(JDK_TOPDIR)/src/closed/share/native/sun/font \
-		     $(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k \
-		     $(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k/ttHints,\
-		EXCLUDE_FILES:=orion.c,\
-		LANG:=C++,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(BUILD_LIBT2K_CFLAGS_COMMON) $(C_O_FLAG_HI),\
-		CXXFLAGS:=$(CXXFLAGS_JDKLIB) $(BUILD_LIBT2K_CFLAGS_COMMON) $(CXX_O_FLAG_HI),\
-		CFLAGS_windows=-DCC_NOEX, \
-		CXXFLAGS_windows=-DCC_NOEX, \
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libt2k/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_windows:=user32.lib $(JDK_OUTPUTDIR)/objs/fontmanager.lib,\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
-		LDFLAGS_SUFFIX_macosx:=$(LIBCXX) $(LIBM) -lfontmanager,\
-		LDFLAGS_SUFFIX_linux:=$(LIBCXX) $(LIBM) -lfontmanager,\
-		LDFLAGS_SUFFIX_solaris:=$(LIBCXX) $(LIBM) -lfontmanager -lawt \
-					-lawt_xawt,\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libt2k,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)t2k$(SHARED_LIBRARY_SUFFIX)))
-
-    # t2k is linked against fontmanager
-    $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)t2k$(SHARED_LIBRARY_SUFFIX): \
-	$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fontmanager$(SHARED_LIBRARY_SUFFIX)
-
-    BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)t2k$(SHARED_LIBRARY_SUFFIX)
+LIBAWT_DIRS:=\
+	$(JDK_TOPDIR)/src/share/native/sun/awt \
+	$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/awt \
+	$(JDK_TOPDIR)/src/share/native/sun/awt/image \
+	$(JDK_TOPDIR)/src/share/native/sun/awt/image/gif \
+	$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
+	$(JDK_TOPDIR)/src/share/native/sun/awt/shell \
+	$(JDK_TOPDIR)/src/share/native/sun/awt/medialib \
+	$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
+	$(JDK_TOPDIR)/src/share/native/sun/awt/utility \
+	$(JDK_TOPDIR)/src/share/native/sun/java2d \
+	$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/java2d \
+	$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
+	$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
+	$(JDK_TOPDIR)/src/share/native/sun/awt/image \
+	$(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
+	$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/java2d/opengl \
+	$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/java2d/x11 \
+	$(JDK_TOPDIR)/src/share/native/sun/font \
+	$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/windows \
+	$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/java2d/windows \
+	$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/java2d/d3d
+
+
+LIBAWT_CFLAGS:=-D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES \
+	$(X_CFLAGS) \
+	$(foreach dir,$(LIBAWT_DIRS),-I$(dir))
+
+LIBAWT_FILES:=\
+	gifdecoder.c \
+	imageInitIDs.c \
+	img_globals.c \
+	SurfaceData.c \
+	Region.c \
+	BufImgSurfaceData.c \
+	Disposer.c \
+	Trace.c \
+	GraphicsPrimitiveMgr.c \
+	Blit.c \
+	BlitBg.c \
+	ScaledBlit.c \
+	FillRect.c \
+	FillSpans.c \
+	FillParallelogram.c \
+	DrawParallelogram.c \
+	DrawLine.c \
+	DrawRect.c \
+	DrawPolygons.c \
+	DrawPath.c \
+	FillPath.c \
+	ProcessPath.c \
+	MaskBlit.c \
+	MaskFill.c \
+	TransformHelper.c \
+	AlphaMath.c \
+	AlphaMacros.c \
+	AnyByte.c \
+	ByteBinary1Bit.c \
+	ByteBinary2Bit.c \
+	ByteBinary4Bit.c \
+	ByteIndexed.c \
+	ByteGray.c \
+	Index8Gray.c \
+	Index12Gray.c \
+	AnyShort.c \
+	Ushort555Rgb.c \
+	Ushort565Rgb.c \
+	Ushort4444Argb.c \
+	Ushort555Rgbx.c \
+	UshortGray.c \
+	UshortIndexed.c \
+	Any3Byte.c \
+	ThreeByteBgr.c \
+	AnyInt.c \
+	IntArgb.c \
+	IntArgbPre.c \
+	IntArgbBm.c \
+	IntRgb.c \
+	IntBgr.c \
+	IntRgbx.c \
+	Any4Byte.c \
+	FourByteAbgr.c \
+	FourByteAbgrPre.c \
+	BufferedMaskBlit.c \
+	BufferedRenderPipe.c \
+	ShapeSpanIterator.c \
+	SpanClipRenderer.c \
+	awt_ImageRep.c \
+	awt_ImagingLib.c \
+	awt_Mlib.c \
+	awt_parseImage.c \
+	DataBufferNative.c \
+	dither.c \
+	debug_assert.c \
+	debug_mem.c \
+	debug_trace.c \
+	debug_util.c
+
+ifneq (,$(filter $(OPENJDK_TARGET_OS), solaris linux macosx))
+	LIBAWT_FILES += awt_LoadLibrary.c initIDs.c img_colors.c
 endif
 
-##########################################################################################
-
-#
-# TODO replace with X_FLAGS / X_LIBS
-#   and add them to configure
-#
-OPENWIN_LIB := $(OPENWIN_HOME)/lib
-
-BUILD_LIBJAWT_LIB := $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX)
-
-ifeq ($(PLATFORM), windows)
-    ifeq ($(ARCH_DATA_MODEL), 32)
-        KERNEL32_LIB := kernel32.lib
-    endif
-    $(eval $(call SetupNativeCompilation,BUILD_LIBJAWT,\
-                SRC:=$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/windows,\
-		INCLUDE_FILES:=jawt.cpp,\
-		LANG:=C++,\
-		CFLAGS:=$(CXXFLAGS_JDKLIB) $(CXX_O_FLAG_NORM) \
-			-EHsc -DUNICODE -D_UNICODE \
-			-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/windows \
-		        -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-		        -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
-			-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
-			-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d/windows, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) $(KERNEL32_LIB) \
-			 advapi32.lib awt.lib,\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libjawt,\
-		LIB:=$(BUILD_LIBJAWT_LIB)))
-
-$(BUILD_LIBJAWT_LIB) : $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt$(SHARED_LIBRARY_SUFFIX)
-
-$(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX): $(BUILD_LIBJAWT_LIB)
-	$(ECHO) Copying $(@F)
-	$(CP) $< $@
-
-BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX)
-
-else # PLATFORM not windows
-
-    JAWT_LIBS := -lawt
-    ifndef BUILD_HEADLESS_ONLY
-        JAWT_LIBS += -lawt_xawt
-    else
-        JAWT_LIBS += -lawt_headless
-        HEADLESS_CFLAG += -DHEADLESS
-    endif
-
-    JAWT_FILES := jawt.c
-    ifeq ($(PLATFORM), macosx)
-	JAWT_FILES := jawt.m
-	JAWT_LIBS := -lawt_lwawt
-    endif
-
-    $(eval $(call SetupNativeCompilation,BUILD_LIBJAWT,\
-                SRC:=$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/awt \
-                     $(JDK_TOPDIR)/src/macosx/native/sun/awt,\
-		INCLUDE_FILES:=$(JAWT_FILES),\
-		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM), \
-		CFLAGS_linux:=$(HEADLESS_CFLAG),\
-		CFLAGS_macosx := -I$(JDK_TOPDIR)/src/solaris/native/sun/awt ,\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjawt/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_solaris:=-L$(OPENWIN_HOME)/sfw/lib$(ISA_DIR) -L$(OPENWIN_LIB)$(ISA_DIR),\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(JAWT_LIBS),\
-		LDFLAGS_SUFFIX_solaris:=-lXrender,\
-		LDFLAGS_SUFFIX_macosx:= -framework Cocoa, \
-		BIN:=$(JDK_OUTPUTDIR)/objs/libjawt,\
-		LIB:=$(BUILD_LIBJAWT_LIB)))
-
-ifndef BUILD_HEADLESS_ONLY
-$(BUILD_LIBJAWT_LIB) : $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_xawt$(SHARED_LIBRARY_SUFFIX)
-else
-$(BUILD_LIBJAWT_LIB) : $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX)
+ifeq ($(OPENJDK_TARGET_OS),macosx)
+	LIBAWT_DIRS += $(JDK_TOPDIR)/src/macosx/native/com/apple/resources
+	LIBAWT_FILES += awt_LoadLibrary.c MacOSXResourceBundle.m
+	LIBAWT_CFLAGS += -F/System/Library/Frameworks/JavaVM.framework/Frameworks
+
+	LIBAWT_MacOSXResourceBundle.m_CFLAGS:=-O0
 endif
 
-endif # PLATFORM
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX)
-
-
-##########################################################################################
-
-BUILD_LIBVERIFY_SRC := check_code.c check_format.c
-
-ifeq ($(PLATFORM), solaris)
-	ifneq ($(ARCH), amd64)
-		BUILD_LIBVERIFY_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libverify/reorder-$(ARCH)
+ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
+        LIBAWT_CFLAGS += -DMLIB_ADD_SUFF
+        LIBAWT_CFLAGS += -xarch=sparcvis
+	LIBAWT_CFLAGS += $(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib/vis_$(ARCH_DATA_MODEL).il
+        LIBAWT_CFLAGS += \
+            -I$(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib \
+            -I$(JDK_TOPDIR)/src/solaris/native/sun/java2d/medialib \
+            -I$(JDK_TOPDIR)/src/solaris/native/sun/java2d/loops
+
+	LIBAWT_DIRS += $(JDK_TOPDIR)/src/solaris/native/sun/awt/medialib \
+                       $(JDK_TOPDIR)/src/solaris/native/sun/java2d/loops
+
+	LIBAWT_FILES += \
+                vis_FuncArray.c           \
+                java2d_Mlib.c             \
+                mlib_ImageCreate.c        \
+                mlib_ImageZoom_NN.c       \
+                mlib_ImageCopy_Bit.c      \
+                mlib_sys.c                \
+                mlib_v_ImageClear.c       \
+                mlib_v_ImageClear_f.c     \
+                mlib_v_ImageConstXor.c    \
+                mlib_v_ImageCopy.c        \
+                mlib_v_ImageCopy_f.c      \
+                mlib_v_ImageXor.c         \
+                mlib_v_ImageZoom_NN_f.c   \
+                vis_Interp.c              \
+                vis_AlphaMacros.c         \
+                vis_AlphaMaskBlit.c       \
+                vis_AlphaMaskFill.c       \
+                vis_ByteGray.c            \
+                vis_ByteGray_FromRgb.c    \
+                vis_ByteGray_Mask.c       \
+                vis_ByteIndexed.c         \
+                vis_DrawLine.c            \
+                vis_FourByteAbgr.c        \
+                vis_IntArgb.c             \
+                vis_IntArgbPre.c          \
+                vis_IntArgbPre_Mask.c     \
+                vis_IntBgr.c              \
+                vis_IntRgb.c              \
+                vis_IntRgbx.c             \
+                vis_SrcMaskFill.c         \
+                vis_SrcOverMaskBlit.c     \
+                vis_SrcOverMaskFill.c     \
+                vis_FourByteAbgrPre.c     \
+                vis_GlyphList.c           \
+                vis_GlyphListXor.c        \
+                vis_IntArgbBm.c           \
+                vis_ThreeByteBgr.c        \
+                vis_UshortGray.c          \
+                vis_UshortGray_FromRgb.c  \
+                vis_XorBlit.c             \
+                mlib_v_ImageCopy_blk.s
+
+	ifeq ($(OPENJDK_TARGET_CPU_BITS),64)
+		LIBAWT_ASFLAGS=-P -xarch=v9a
+	else
+		LIBAWT_ASFLAGS=-P -xarch=v8plusa
 	endif
-endif
-
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY,\
-		SRC:=$(JDK_TOPDIR)/src/share/native/common,\
-		INCLUDE_FILES:=$(BUILD_LIBVERIFY_SRC),\
-		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_HI) $(SHARED_LIBRARY_FLAGS),\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libverify/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN), \
-		LDFLAGS_SUFFIX_posix:=-ljvm -lc,\
-		LDFLAGS_SUFFIX_windows:=jvm.lib,\
-		REORDER := $(BUILD_LIBVERIFY_REORDER),\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libverify,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)verify$(SHARED_LIBRARY_SUFFIX)))
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)verify$(SHARED_LIBRARY_SUFFIX)
-
-##########################################################################################
-
-ifndef OPENJDK
-ifneq ($(PLATFORM), macosx)
-
-BUILD_LIBJDBCODBC_DIR     := $(JDK_OUTPUTDIR)/objs/libjdbcodbc
-BUILD_LIBJDBCODBC_NAME    := $(LIBRARY_PREFIX)JdbcOdbc$(SHARED_LIBRARY_SUFFIX)
-BUILD_LIBJDBCODBC_CFLAGS  := 
-BUILD_LIBJDBCODBC_TARGET  := $(JDK_OUTPUTDIR)/objs/$(BUILD_LIBJDBCODBC_NAME)
-BUILD_LIBJDBCODBC_LIBS    :=
-BUILD_LIBJDBCODBC_LDFLAGS :=
-
-ifeq ($(PLATFORM), windows)
-	BUILD_LIBJDBCODBC_LDFLAGS := $(LDFLAGS_JDKLIB)
-	BUILD_LIBJDBCODBC_LIBS += odbc32.lib odbccp32.lib java.lib advapi32.lib
 else
-	BUILD_LIBJDBCODBC_CFLAGS := -DUNIX
-
-#
-# This mimics "current" build system exactly. Link against fake -lodbcinst -lodbc
-#   but...those are linked with the -soname, causing the dependency to be dropped on linux (gnu ld)
-#   but kept with other linker (solaris)
-#
-# IMO very weird behaviour...very weird
-#
-	BUILD_LIBJDBCODBC_LDFLAGS += $(patsubst defs,nodefs,$(LDFLAGS_JDKLIB)) \
-				      -Xlinker -z -Xlinker nodefs
-	BUILD_LIBJDBCODBC_LIBS += -L$(BUILD_LIBJDBCODBC_DIR) -lodbcinst -lodbc
-	BUILD_LIBJDBCODBC_FAKE_LIBS := $(BUILD_LIBJDBCODBC_DIR)/$(LIBRARY_PREFIX)odbcinst$(SHARED_LIBRARY_SUFFIX) \
-                                       $(BUILD_LIBJDBCODBC_DIR)/$(LIBRARY_PREFIX)odbc$(SHARED_LIBRARY_SUFFIX)
-
-	BUILD_LIBJDBCODBC_SONAME := $(call SET_SHARED_LIBRARY_NAME,$(BUILD_LIBJDBCODBC_NAME))
-endif
-
-ifneq ($(PLATFORM), windows)
-
-$(eval $(call SetupNativeCompilation,BUILD_FAKEODBCINST,\
-		SRC:=$(JDK_OUTPUTDIR)/gensrc_c/libjdbcodbc,\
-		INCLUDE_FILES := dummyodbc1.c,\
-		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS),\
-		LDFLAGS:=$(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN) $(BUILD_LIBJDBCODBC_LDFLAGS),\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(BUILD_LIBJDBCODBC_SONAME),\
-		BIN:=$(BUILD_LIBJDBCODBC_DIR),\
-		LIB:=$(BUILD_LIBJDBCODBC_DIR)/$(LIBRARY_PREFIX)odbcinst$(SHARED_LIBRARY_SUFFIX)))
-
-$(eval $(call SetupNativeCompilation,BUILD_FAKEODBC,\
-		SRC:=$(JDK_OUTPUTDIR)/gensrc_c/libjdbcodbc,\
-		INCLUDE_FILES := dummyodbc2.c,\
-		LANG:=C,\
-		CFLAGS:=$(BUILD_LIBJDBCODBC_CFLAGS) $(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS),\
-		LDFLAGS:=$(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN) $(BUILD_LIBJDBCODBC_LDFLAGS),\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(BUILD_LIBJDBCODBC_SONAME),\
-		BIN:=$(BUILD_LIBJDBCODBC_DIR),\
-		LIB:=$(BUILD_LIBJDBCODBC_DIR)/$(LIBRARY_PREFIX)odbc$(SHARED_LIBRARY_SUFFIX)))
-
-$(BUILD_LIBJDBCODBC_FAKE_LIBS) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
-
-$(BUILD_LIBJDBCODBC_TARGET) : $(BUILD_LIBJDBCODBC_FAKE_LIBS)
-
+	LIBAWT_FILES += MapAccelFunc.c
 endif
 
-$(eval $(call SetupNativeCompilation,BUILD_LIBJDBCODBC,\
-		SRC:=$(JDK_TOPDIR)/src/closed/share/classes/sun/jdbc/odbc,\
-		EXCLUDE_FILES := dummyodbc.c,\
-		LANG:=C,\
-		CFLAGS:=$(BUILD_LIBJDBCODBC_CFLAGS) $(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) \
-			$(SHARED_LIBRARY_FLAGS),\
-		LDFLAGS:=$(BUILD_LIBJDBCODBC_LDFLAGS) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN) $(BUILD_LIBJDBCODBC_LIBS),\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(BUILD_LIBJDBCODBC_SONAME),\
-		BIN:=$(BUILD_LIBJDBCODBC_DIR),\
-		LIB:=$(BUILD_LIBJDBCODBC_TARGET)))
-
-$(BUILD_LIBJDBCODBC_TARGET) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)JdbcOdbc$(SHARED_LIBRARY_SUFFIX)
-
-endif
-endif
-
-##########################################################################################
-
-BUILD_LIBINSTRUMENT_SRC     := $(JDK_TOPDIR)/src/share/instrument \
-                               $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/java/io \
-                               $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/instrument
-
-BUILD_LIBINSTRUMENT_FILES   := \
-	EncodingSupport.c \
-	EncodingSupport_md.c \
-	FileSystemSupport_md.c \
-	InstrumentationImplNativeMethods.c \
-	InvocationAdapter.c \
-	JarFacade.c \
-	JPLISAgent.c \
-	JPLISAssert.c \
-	JavaExceptions.c \
-	PathCharsValidator.c \
-	Reentrancy.c \
-	Utilities.c \
-	canonicalize_md.c
-
-BUILD_LIBINSTRUMENT_DIR     := $(JDK_OUTPUTDIR)/objs/libinstrument
-BUILD_LIBINSTRUMENT_NAME    := $(LIBRARY_PREFIX)instrument$(SHARED_LIBRARY_SUFFIX)
-BUILD_LIBINSTRUMENT_CFLAGS  := -I$(JDK_TOPDIR)/src/share/instrument \
-                               -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/instrument \
-                               -I$(JDK_TOPDIR)/src/share/bin
-
-BUILD_LIBINSTRUMENT_TARGET  := $(JDK_OUTPUTDIR)/objs/$(BUILD_LIBINSTRUMENT_NAME)
-BUILD_LIBINSTRUMENT_LDFLAGS :=
-BUILD_LIBINSTRUMENT_LDFLAGS_SUFFIX :=
-
-ifeq ($(PLATFORM), windows)
-  BUILD_LIBINSTRUMENT_LDFLAGS += jli_static.lib java.lib \
-				 -export:Agent_OnAttach
-  # equivalent of strcasecmp is stricmp on Windows
-  BUILD_LIBINSTRUMENT_CFLAGS += -Dstrcasecmp=stricmp
-else
-
-ifneq (,$(findstring $(PLATFORM), macosx))
-	ifneq ($(ARCH), universal)
-		BUILD_LIBINSTRUMENT_LDFLAGS += -Wl,-all_load
-	endif
-
-	BUILD_LIBINSTRUMENT_LDFLAGS += $(JDK_OUTPUTDIR)/objs/libjli_static.a
-	BUILD_LIBINSTRUMENT_LDFLAGS += -liconv
-	BUILD_LIBINSTRUMENT_LDFLAGS += -framework Cocoa -framework Security -framework ApplicationServices
-	BUILD_LIBINSTRUMENT_LDFLAGS += $(LIBZ)
-else
-	BUILD_LIBINSTRUMENT_LDFLAGS_SUFFIX += -ljli $(LIBDL)
-endif
+ifneq ($(OPENJDK_TARGET_OS),solaris)
+	LIBAWT_CFLAGS += -DMLIB_NO_LIBSUNMATH
 endif
 
-$(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT,\
-		SRC:=$(BUILD_LIBINSTRUMENT_SRC),\
-		INCLUDE_FILES:=$(BUILD_LIBINSTRUMENT_FILES),\
-		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
-                        $(BUILD_LIBINSTRUMENT_CFLAGS),\
-		CFLAGS_debug := -DJPLIS_LOGGING,\
-		CFLAGS_release := -DNO_JPLIS_LOGGING,\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libinstrument/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN)\
-			 $(call SET_SHARED_LIBRARY_ORIGIN,jli) \
-                         $(BUILD_LIBINSTRUMENT_LDFLAGS),\
-		LDFLAGS_SUFFIX:=$(LIBZ) $(BUILD_LIBINSTRUMENT_LDFLAGS_SUFFIX),\
-		BIN:=$(BUILD_LIBINSTRUMENT_DIR),\
-		LIB:=$(BUILD_LIBINSTRUMENT_TARGET)))
-
-$(BUILD_LIBINSTRUMENT_TARGET) : $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jli_static$(STATIC_LIBRARY_SUFFIX)
-$(BUILD_LIBINSTRUMENT_TARGET) : $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX)
-$(BUILD_LIBINSTRUMENT_TARGET) : $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX)
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(BUILD_LIBINSTRUMENT_NAME)
-
-##########################################################################################
-
-BUILD_LIBMANAGEMENT_SRC := $(JDK_TOPDIR)/src/share/native/sun/management \
-                           $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/management \
-                           $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/com/sun/management
-
-BUILD_LIBMANAGEMENT_EXCLUDES :=
-
-BUILD_LIBMANAGEMENT_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/management
-
-ifneq ($(PLATFORM), windows)
-	BUILD_LIBMANAGEMENT_EXCLUDES += OperatingSystem_md.c
-else
-	BUILD_LIBMANAGEMENT_EXCLUDES += UnixOperatingSystem_md.c
-endif
-
-ifneq ($(PLATFORM),solaris)
-	BUILD_LIBMANAGEMENT_EXCLUDES += SolarisOperatingSystem.c
-endif
-
-ifneq ($(PLATFORM),linux)
-	BUILD_LIBMANAGEMENT_EXCLUDES += LinuxOperatingSystem.c
-endif
-
-ifneq ($(PLATFORM),macosx)
-	BUILD_LIBMANAGEMENT_EXCLUDES += MacosxOperatingSystem.c
+LIBAWT_LANG:=C
+
+ifeq ($(OPENJDK_TARGET_OS),windows)
+	LIBAWT_FILES += AccelGlyphCache.c \
+			ShaderList.c \
+			CmdIDList.cpp \
+			Hashtable.cpp \
+			GDIHashtable.cpp \
+			Devices.cpp \
+			ObjectList.cpp \
+			GDIBlitLoops.cpp \
+			GDIRenderer.cpp \
+			GDIWindowSurfaceData.cpp \
+			WindowsFlags.cpp \
+			WPrinterJob.cpp \
+			awt_%.cpp \
+			D3DBlitLoops.cpp \
+			D3DBufImgOps.cpp \
+			D3DContext.cpp \
+			D3DGlyphCache.cpp \
+			D3DGraphicsDevice.cpp \
+			D3DMaskBlit.cpp \
+			D3DMaskCache.cpp \
+			D3DMaskFill.cpp \
+			D3DPipelineManager.cpp \
+			D3DPaints.cpp \
+			D3DRenderer.cpp \
+			D3DRenderQueue.cpp \
+			D3DResourceManager.cpp \
+			D3DSurfaceData.cpp \
+			D3DTextRenderer.cpp \
+			D3DVertexCacher.cpp \
+			ShellFolder2.cpp \
+			ThemeReader.cpp \
+			ComCtl32Util.cpp \
+			DllUtil.cpp \
+			initIDs.cpp \
+			MouseInfo.cpp \
+			rect.c
+	LIBAWT_LANG:=C++
+	LIBAWT_CFLAGS += $(GX_OPTION) -DUNICODE -D_UNICODE
+	ifeq ($(ARCH_DATA_MODEL), 64)
+		LIBAWT_CFLAGS += -DMLIB_OS64BIT
+	endif
+
+	ifdef OPENJDK
+		LIBAWT_RC_FLAGS:=-i "$(JDK_TOPDIR)/src/windows/resource/icons"
+	else
+		LIBAWT_RC_FLAGS:=-i "$(JDK_TOPDIR)/src/closed/windows/native/sun/windows"
+	endif
+	LIBAWT_VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/native/sun/windows/awt.rc
 endif
 
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT,\
-		SRC:=$(BUILD_LIBMANAGEMENT_SRC),\
-		EXCLUDE_FILES:=$(BUILD_LIBMANAGEMENT_EXCLUDES),\
-		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_HI) $(SHARED_LIBRARY_FLAGS) $(BUILD_LIBMANAGEMENT_CFLAGS),\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libmanagement/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_windows := java.lib jvm.lib advapi32.lib psapi.lib,\
-		LDFLAGS_solaris := -lkstat,\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libmanagement,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)management$(SHARED_LIBRARY_SUFFIX)))
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)management$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)management$(SHARED_LIBRARY_SUFFIX)
-
-##########################################################################################
-
-BUILD_LIBHPROF_SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/hprof $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/demo/jvmti/hprof
-BUILD_LIBHPROF_CFLAGS := -I$(JDK_TOPDIR)/src/share/demo/jvmti/hprof \
-                         -I$(JDK_TOPDIR)/src/share/npt \
-                         -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/npt \
-                         -I$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo
-
-BUILD_LIBHPROF_LDFLAGS :=
-
-ifeq ($(PLATFORM),solaris)
-     BUILD_LIBHPROF_LDFLAGS += -lsocket -lnsl
+ifeq ($(MILESTONE), internal)
+	LIBAWT_CFLAGS += -DINTERNAL_BUILD
 endif
 
-ifneq ($(PLATFORM),windows)
-     BUILD_LIBHPROF_LDFLAGS += $(LIBDL)
+LIBAWT_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libawt/mapfile-vers
+ifeq ($(OPENJDK_TARGET_OS),linux)
+	LIBAWT_MAPFILE:=
 endif
 
-$(eval $(call SetupNativeCompilation,BUILD_LIBHPROF,\
-		SRC:=$(BUILD_LIBHPROF_SRC),\
-		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_HIGHEST) $(SHARED_LIBRARY_FLAGS) \
-                         $(BUILD_LIBHPROF_CFLAGS),\
-		CFLAGS_debug := -DHPROF_LOGGING,\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libhprof/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_windows:=wsock32.lib winmm.lib advapi32.lib,\
-		LDFLAGS_SUFFIX:=$(BUILD_LIBHPROF_LDFLAGS),\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libhprof,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)hprof$(SHARED_LIBRARY_SUFFIX)))
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)hprof$(SHARED_LIBRARY_SUFFIX)
-
-##########################################################################################
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA_CRW_DEMO,\
-		SRC:=$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo,\
-		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
-                        -I$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo,\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjava_crw_demo/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX:=,\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libjava_crw_demo,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)java_crw_demo$(SHARED_LIBRARY_SUFFIX)))
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java_crw_demo$(SHARED_LIBRARY_SUFFIX)
-
-##########################################################################################
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBNPT,\
-		SRC:=$(JDK_TOPDIR)/src/share/npt $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/npt,\
-		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
-                        -I$(JDK_TOPDIR)/src/share/npt \
-                        -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/npt,\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnpt/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_macosx := -liconv,\
-		LDFLAGS_SUFFIX_windows := -export:nptInitialize -export:nptTerminate,\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libnpt,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)npt$(SHARED_LIBRARY_SUFFIX)))
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)npt$(SHARED_LIBRARY_SUFFIX)
+$(eval $(call SetupNativeCompilation,BUILD_LIBAWT,\
+		LIBRARY:=awt,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+		SRC:=$(LIBAWT_DIRS),\
+		INCLUDE_FILES:=$(LIBAWT_FILES),\
+		LANG:=$(LIBAWT_LANG),\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) $(LIBAWT_CFLAGS),\
+		ASFLAGS:=$(LIBAWT_ASFLAGS),\
+		MAPFILE:=$(LIBAWT_MAPFILE), \
+		LDFLAGS:=$(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN),\
+		LDFLAGS_windows:=advapi32.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
+				 imm32.lib ole32.lib uuid.lib shell32.lib \
+				 comdlg32.lib winmm.lib comctl32.lib \
+				 shlwapi.lib delayimp.lib $(WIN_JAVA_LIB) jvm.lib \
+				 /DELAYLOAD:user32.dll /DELAYLOAD:gdi32.dll \
+				 /DELAYLOAD:shell32.dll /DELAYLOAD:winmm.dll \
+				 /DELAYLOAD:winspool.drv /DELAYLOAD:imm32.dll \
+				 /DELAYLOAD:ole32.dll /DELAYLOAD:comdlg32.dll \
+				 /DELAYLOAD:comctl32.dll /DELAYLOAD:shlwapi.dll,\
+		LDFLAGS_macosx:=-lmlib_image \
+                                 -framework Cocoa \
+				 -framework OpenGL \
+				 -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+				 -framework JavaNativeFoundation \
+				 -framework JavaRuntimeSupport \
+				 -framework ApplicationServices \
+				 -framework AudioToolbox,\
+		LDFLAGS_solaris:=-R/usr/dt/lib$(ISA_DIR) -R$(OPENWIN_LIB)$(ISA_DIR),\
+		LDFLAGS_SUFFIX_posix:=-ljvm $(LIBM) -ljava $(LIBDL),\
+		VERSIONINFO_RESOURCE:=$(LIBAWT_VERSIONINFO_RESOURCE),\
+		RC_FLAGS:=$(RC_FLAGS) $(LIBAWT_RC_FLAGS) \
+			  /D "JDK_FNAME=awt.dll" \
+			  /D "JDK_INTERNAL_NAME=awt" \
+			  /D "JDK_FTYPE=0x2L",\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libawt))
+
+$(BUILD_LIBAWT) : $(BUILD_LIBJAVA)
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+$(BUILD_LIBAWT) : $(BUILD_LIBMLIB_IMAGE)
+endif
+
+BUILD_LIBRARIES += $(BUILD_LIBAWT)
 
 ##########################################################################################
 
-BUILD_LIBNIO_SRC := \
-        $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/java/nio \
-	$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/nio/ch \
-	$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/nio/fs
-
-BUILD_LIBNIO_CFLAGS := \
-	-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch \
-	-I$(JDK_TOPDIR)/src/share/native/java/io \
-	-I$(JDK_TOPDIR)/src/share/native/java/net \
-        -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/java/net
-
-BUILD_LIBNIO_FILES := \
-        DatagramChannelImpl.c \
-        DatagramDispatcher.c \
-	FileChannelImpl.c \
-	FileDispatcherImpl.c \
-	FileKey.c \
-	IOUtil.c \
-        MappedByteBuffer.c \
-	Net.c \
-	ServerSocketChannelImpl.c \
-	SocketChannelImpl.c \
-	SocketDispatcher.c
-
-ifeq ($(PLATFORM), windows)
-	BUILD_LIBNIO_FILES += \
-		Iocp.c \
-		RegistryFileTypeDetector.c \
-		WindowsAsynchronousFileChannelImpl.c \
-		WindowsAsynchronousServerSocketChannelImpl.c \
-		WindowsAsynchronousSocketChannelImpl.c \
-		WindowsNativeDispatcher.c \
-	        WindowsSelectorImpl.c
-endif
-
-ifeq ($(PLATFORM), linux)
-	BUILD_LIBNIO_LDFLAGS_SUFFIX := -lpthread $(LIBDL)
-	BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnio/mapfile-linux
-	BUILD_LIBNIO_FILES += \
-		EPoll.c \
-		EPollArrayWrapper.c \
-		EPollPort.c \
-		InheritedChannel.c \
-		NativeThread.c \
-	        PollArrayWrapper.c \
-		UnixAsynchronousServerSocketChannelImpl.c \
-		UnixAsynchronousSocketChannelImpl.c \
-		GnomeFileTypeDetector.c \
-		LinuxNativeDispatcher.c \
-		LinuxWatchService.c \
-		UnixCopyFile.c \
-		UnixNativeDispatcher.c
-endif
-
-ifeq ($(PLATFORM), macosx)
-	BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnio/mapfile-bsd
-	BUILD_LIBNIO_SRC += $(JDK_TOPDIR)/src/macosx/native/sun/nio/ch
-	BUILD_LIBNIO_FILES += \
-		InheritedChannel.c \
-		NativeThread.c \
-	        PollArrayWrapper.c \
-		UnixAsynchronousServerSocketChannelImpl.c \
-		UnixAsynchronousSocketChannelImpl.c \
-		GnomeFileTypeDetector.c \
-		BsdNativeDispatcher.c \
-		UnixCopyFile.c \
-		UnixNativeDispatcher.c \
-		KQueue.c \
-		KQueuePort.c \
-		KQueueArrayWrapper.c
-endif
-
-ifeq ($(PLATFORM), solaris)
-	BUILD_LIBNIO_LDFLAGS_SUFFIX := $(LIBDL)
-	BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnio/mapfile-solaris
-	BUILD_LIBNIO_FILES += \
-		DevPollArrayWrapper.c \
-		InheritedChannel.c \
-		NativeThread.c \
-		PollArrayWrapper.c \
-		SolarisEventPort.c \
-		UnixAsynchronousServerSocketChannelImpl.c \
-		UnixAsynchronousSocketChannelImpl.c \
-		GnomeFileTypeDetector.c \
-		SolarisNativeDispatcher.c \
-		SolarisWatchService.c \
-		UnixCopyFile.c \
-		UnixNativeDispatcher.c
-endif
-
-BUILD_LIBNIO_LDFLAGS :=
-ifeq ($(PLATFORM),windows)
-	BUILD_LIBNIO_LDFLAGS += \
-		java.lib net.lib advapi32.lib jvm.lib ws2_32.lib\
-		$(JDK_OUTPUTDIR)/objs/libjava/io_util.obj \
-		$(JDK_OUTPUTDIR)/objs/libjava/FileDescriptor_md.obj
-endif
-
-ifeq ($(PLATFORM), linux)
-	BUILD_LIBNIO_LDFLAGS_SUFFIX += -ljava -lnet -lpthread $(LIBDL)
-endif
-ifeq ($(PLATFORM), macosx)
-	BUILD_LIBNIO_LDFLAGS_SUFFIX += -ljava -lnet -pthread
-endif
-
-ifeq ($(PLATFORM), solaris)
-	BUILD_LIBNIO_LDFLAGS_SUFFIX += $(JVMLIB) $(LIBSOCKET) -lposix4 $(LIBDL) -lsendfile \
-				       -ljava -lnet
-endif # PLATFORM
-
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBNIO,\
-		SRC:=$(BUILD_LIBNIO_SRC),\
-		INCLUDE_FILES := $(BUILD_LIBNIO_FILES), \
-		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_HI) $(SHARED_LIBRARY_FLAGS) \
-                        $(BUILD_LIBNIO_CFLAGS),\
-		MAPFILE := $(BUILD_LIBNIO_MAPFILE), \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) $(BUILD_LIBNIO_LDFLAGS) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(BUILD_LIBNIO_LDFLAGS_SUFFIX),\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libnio,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)nio$(SHARED_LIBRARY_SUFFIX)))
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)nio$(SHARED_LIBRARY_SUFFIX)
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)nio$(SHARED_LIBRARY_SUFFIX) : $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)net$(SHARED_LIBRARY_SUFFIX) $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
-
-
-##########################################################################################
-
-LIBNET_SRC_DIRS := $(JDK_TOPDIR)/src/share/native/java/net \
-                   $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/java/net \
-                   $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/net/dns \
-                   $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/net/www/protocol/http/ntlm \
-                   $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/net/sdp \
-                   $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/net/spi
-
-LIBNET_CFLAGS := $(foreach dir,$(LIBNET_SRC_DIRS),-I$(dir))
-
-LIBNET_EXCLUDE_FILES:=
-ifneq ($(PLATFORM),linux)
-	LIBNET_EXCLUDE_FILES += linux_close.c
-endif
-
-ifneq ($(PLATFORM),macosx)
-	LIBNET_EXCLUDE_FILES += bsd_close.c
-endif
-
-ifeq ($(PLATFORM),windows)
-	LIBNET_EXCLUDE_FILES += PlainSocketImpl.c PlainDatagramSocketImpl.c SdpSupport.c
-else
-	LIBNET_EXCLUDE_FILES += TwoStacksPlainSocketImpl.c DualStackPlainSocketImpl.c \
-                                TwoStacksPlainDatagramSocketImpl.c DualStackPlainDatagramSocketImpl.c \
-				NTLMAuthSequence.c NetworkInterface_winXP.c
-endif
-
-LIBNET_LDFLAGS_SUFFIX :=
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBNET,\
-		SRC:=$(LIBNET_SRC_DIRS),\
-		EXCLUDE_FILES := $(LIBNET_EXCLUDE_FILES), \
-		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
-                        $(LIBNET_CFLAGS),\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnet/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(LIBNET_LDFLAGS_SUFFIX),\
-		LDFLAGS_SUFFIX_solaris := -lnsl -lsocket $(LIBDL) ,\
-		LDFLAGS_SUFFIX_linux := $(LIBDL) -lpthread ,\
-		LDFLAGS_SUFFIX_windows := ws2_32.lib $(JVMLIB) secur32.lib iphlpapi.lib \
-					  delayimp.lib java.lib jvm.lib advapi32.lib \
-                                          /DELAYLOAD:secur32.dll /DELAYLOAD:iphlpapi.dll, \
-		BIN:=$(JDK_OUTPUTDIR)/objs/libnet,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)net$(SHARED_LIBRARY_SUFFIX)))
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)net$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)net$(SHARED_LIBRARY_SUFFIX)
-
-$(JDK_OUTPUTDIR)/lib/net.properties: $(JDK_TOPDIR)/src/share/lib/net.properties
-	$(ECHO) Copying $(@F)
-	$(MKDIR) -p $(@D)
-	$(CP) $< $@
-
-COPY_FILES += $(JDK_OUTPUTDIR)/lib/net.properties
-
-ifeq ($(PLATFORM), solaris)
-$(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template : $(JDK_TOPDIR)/src/${LEGACY_HOST_OS_API}/lib/sdp/sdp.conf.template
-	$(ECHO) Copying $(@F)
-	$(MKDIR) -p $(@D)
-	$(CP) $< $@
-
-COPY_FILES += $(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template
-endif
-
-##########################################################################################
-
-LIBJAVA_SRC_DIRS := $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/java/lang \
-		$(JDK_TOPDIR)/src/share/native/java/lang \
-		$(JDK_TOPDIR)/src/share/native/java/lang/ref \
-		$(JDK_TOPDIR)/src/share/native/java/lang/reflect \
-		$(JDK_TOPDIR)/src/share/native/java/io \
-		$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/java/io \
-		$(JDK_TOPDIR)/src/share/native/java/nio \
-		$(JDK_TOPDIR)/src/share/native/java/security \
-		$(JDK_TOPDIR)/src/share/native/common \
-		$(JDK_TOPDIR)/src/share/native/sun/misc \
-		$(JDK_TOPDIR)/src/share/native/sun/reflect \
-		$(JDK_TOPDIR)/src/share/native/java/sql \
-		$(JDK_TOPDIR)/src/share/native/java/util \
-		$(JDK_TOPDIR)/src/share/native/java/util/concurrent/atomic \
-		$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/common \
-		$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/java/util \
-		$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/provider \
-		$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/io
-
-LIBJAVA_CFLAGS := $(foreach dir,$(LIBJAVA_SRC_DIRS),-I$(dir)) \
-		  -I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include \
-                  -DARCHPROPNAME='"$(ARCH)"'
-
-LIBJAVA_CFLAGS += -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
-                  -DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \
-                  -DJDK_MICRO_VERSION='"$(JDK_MICRO_VERSION)"' \
-                  -DJDK_BUILD_NUMBER='"$(JDK_BUILD_NUMBER)"' 
-
-ifneq (,$(JDK_UPDATE_VERSION))
-	LIBJAVA_CFLAGS += -DJDK_UPDATE_VERSION='"$(JDK_UPDATE_VERSION)"'
-endif
-
-LIBJAVA_EXCLUDE_FILES:= check_code.c check_format.c
-
-ifneq ($(PLATFORM),macosx)
-	LIBJAVA_EXCLUDE_FILES += java_props_macosx.c
-else
-	BUILD_LIBJAVA_java_props_md.c_CFLAGS := -x objective-c
-endif
-
-ifeq ($(PLATFORM),windows)
-        LIBJAVA_EXCLUDE_FILES += \
-		UNIXProcess_md.c \
-		UnixFileSystem_md.c \
-		FileSystemPreferences.c
-else
-	LIBJAVA_EXCLUDE_FILES += \
-		ProcessImpl_md.c \
-		Win32FileSystem_md.c \
-		WinNTFileSystem_md.c \
-		dirent_md.c \
-		WindowsPreferences.c \
-		sun/security/provider/WinCAPISeedGenerator.c \
-		sun/io/Win32ErrorMode.c
-endif
-
-ifeq ($(PLATFORM), solaris)
-    ifneq ($(ARCH), amd64)
-        LIBJAVA_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libjava/reorder-$(ARCH)
-    endif
-endif
-
-LIBJAVA_FDLIBM := $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX)
-LIBJAVA_VERIFY := $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)verify$(STATIC_LIBRARY_SUFFIX)
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA,\
-		SRC:=$(LIBJAVA_SRC_DIRS),\
-		EXCLUDES := fdlibm/src zip, \
-		EXCLUDE_FILES := $(LIBJAVA_EXCLUDE_FILES), \
-		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_HI) $(SHARED_LIBRARY_FLAGS) \
-                        $(LIBJAVA_CFLAGS),\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjava/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN), \
-		LDFLAGS_windows:=-export:winFileHandleOpen -export:handleLseek \
-				 $(LIBJAVA_FDLIBM) $(LIBJAVA_VERIFY) jvm.lib \
-				 shell32.lib delayimp.lib /DELAYLOAD:shell32.dll \
-				 advapi32.lib,\
-		LDFLAGS_SUFFIX_posix:=-ljvm -lverify, \
-		LDFLAGS_SUFFIX_solaris := -lnsl -lsocket -lscf $(LIBDL) $(LIBJAVA_FDLIBM) -lc,\
-		LDFLAGS_SUFFIX_linux := $(LIBDL) $(LIBJAVA_FDLIBM),\
-		LDFLAGS_SUFFIX_macosx := $(LIBJAVA_FDLIBM) \
-                                         -framework CoreFoundation \
-                                         -framework Security -framework SystemConfiguration, \
-		REORDER := $(LIBJAVA_REORDER), \
-		BIN:=$(JDK_OUTPUTDIR)/objs/libjava,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX)))
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX)
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) : $(LIBJLI_BINARY)
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)verify$(SHARED_LIBRARY_SUFFIX)
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) : $(LIBJAVA_FDLIBM)
-
-##########################################################################################
-
-BUILD_LIBJLI_SRC_DIRS := $(JDK_TOPDIR)/src/share/bin $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/bin
-BUILD_LIBJLI_CFLAGS := $(foreach dir,$(BUILD_LIBJLI_SRC_DIRS),-I$(dir))
-
-BUILD_LIBJLI_FILES := \
-	java.c \
-	splashscreen_stubs.c \
-	parse_manifest.c \
-	version_comp.c \
-	wildcard.c \
-	jli_util.c
-
-ifeq ($(JVM_VARIANT_ZERO), true)
-	ERGO_FAMILY := zero
-else # !ZERO_BUILD
-	ifneq (,$(findstring $(ARCH), amd64 x86_64))
-		ERGO_FAMILY := i586
-	else # !X86 FAMILY
-		ERGO_FAMILY := $(ARCH)
-	endif #ARCH_FAMILY
-endif # ZERO_BUILD
-
-ifeq ($(PLATFORM), macosx)
-	BUILD_LIBJLI_CFLAGS += -I$(JDK_TOPDIR)/src/macosx/bin
-	BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/bin
-	BUILD_LIBJLI_FILES += java_md_common.c java_md_macosx.c
-
-	BUILD_LIBJLI_java_md_macosx.c_CFLAGS := -x objective-c
-	BUILD_LIBJLI_A_java_md_macosx.c_CFLAGS := -x objective-c
-endif
-
-ifeq ($(PLATFORM), windows)
-	BUILD_LIBJLI_FILES += java_md.c
-else ifneq ($(PLATFORM), macosx)
-
-	BUILD_LIBJLI_FILES += java_md_common.c
-	BUILD_LIBJLI_FILES += java_md_solinux.c ergo.c 
-
-	ERGO_ARCH_FILE = ergo_$(ERGO_FAMILY).c
-
-        # if the architecture specific ergo file exists then
-        # use it, else use the generic definitions from ergo.c
-	ifneq ($(wildcard $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/bin/$(ERGO_ARCH_FILE)),)
-		BUILD_LIBJLI_FILES += $(ERGO_ARCH_FILE)
-	else # !ERGO_ARCH_FILE
-		BUILD_LIBJLI_CFLAGS += -DUSE_GENERIC_ERGO
-	endif # ERGO_ARCH_FILE
-endif #WINDOWS
-
-# Names of arch directories
-BUILD_LIBJLI_CFLAGS += -DLIBARCHNAME='"$(LIBARCH)"'
-ifeq ($(PLATFORM), solaris)
-	ifneq (,$(findstring $(ARCH),sparc))
-		BUILD_LIBJLI_CFLAGS += -DLIBARCH32NAME='"sparc"'
-		BUILD_LIBJLI_CFLAGS += -DLIBARCH64NAME='"sparcv9"'
-	else
-		BUILD_LIBJLI_CFLAGS += -DLIBARCH32NAME='"i386"'
-		BUILD_LIBJLI_CFLAGS += -DLIBARCH64NAME='"amd64"'
-	endif
-endif # PLATFORM
-
-ifeq ($(PLATFORM), macosx)
-	BUILD_LIBJLI_CFLAGS += -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
-endif
-
-ifneq ($(USE_EXTERNAL_LIBZ),true)
-	BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
-	BUILD_LIBJLI_CFLAGS += $(LIBZ_INCLUDE)
-	BUILD_LIBJLI_FILES += \
-		inflate.c \
-		inftrees.c \
-		inffast.c \
-		zadler32.c \
-		zcrc32.c \
-		zutil.c
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBJLI,\
-		SRC:=$(BUILD_LIBJLI_SRC_DIRS),\
-		INCLUDE_FILES := $(BUILD_LIBJLI_FILES),\
-		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_HI) $(SHARED_LIBRARY_FLAGS) $(BUILD_LIBJLI_CFLAGS),\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjli/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX := $(LIBZ),\
-		LDFLAGS_SUFFIX_posix := $(LIBDL) -lc,\
-		LDFLAGS_SUFFIX_linux := -lpthread,\
-		LDFLAGS_SUFFIX_windows := \
-			-export:JLI_Launch \
-			-export:JLI_ManifestIterate \
-			-export:JLI_SetTraceLauncher \
-			-export:JLI_ReportErrorMessage \
-			-export:JLI_ReportErrorMessageSys \
-			-export:JLI_ReportMessage \
-			-export:JLI_ReportExceptionDescription \
-			advapi32.lib \
-			comctl32.lib \
-			user32.lib,\
-		LDFLAGS_SUFFIX_macosx := -framework Cocoa -framework Security -framework ApplicationServices, \
-		BIN:=$(JDK_OUTPUTDIR)/objs/libjli,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX)))
-
-ifeq ($(HOST_OS), windows)
-    LIBJLI_BINARY := $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX)
-else
-    LIBJLI_BINARY := $(INSTALL_LIBRARIES_HERE)/jli/$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX)
-
-    $(LIBJLI_BINARY) : $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX)
-	$(MKDIR) -p $(@D)
-	$(ECHO) Copying $(@F)
-	$(CP) $< $@
-endif
-BUILD_LIBRARIES += $(LIBJLI_BINARY)
-
-# On windows, the static library has the same suffix as the import library created by
-# with the shared library, so the static library is given a different name. No harm
-# in doing it for all platform to reduce complexity.
-ifneq ($(HOST_OS),macosx)
-    $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC,\
-		SRC:=$(BUILD_LIBJLI_SRC_DIRS),\
-		INCLUDE_FILES := $(BUILD_LIBJLI_FILES),\
-		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_HI) $(STATIC_LIBRARY_FLAGS) $(BUILD_LIBJLI_CFLAGS),\
-		ARFLAGS:=$(ARFLAGS),\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libjli_static,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jli_static$(STATIC_LIBRARY_SUFFIX)))
-else
-    #
-    # On macosx they do partial (incremental) linking of fdlibm
-    #   code it here...rather than add support to NativeCompilation
-    #   as this is first time I see it
-    $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_A,\
-		SRC:=$(BUILD_LIBJLI_SRC_DIRS),\
-		INCLUDE_FILES := $(BUILD_LIBJLI_FILES),\
-		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_HI) $(BUILD_LIBJLI_CFLAGS),\
-		LDFLAGS := -nostdlib -r,\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libjli_static,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jli_static$(STATIC_LIBRARY_SUFFIX)))
-endif
-
-BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jli_static$(STATIC_LIBRARY_SUFFIX)
-
-##########################################################################################
-
-ifndef OPENJDK
-ifndef JAVASE_EMBEDDED
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBJFR,\
-		SRC:=$(JDK_TOPDIR)/src/closed/share/native/oracle/jfr,\
-		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
-                        -I$(JDK_TOPDIR)/src/closed/share/javavm/export, \
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjfr/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libjfr,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jfr$(SHARED_LIBRARY_SUFFIX)))
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)jfr$(SHARED_LIBRARY_SUFFIX)
-
-endif
-endif
-
-##########################################################################################
-
-ifndef OPENJDK
-
-BUILD_LIBKCMS_EXCLUDE_FILES :=
-ifeq ($(PLATFORM),windows)
-	BUILD_LIBKCMS_EXCLUDE_FILES += ukcpmgr.c unixmem.c
-else
-	BUILD_LIBKCMS_EXCLUDE_FILES += cmmdll.c registry.c spxffile.c sysinfo.c winmem.c wkcpmgr.c
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBKCMS,\
-		SRC:=$(JDK_TOPDIR)/src/closed/share/native/sun/java2d/cmm/kcms,\
-		LANG:=C,\
-		EXCLUDE_FILES := $(BUILD_LIBKCMS_EXCLUDE_FILES),\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
-                        -DJAVACMM -DFUT_CALC_EX -DNO_FUT_GCONST,\
-		CFLAGS_linux := -Wno-missing-field-initializers,\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libkcms/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX_linux := -lpthread,\
-		LDFLAGS_SUFFIX_windows := java.lib advapi32.lib user32.lib version.lib, \
-		LDFLAGS_SUFFIX:= -lm $(LDFLAGS_JDKLIB_SUFFIX),\
-		VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/closed/share/native/sun/java2d/cmm/kcms/cmm.rc,\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libkcms,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)kcms$(SHARED_LIBRARY_SUFFIX)))
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)kcms$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)kcms$(SHARED_LIBRARY_SUFFIX)
-
-endif
-
-##########################################################################################
-
-ifndef OPENJDK
-ifeq ($(PLATFORM), solaris)
-ifneq ($(ARCH), amd64)
-
-ifeq ($(shell if test "$(OS_VERSION_MAJOR)" -eq 5 -a "$(OS_VERSION_MINOR)" -le 10; then $(ECHO) ok; fi), ok)
-
-SUNWJDGA_MAPFILE :=
-ifneq (,$(findstring $(ARCH),sparc))
-	SUNWJDGA_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjdga/mapfile-vers
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBSUNWJDGA, \
-		SRC:=$(JDK_TOPDIR)/src/solaris/native/sun/jdga, \
-		LANG:=C, \
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
-			-I$(JDK_TOPDIR)/src/share/javavm/export \
-			-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/javavm/export \
-			-I$(OPENWIN_HOME)/include, \
-		MAPFILE := $(SUNWJDGA_MAPFILE), \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN), \
-		LDFLAGS_SUFFIX:= -L$(OPENWIN_LIB)$(ISA_DIR) -R$(OPENWIN_LIB)$(ISA_DIR) -ldga -lX11 $(LIBDL) -lc, \
-		BIN:=$(JDK_OUTPUTDIR)/objs/libsunwjdga, \
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)sunwjdga$(SHARED_LIBRARY_SUFFIX)))
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)sunwjdga$(SHARED_LIBRARY_SUFFIX)
-
-endif
-endif
-endif
-endif
-
-##########################################################################################
-
-ifeq ($(BUILD_HEADLESS), true)
-ifneq ($(PLATFORM), windows)
-
 # TODO!!
-X11_PATH := /usr/X11R6
-
-LIBAWT_HEADLESS_DIRS := $(JDK_TOPDIR)/src/share/native/sun/font \
-                        $(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
-			$(JDK_TOPDIR)/src/solaris/native/sun/font \
-			$(JDK_TOPDIR)/src/solaris/native/sun/awt \
-			$(JDK_TOPDIR)/src/solaris/native/sun/java2d/opengl \
-			$(JDK_TOPDIR)/src/solaris/native/sun/java2d/x11
-
-LIBAWT_HEADLESS_CFLAGS := -DHEADLESS=true \
-                          -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \
-			  $(CUPS_CFLAGS) \
-			  -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
-			  -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d \
-			  -I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
-			  -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
-			  -I$(JDK_TOPDIR)/src/share/native/sun/awt/image \
-			  -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
-			  -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-			  -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/jdga \
-                          $(foreach dir,$(LIBAWT_HEADLESS_DIRS),-I$(dir))
-
-LIBAWT_HEADLESS_FILES := \
-	awt_Font.c \
-	HeadlessToolkit.c \
-	fontpath.c \
-	VDrawingArea.c \
-	X11Color.c \
-	X11Renderer.c \
-	X11PMBlitLoops.c \
-	X11SurfaceData.c \
-	X11FontScaler_md.c \
-	X11TextRenderer_md.c \
-        OGLBlitLoops.c \
-        OGLBufImgOps.c \
-        OGLContext.c \
-        OGLFuncs.c \
-        OGLMaskBlit.c \
-        OGLMaskFill.c \
-        OGLPaints.c \
-        OGLRenderQueue.c \
-        OGLRenderer.c \
-        OGLSurfaceData.c \
-        OGLTextRenderer.c \
-        OGLVertexCache.c \
-        GLXGraphicsConfig.c \
-        GLXSurfaceData.c \
-        AccelGlyphCache.c \
-	CUPSfuncs.c
-
-LIBAWT_HEADLESS_LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX) -lawt -lm
-
-LIBAWT_HEADLESS_REORDER := 
-ifeq ($(PLATFORM), solaris)
-	ifneq ($(ARCH), amd64)
-		LIBAWT_HEADLESS_REORDER := $(JDK_TOPDIR)/makefiles/mapfiles/libawt_headless/reorder-$(ARCH)
-	endif
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBAWT_HEADLESS,\
-		SRC:=$(LIBAWT_HEADLESS_DIRS),\
-		INCLUDE_FILES := $(LIBAWT_HEADLESS_FILES),\
-		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) $(LIBAWT_HEADLESS_CFLAGS),\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libawt_headless/mapfile-vers, \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		REORDER := $(LIBAWT_HEADLESS_REORDER), \
-		LDFLAGS_SUFFIX := $(LIBAWT_HEADLESS_LDFLAGS_SUFFIX),\
-		LDFLAGS_SUFFIX_posix := $(LIBDL),\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libawt_headless,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX)))
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX) : \
-	$(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt$(SHARED_LIBRARY_SUFFIX)
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX)
-
-endif
-endif
-
-##########################################################################################
-
-ifneq ($(PLATFORM), windows)
+# Even though this variable as a general name, it is
+# only used on macos, in fontpath.c, as prefix for where to find fonts.
+#
+# It's used for libawt_headless _and_ libawt_xawt
+#
+X11_PATH:=/usr/X11R6
+
+ifneq ($(OPENJDK_TARGET_OS), windows)
 ifndef BUILD_HEADLESS_ONLY
 
-LIBAWT_XAWT_DIRS := \
+LIBAWT_XAWT_DIRS:=\
 		$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
 		$(JDK_TOPDIR)/src/share/native/sun/awt/utility \
 		$(JDK_TOPDIR)/src/share/native/sun/font \
-		$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/font \
+		$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/font \
 		$(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
-		$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/awt \
-		$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d/opengl \
-		$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d/x11 \
-		$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/xawt \
-
-LIBAWT_XAWT_CFLAGS := -DXAWT -DXAWT_HACK \
+		$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/awt \
+		$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/java2d/opengl \
+		$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/java2d/x11 \
+		$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/xawt \
+
+LIBAWT_XAWT_CFLAGS:=-DXAWT -DXAWT_HACK \
         -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \
 	$(CUPS_CFLAGS) \
 	$(foreach dir,$(LIBAWT_XAWT_DIRS),-I$(dir)) \
 	-I$(JDK_TOPDIR)/src/share/native/sun/java2d \
-	-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d \
+	-I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/java2d \
 	-I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
 	-I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
 	-I$(JDK_TOPDIR)/src/share/native/sun/awt/image \
 	-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
 	-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-	-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/jdga
-
-ifeq ($(PLATFORM),solaris)
+	-I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/jdga
+
+ifeq ($(OPENJDK_TARGET_OS),solaris)
 	LIBAWT_XAWT_CFLAGS += -DFUNCPROTO=15
 endif
 
@@ -1834,7 +756,7 @@
 	LIBAWT_XAWT_CFLAGS += -DINTERNAL_BUILD
 endif
 
-LIBAWT_XAWT_FILES := \
+LIBAWT_XAWT_FILES:=\
 	XlibWrapper.c \
 	XWindow.c \
 	XToolkit.c \
@@ -1891,40 +813,1505 @@
 	XRSurfaceData.c \
 	XRBackendNative.c
 
-LIBAWT_XAWT_LDFLAGS_SUFFIX := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi  -ljava -lverify -ljvm -lc
-
-ifeq ($(PLATFORM), linux)
+LIBAWT_XAWT_LDFLAGS_SUFFIX:=$(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi  -ljava -ljvm -lc
+
+ifeq ($(OPENJDK_TARGET_OS), linux)
 	LIBAWT_XAWT_LDFLAGS_SUFFIX += -lpthread
 endif
 
-ifeq ($(PLATFORM), macosx)
+ifeq ($(OPENJDK_TARGET_OS), macosx)
 	LIBAWT_XAWT_LDFLAGS_SUFFIX += -lpthread
 endif
 
 $(eval $(call SetupNativeCompilation,BUILD_LIBAWT_XAWT,\
+		LIBRARY:=awt_xawt,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(LIBAWT_XAWT_DIRS),\
-		INCLUDE_FILES := $(LIBAWT_XAWT_FILES),\
+		INCLUDE_FILES:=$(LIBAWT_XAWT_FILES),\
 		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) $(LIBAWT_XAWT_CFLAGS) \
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) $(LIBAWT_XAWT_CFLAGS) \
                         $(X_CFLAGS),\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libawt_xawt/mapfile-vers, \
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libawt_xawt/mapfile-vers, \
 		LDFLAGS:=$(LDFLAGS_JDKLIB) \
 			 $(call SET_SHARED_LIBRARY_ORIGIN) \
 			 $(X_LIBS),\
-		LDFLAGS_solaris:=-L$(OPENWIN_HOME)/sfw/lib$(ISA_DIR) -L$(OPENWIN_LIB)$(ISA_DIR) \
-				 -R$(OPENWIN_HOME)/sfw/lib$(ISA_DIR) -R$(OPENWIN_LIB)$(ISA_DIR) \
+		LDFLAGS_solaris:=-L$(OPENWIN_HOME)/sfw/lib$(ISA_DIR) -L$(OPENWIN_HOME)/lib$(ISA_DIR) \
+				 -R$(OPENWIN_HOME)/sfw/lib$(ISA_DIR) -R$(OPENWIN_HOME)/lib$(ISA_DIR) \
 				 -R/usr/dt/lib$(ISA_DIR),\
-		LDFLAGS_SUFFIX := $(LIBAWT_XAWT_LDFLAGS_SUFFIX),\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libawt_xawt,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)awt_xawt$(SHARED_LIBRARY_SUFFIX)))
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)awt_xawt$(SHARED_LIBRARY_SUFFIX) : \
-	$(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX)
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)awt_xawt$(SHARED_LIBRARY_SUFFIX) : \
-	$(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt$(SHARED_LIBRARY_SUFFIX)
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_xawt$(SHARED_LIBRARY_SUFFIX)
+		LDFLAGS_SUFFIX:=$(LIBAWT_XAWT_LDFLAGS_SUFFIX),\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libawt_xawt))
+
+$(BUILD_LIBAWT_XAWT) : $(BUILD_LIBJAVA)
+
+$(BUILD_LIBAWT_XAWT) : $(BUILD_LIBAWT)
+
+BUILD_LIBRARIES += $(BUILD_LIBAWT_XAWT)
+
+endif
+endif
+
+##########################################################################################
+
+BUILD_LIBZIP_FILES:=\
+        CRC32.c \
+	Adler32.c \
+	Deflater.c \
+	Inflater.c \
+	ZipFile.c \
+	zip_util.c
+
+ifeq ($(USE_EXTERNAL_LIBZ),true)
+	LIBZ:=-lz
+else
+BUILD_LIBZIP_FILES += \
+	compress.c \
+	deflate.c \
+	gzclose.c \
+	gzlib.c \
+	gzread.c \
+	gzwrite.c \
+	infback.c \
+	inffast.c \
+	inflate.c \
+	inftrees.c \
+	trees.c \
+	uncompr.c \
+	zadler32.c \
+	zcrc32.c \
+	zutil.c
+LIBZ_INCLUDE:=-I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
+endif
+
+BUILD_LIBZIP_REORDER:=
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+    ifneq ($(ARCH), amd64)
+        BUILD_LIBZIP_REORDER:=$(JDK_TOPDIR)/makefiles/mapfiles/libzip/reorder-$(ARCH)
+    endif
+endif
+
+ifeq ($(LIBZIP_CAN_USE_MMAP), true)
+     BUILD_LIBZIP_MMAP:=-DUSE_MMAP
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBZIP,\
+                LIBRARY:=zip,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+                SRC:=$(JDK_TOPDIR)/src/share/native/java/util/zip \
+                     $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5,\
+		INCLUDE_FILES:=$(BUILD_LIBZIP_FILES), \
+		LANG:=C,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
+                        $(LIBZ_INCLUDE) \
+		        -I$(JDK_TOPDIR)/src/share/native/java/io \
+                        -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/java/io,\
+		CFLAGS_posix:=$(BUILD_LIBZIP_MMAP) -UDEBUG,\
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libzip/mapfile-vers, \
+		REORDER:=$(BUILD_LIBZIP_REORDER), \
+		LDFLAGS:=$(LDFLAGS_JDKLIB) \
+			 $(EXPORT_ZIP_FUNCS), \
+		LDFLAGS_winapi:=-export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \
+                                -export:ZIP_ReadEntry -export:ZIP_GetNextEntry jvm.lib \
+                                $(WIN_JAVA_LIB),\
+		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(LIBZ),\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libzip))
+
+$(BUILD_LIBZIP) : $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBZIP)
+
+##########################################################################################
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK,\
+		LIBRARY:=unpack, \
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+                SRC:=$(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack,\
+		EXCLUDE_FILES:=main.cpp,\
+		LANG:=C++,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CXXFLAGS_JDKLIB) \
+			 -DNO_ZLIB -DUNPACK_JNI -DFULL,\
+		CFLAGS_release:=-DPRODUCT,\
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libunpack/mapfile-vers, \
+		LDFLAGS:=$(LDFLAGS_JDKLIB)\
+			 $(call SET_SHARED_LIBRARY_ORIGIN),\
+		LDFLAGS_winapi:=-map:$(JDK_OUTPUTDIR)/objs/unpack.map /debug \
+				jvm.lib $(WIN_JAVA_LIB),\
+		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
+		LDFLAGS_SUFFIX_posix:=$(LIBCXX),\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libunpack,\
+		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
+		RC_FLAGS:=$(RC_FLAGS)\
+			  /D "JDK_FNAME=unpack.dll" \
+			  /D "JDK_INTERNAL_NAME=unpack" \
+			  /D "JDK_FTYPE=0x2L"))
+
+$(BUILD_LIBUNPACK) : $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBUNPACK)
+
+ifeq ($(OPENJDK_TARGET_OS_API),winapi)
+    $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)unpack.map: $(BUILD_LIBUNPACK)
+	$(ECHO) Copying $(@F)
+	$(CP) $(patsubst %$(SHARED_LIBRARY_SUFFIX),%.map,$<) $@
+
+    $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)unpack.pdb: $(BUILD_LIBUNPACK)
+	$(ECHO) Copying $(@F)
+	$(CP) $(patsubst %$(SHARED_LIBRARY_SUFFIX),%.pdb,$<) $@
+endif
+
+##########################################################################################
+
+LIBATTACH_EXCLUDE_FILES:=
+ifneq ($(OPENJDK_TARGET_OS),solaris)
+    LIBATTACH_EXCLUDE_FILES+=SolarisVirtualMachine.c
+endif
+ifneq ($(OPENJDK_TARGET_OS),linux)
+    LIBATTACH_EXCLUDE_FILES+=LinuxVirtualMachine.c
+endif
+ifneq ($(OPENJDK_TARGET_OS),macosx)
+    LIBATTACH_EXCLUDE_FILES+=BsdVirtualMachine.c
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBATTACH,\
+		LIBRARY:=attach, \
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+                SRC:=$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/tools/attach,\
+		EXCLUDE_FILES:=$(LIBATTACH_EXCLUDE_FILES),\
+		LANG:=C,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB),\
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libattach/mapfile-$(OPENJDK_TARGET_OS), \
+		LDFLAGS:=$(LDFLAGS_JDKLIB) \
+			 $(call SET_SHARED_LIBRARY_ORIGIN),\
+		LDFLAGS_solaris:=-ldoor,\
+		LDFLAGS_winapi:=psapi.lib advapi32.lib $(WIN_JAVA_LIB) jvm.lib,\
+		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libattach,\
+		DEBUG_SYMBOLS:=true))
+
+$(BUILD_LIBATTACH) : $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBATTACH)
+
+##########################################################################################
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBDT_SOCKET,\
+		LIBRARY:=dt_socket,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+                SRC:=$(JDK_TOPDIR)/src/share/transport/socket \
+			$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/transport/socket,\
+		LANG:=C,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) -DUSE_MMAP \
+                        -I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(OPENJDK_TARGET_OS) \
+                        -I$(JDK_TOPDIR)/src/share/transport/socket \
+		        -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/transport/socket \
+                        -I$(JDK_TOPDIR)/src/share/back/export \
+                        -I$(JDK_TOPDIR)/src/share/back,\
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libdt_socket/mapfile-vers, \
+		LDFLAGS:=$(LDFLAGS_JDKLIB), \
+		LDFLAGS_SUFFIX_linux:=$(LDFLAGS_JDKLIB_SUFFIX) -lpthread,\
+		LDFLAGS_SUFFIX_solaris:=-lnsl -lsocket,\
+		LDFLAGS_SUFFIX_winapi:=$(LDFLAGS_JDKLIB_SUFFIX) -export:jdwpTransport_OnLoad ws2_32.lib,\
+		LDFLAGS_SUFFIX:=,\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libdt_socket,\
+		DEBUG_SYMBOLS:=true))
+
+$(BUILD_LIBDT_SOCKET) : $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBDT_SOCKET)
+
+##########################################################################################
+
+ifeq ($(OPENJDK_TARGET_OS_API),winapi)
+
+  $(eval $(call SetupNativeCompilation,BUILD_LIBDT_SHMEM,\
+		LIBRARY:=dt_shmem,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+                SRC:=$(JDK_TOPDIR)/src/share/native/com/sun/tools/jdi \
+			$(JDK_TOPDIR)/src/share/transport/shmem \
+			$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/transport/shmem,\
+		LANG:=C,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) -DUSE_MMAP\
+                        -I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(OPENJDK_TARGET_OS) \
+                        -I$(JDK_TOPDIR)/src/share/transport/shmem \
+		        -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/transport/shmem \
+                        -I$(JDK_TOPDIR)/src/share/back/export, \
+		LDFLAGS:=$(LDFLAGS_JDKLIB),\
+		LDFLAGS_winapi:=-export:jdwpTransport_OnLoad,\
+		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libdt_shmem))
+
+  BUILD_LIBRARIES += $(BUILD_LIBDT_SHMEM)
+
+endif # OPENJDK_TARGET_OS
+
+##########################################################################################
+# JDWP_LOGGING causes log messages to be compiled into the library. These reference the 
+# __FILE__ macro which here expands to the absolute path of the file while the old build 
+# system used a relative path. This causes the binaries to differ in size.
+$(eval $(call SetupNativeCompilation,BUILD_LIBJDWP,\
+		LIBRARY:=jdwp, \
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+                SRC:=$(JDK_TOPDIR)/src/share/back $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/back,\
+		LANG:=C,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) -DJDWP_LOGGING\
+		 -I$(JDK_TOPDIR)/src/share/transport/export \
+                 -I$(JDK_TOPDIR)/src/share/back/export \
+                 -I$(JDK_TOPDIR)/src/share/npt \
+                 -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/npt \
+                 -I$(JDK_TOPDIR)/src/share/back \
+                 -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/back \
+		 -I$(JDK_OUTPUTDIR)/gensrc_jdwp_headers,\
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjdwp/mapfile-vers, \
+		LDFLAGS:=$(filter-out -ljava,$(LDFLAGS_JDKLIB)), \
+		LDFLAGS_SUFFIX_linux:=$(LDFLAGS_JDKLIB_SUFFIX) $(LIBDL),\
+		LDFLAGS_SUFFIX_solaris:=$(LIBDL),\
+		LDFLAGS_SUFFIX_windows:=$(LDFLAGS_JDKLIB_SUFFIX),\
+		LDFLAGS_SUFFIX:=,\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjdwp))
+
+$(BUILD_LIBJDWP) : $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBJDWP)
+
+##########################################################################################
+
+LIBJAAS_MAPFILE:=
+ifneq ($(OPENJDK_TARGET_OS),solaris)
+   LIBJAAS_EXCLUDE_FILES:=Solaris.c
+else
+   # only on solaris...wonder why
+   LIBJAAS_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjaas/mapfile-vers
+endif
+
+LIBJAAS_NAME:=jaas_unix
+ifeq ($(OPENJDK_TARGET_OS), windows)
+     LIBJAAS_NAME:=jaas_nt
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBJAAS,\
+		LIBRARY:=$(LIBJAAS_NAME),\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+                SRC:=$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/com/sun/security/auth/module,\
+		LANG:=C,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB),\
+		MAPFILE:=$(LIBJAAS_MAPFILE),\
+		LDFLAGS:=$(filter-out -ljava,$(LDFLAGS_JDKLIB)) \
+			 $(call SET_SHARED_LIBRARY_ORIGIN),\
+		LDFLAGS_winapi:=netapi32.lib user32.lib mpr.lib advapi32.lib,\
+		LDFLAGS_SUFFIX_linux:=$(LDFLAGS_JDKLIB_SUFFIX),\
+		LDFLAGS_SUFFIX_windows:=$(LDFLAGS_JDKLIB_SUFFIX),\
+		LDFLAGS_SUFFIX:=,\
+		EXCLUDE_FILES:=$(LIBJAAS_EXCLUDE_FILES),\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjaas))
+
+$(BUILD_LIBJAAS) : $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBJAAS)
+
+##########################################################################################
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBJSDT,\
+		LIBRARY:=jsdt,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+                SRC:=$(JDK_TOPDIR)/src/share/native/sun/tracing/dtrace\
+			$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/tracing/dtrace,\
+		LANG:=C,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB)\
+			-I$(JDK_TOPDIR)/src/share/native/sun/tracing/dtrace,\
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjsdt/mapfile-vers, \
+		LDFLAGS:=$(LDFLAGS_JDKLIB) \
+			 $(call SET_SHARED_LIBRARY_ORIGIN),\
+		LDFLAGS_SUFFIX_linux:=$(LDFLAGS_JDKLIB_SUFFIX)  $(LIBDL),\
+		LDFLAGS_SUFFIX_winapi:=$(LDFLAGS_JDKLIB_SUFFIX) $(LIBDL),\
+		LDFLAGS_SUFFIX_macosx:=                         $(LIBDL),\
+		LDFLAGS_SUFFIX:=,\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjsdt, \
+                DEBUG_SYMBOLS:= yes))
+
+$(BUILD_LIBJSDT) : $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBJSDT)
+
+##########################################################################################
+
+ifdef OPENJDK
+    # TODO: Update awt lib path when awt is converted
+    $(eval $(call SetupNativeCompilation,BUILD_LIBLCMS,\
+                LIBRARY:=lcms,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+                SRC:=$(JDK_TOPDIR)/src/share/native/sun/java2d/cmm/lcms \
+		     $(JDK_TOPDIR)/src/share/native/sun/java2d/,\
+		INCLUDE_FILES:=cmscam02.c cmscgats.c cmscnvrt.c cmserr.c \
+			       cmsgamma.c cmsgmt.c cmsintrp.c cmsio0.c \
+			       cmsio1.c cmslut.c cmsmd5.c cmsmtrx.c \
+			       cmsnamed.c cmsopt.c cmspack.c cmspcs.c \
+			       cmsplugin.c cmsps2.c cmssamp.c cmssm.c \
+			       cmstypes.c cmsvirt.c cmswtpnt.c cmsxform.c \
+			       LCMS.c,\
+		LANG:=C,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(filter-out -xc99=%none,$(CFLAGS_JDKLIB)) \
+			$(SHARED_LIBRARY_FLAGS) \
+			-I$(JDK_TOPDIR)/src/share/native/sun/java2d \
+			-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug,\
+		CFLAGS_solaris:=-xc99=no_lib,\
+		CFLAGS_winapi:=-DCMS_IS_WINDOWS_,\
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/liblcms/mapfile-vers, \
+		LDFLAGS:=$(LDFLAGS_JDKLIB), \
+		LDFLAGS_solaris:=/usr/lib$(ISA_DIR)/libm.so.2,\
+		LDFLAGS_winapi:=$(WIN_AWT_LIB) $(WIN_JAVA_LIB),\
+		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
+		LDFLAGS_SUFFIX_posix:=-lawt,\
+		LDFLAGS_SUFFIX_linux:=-lm,\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/liblcms))
+
+    BUILD_LIBRARIES += $(BUILD_LIBLCMS)
+
+    $(BUILD_LIBLCMS) : $(BUILD_LIBAWT)
+endif
+
+##########################################################################################
+
+ifdef OPENJDK
+    BUILD_LIBJPEG_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjpeg/mapfile-vers
+else
+    BUILD_LIBJPEG_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjpeg/mapfile-vers-closed
+    BUILD_LIBJPEG_CLOSED_SRC:=$(JDK_TOPDIR)/src/closed/share/native/sun/awt/image/jpeg
+    BUILD_LIBJPEG_CLOSED_INCLUDES:=-I$(BUILD_LIBJPEG_CLOSED_SRC)
+endif
+
+BUILD_LIBJPEG_REORDER:=
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+    ifneq ($(ARCH), amd64)
+        BUILD_LIBJPEG_REORDER:=$(JDK_TOPDIR)/makefiles/mapfiles/libjpeg/reorder-$(ARCH)
+    endif
+endif
+
+# Suppress gcc warnings like "variable might be clobbered by 'longjmp'
+# or 'vfork'": this warning indicates that some variable is placed to
+# a register by optimized compiler and it's value might be lost on longjmp().
+# Recommended way to avoid such warning is to declare the variable as
+# volatile to prevent the optimization. However, this approach does not
+# work because we have to declare all variables as volatile in result.
+#ifndef CROSS_COMPILE_ARCH
+#    CC_43_OR_NEWER:=\
+#        $(shell $(EXPR) $(CC_MAJORVER) \> 4 \| \
+#              \( $(CC_MAJORVER) = 4 \& $(CC_MINORVER) \>= 3 \) )
+#    ifeq ($(CC_43_OR_NEWER),1)
+#        BUILD_LIBJPEG_CFLAGS_linux += -Wno-clobbered
+#    endif
+#endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBJPEG,\
+                LIBRARY:=jpeg, \
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+                SRC:=$(BUILD_LIBJPEG_CLOSED_SRC) \
+		     $(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg,\
+		LANG:=C,\
+		OPTIMIZATION:=HIGHEST, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
+			$(BUILD_LIBJPEG_CLOSED_INCLUDES) \
+			-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg,\
+		MAPFILE:=$(BUILD_LIBJPEG_MAPFILE), \
+		LDFLAGS:=$(LDFLAGS_JDKLIB) \
+			 $(call SET_SHARED_LIBRARY_ORIGIN),\
+		LDFLAGS_linux:=$(LIBDL),\
+		LDFLAGS_winapi:=$(WIN_JAVA_LIB) jvm.lib,\
+		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
+		REORDER:=$(BUILD_LIBJPEG_REORDER),\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjpeg))
+
+$(BUILD_LIBJPEG) : $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBJPEG)
+
+##########################################################################################
+
+ifndef OPENJDK
+    FONT_HEADERS:=-I$(CLOSED_SRC)/share/native/$(PKGDIR)/t2k
+    BUILD_LIBFONTMANAGER_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libfontmanager/mapfile-vers
+    LIBFONTMANAGER_EXCLUDE_FILES += freetypeScaler.c
+else
+    FONT_HEADERS:=$(FREETYPE2_CFLAGS)
+    BUILD_LIBFONTMANAGER_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libfontmanager/mapfile-vers.openjdk
+    BUILD_LIBFONTMANAGER_FONTLIB:=$(FREETYPE2_LIBS)
+endif
+
+LIBFONTMANAGER_OPTIMIZATION:=HIGH
+
+ifeq ($(OPENJDK_TARGET_OS),windows)
+    LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
+				    X11TextRenderer.c
+    LIBFONTMANAGER_OPTIMIZATION:=LOW
+else
+    LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c \
+				    lcdglyph.c
+endif
+
+BUILD_LIBFONTMANAGER_CFLAGS_COMMON:=\
+			$(X_CFLAGS) \
+			-DLE_STANDALONE -DHEADLESS \
+			$(FONT_HEADERS) \
+			-I$(JDK_TOPDIR)/src/share/native/sun/font \
+			-I$(JDK_TOPDIR)/src/share/native/sun/font/layout \
+			-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
+			-I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/awt \
+			-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
+			-I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
+			-I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
+			-I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/java2d \
+			-I$(JDK_TOPDIR)/src/share/native/sun/java2d
+
+# Turn off aliasing with GCC for ExtensionSubtables.cpp
+ifeq ($(OPENJDK_TARGET_OS), linux)
+    BUILD_LIBFONTMANAGER_ExtensionSubtables.cpp_CXXFLAGS:=-fno-strict-aliasing
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER,\
+		LIBRARY:=fontmanager, \
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+                SRC:=$(JDK_TOPDIR)/src/share/native/sun/font\
+		     $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/font,\
+		EXCLUDE_FILES:=$(LIBFONTMANAGER_EXCLUDE_FILES) \
+			       AccelGlyphCache.c,\
+		LANG:=C++,\
+		CFLAGS:=$(CFLAGS_JDKLIB) $(BUILD_LIBFONTMANAGER_CFLAGS_COMMON),\
+		CXXFLAGS:=$(CXXFLAGS_JDKLIB) $(BUILD_LIBFONTMANAGER_CFLAGS_COMMON),\
+		OPTIMIZATION:=$(LIBFONTMANAGER_OPTIMIZATION), \
+		CFLAGS_windows= -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/windows \
+				-DCC_NOEX, \
+		MAPFILE:=$(BUILD_LIBFONTMANAGER_MAPFILE), \
+		LDFLAGS:=$(subst -Xlinker -z -Xlinker defs,,$(LDFLAGS_JDKLIB)) \
+			 $(call SET_SHARED_LIBRARY_ORIGIN),\
+		LDFLAGS_windows:=advapi32.lib user32.lib gdi32.lib $(WIN_AWT_LIB) $(WIN_JAVA_LIB),\
+		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) \
+				$(BUILD_LIBFONTMANAGER_FONTLIB),\
+		LDFLAGS_SUFFIX_linux:=-lawt $(LIBM) $(LIBCXX),\
+		LDFLAGS_SUFFIX_solaris:=-lawt -lawt_xawt -lc $(LIBM) $(LIBCXX),\
+		LDFLAGS_SUFFIX_macosx:=-lawt $(LIBM) $(LIBCXX) -undefined dynamic_lookup,\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libfontmanager))
+
+$(BUILD_LIBFONTMANAGER) : $(BUILD_LIBAWT)
+
+ifneq (,$(findstring $(OPENJDK_TARGET_OS),solaris macosx))
+$(BUILD_LIBFONTMANAGER) : $(BUILD_LIBAWT_XAWT)
+endif
+
+BUILD_LIBRARIES += $(BUILD_LIBFONTMANAGER)
+
+##########################################################################################
+
+ifndef OPENJDK
+
+#    ifeq ($(OPENJDK_TARGET_OS), linux)
+#        ifeq ("$(CC_VER_MAJOR)", "3")
+#            OTHER_LDLIBS  += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic
+#        endif                           
+#    endif
+#
+# The resulting size of the t2k lib file is (at least on linux) dependant on the order of 
+# the input .o files. Because of this the new build will differ in size to the old build.
+    BUILD_LIBT2K_CFLAGS_COMMON:=-I$(JDK_TOPDIR)/src/share/native/sun/font \
+		            -I$(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k \
+		            -I$(JDK_TOPDIR)/src/closed/share/native/sun/font \
+		            -I$(JDK_TOPDIR)/src/share/share/native/sun/font \
+		            -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/font \
+		            -I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
+		            -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
+		            -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/java2d \
+		            -I$(JDK_TOPDIR)/src/share/native/sun/java2d
+
+    $(eval $(call SetupNativeCompilation,BUILD_LIBT2K,\
+                LIBRARY:=t2k, \
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+                SRC:=$(JDK_TOPDIR)/src/closed/share/native/sun/font \
+		     $(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k \
+		     $(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k/ttHints,\
+		EXCLUDE_FILES:=orion.c,\
+		LANG:=C++,\
+		OPTIMIZATION:=HIGH, \
+		CFLAGS:=$(CFLAGS_JDKLIB) $(BUILD_LIBT2K_CFLAGS_COMMON),\
+		CXXFLAGS:=$(CXXFLAGS_JDKLIB) $(BUILD_LIBT2K_CFLAGS_COMMON),\
+		CFLAGS_windows=-DCC_NOEX, \
+		CXXFLAGS_windows=-DCC_NOEX, \
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libt2k/mapfile-vers, \
+		LDFLAGS:=$(LDFLAGS_JDKLIB) \
+			 $(call SET_SHARED_LIBRARY_ORIGIN),\
+		LDFLAGS_windows:=user32.lib $(JDK_OUTPUTDIR)/objs/libfontmanager/fontmanager.lib,\
+		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
+		LDFLAGS_SUFFIX_macosx:=$(LIBCXX) $(LIBM) -lfontmanager,\
+		LDFLAGS_SUFFIX_linux:=$(LIBCXX) $(LIBM) -lfontmanager,\
+		LDFLAGS_SUFFIX_solaris:=$(LIBCXX) $(LIBM) -lfontmanager -lawt \
+					-lawt_xawt,\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libt2k))
+
+    # t2k is linked against fontmanager
+    $(BUILD_LIBT2K) : $(BUILD_LIBFONTMANAGER)
+
+    BUILD_LIBRARIES += $(BUILD_LIBT2K)
+endif
+
+##########################################################################################
+
+#
+# TODO replace with X_FLAGS / X_LIBS
+#   and add them to configure
+#
+OPENWIN_LIB:=$(OPENWIN_HOME)/lib
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+    ifeq ($(ARCH_DATA_MODEL), 32)
+        KERNEL32_LIB:=kernel32.lib
+    endif
+    $(eval $(call SetupNativeCompilation,BUILD_LIBJAWT,\
+                LIBRARY:=jawt, \
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+                SRC:=$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/windows,\
+		INCLUDE_FILES:=jawt.cpp,\
+		LANG:=C++,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CXXFLAGS_JDKLIB) \
+			-EHsc -DUNICODE -D_UNICODE \
+			-I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/windows \
+		        -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
+		        -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
+			-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
+			-I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/java2d/windows, \
+		LDFLAGS:=$(LDFLAGS_JDKLIB) $(KERNEL32_LIB) \
+			 advapi32.lib $(WIN_AWT_LIB),\
+		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjawt))
+
+$(BUILD_LIBJAWT) : $(BUILD_LIBAWT)
+
+$(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX): $(BUILD_LIBJAWT)
+	$(ECHO) Copying $(@F)
+	$(CP) $< $@
+
+BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX)
+
+else # OPENJDK_TARGET_OS not windows
+
+    JAWT_LIBS:=
+    ifneq ($(OPENJDK_TARGET_OS), solaris)
+        JAWT_LIBS += -lawt
+    endif
+
+    ifndef BUILD_HEADLESS_ONLY
+        JAWT_LIBS += -lawt_xawt
+    else
+        JAWT_LIBS += -lawt_headless
+        HEADLESS_CFLAG += -DHEADLESS
+    endif
+
+    JAWT_FILES:=jawt.c
+    ifeq ($(OPENJDK_TARGET_OS), macosx)
+	JAWT_FILES:=jawt.m
+	JAWT_LIBS:=-lawt_lwawt
+    endif
+
+    $(eval $(call SetupNativeCompilation,BUILD_LIBJAWT,\
+                LIBRARY:=jawt, \
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+                SRC:=$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/awt \
+                     $(JDK_TOPDIR)/src/macosx/native/sun/awt,\
+		INCLUDE_FILES:=$(JAWT_FILES),\
+		LANG:=C,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB), \
+		CFLAGS_linux:=$(HEADLESS_CFLAG),\
+		CFLAGS_macosx:=-I$(JDK_TOPDIR)/src/solaris/native/sun/awt ,\
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjawt/mapfile-vers, \
+		LDFLAGS:=$(LDFLAGS_JDKLIB) \
+			 $(call SET_SHARED_LIBRARY_ORIGIN),\
+		LDFLAGS_solaris:=-L$(OPENWIN_HOME)/sfw/lib$(ISA_DIR) -L$(OPENWIN_LIB)$(ISA_DIR),\
+		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(JAWT_LIBS),\
+		LDFLAGS_SUFFIX_solaris:=-lXrender,\
+		LDFLAGS_SUFFIX_macosx:=-framework Cocoa, \
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjawt))
+
+ifndef BUILD_HEADLESS_ONLY
+$(BUILD_LIBJAWT) : $(BUILD_LIBAWT_XAWT)
+else
+$(BUILD_LIBJAWT) : $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX)
+endif
+
+ifeq ($(OPENJDK_TARGET_OS),macosx)
+$(BUILD_LIBJAWT) : $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX)
+endif
+
+endif # OPENJDK_TARGET_OS
+
+BUILD_LIBRARIES += $(BUILD_LIBJAWT)
+
+##########################################################################################
+
+ifndef OPENJDK
+ifneq ($(OPENJDK_TARGET_OS), macosx)
+
+LIBJDBCODBC_DIR   :=$(JDK_OUTPUTDIR)/objs/libjdbcodbc
+LIBJDBCODBC_NAME  :=$(LIBRARY_PREFIX)JdbcOdbc$(SHARED_LIBRARY_SUFFIX)
+LIBJDBCODBC_CFLAGS:=
+LIBJDBCODBC_LIBS   :=
+LIBJDBCODBC_LDFLAGS:=
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+	LIBJDBCODBC_LDFLAGS:=$(LDFLAGS_JDKLIB)
+	LIBJDBCODBC_LIBS += odbc32.lib odbccp32.lib $(WIN_JAVA_LIB) advapi32.lib
+else
+	LIBJDBCODBC_CFLAGS:=-DUNIX
+
+#
+# This mimics "current" build system exactly. Link against fake -lodbcinst -lodbc
+#   but...those are linked with the -soname, causing the dependency to be dropped on linux (gnu ld)
+#   but kept with other linker (solaris)
+#
+# IMO very weird behaviour...very weird
+#
+	LIBJDBCODBC_LDFLAGS:=$(patsubst defs,nodefs,$(LDFLAGS_JDKLIB)) \
+				      -Xlinker -z -Xlinker nodefs
+	LIBJDBCODBC_LIBS += -L$(LIBJDBCODBC_DIR) -lodbcinst -lodbc
+	LIBJDBCODBC_SONAME:=$(call SET_SHARED_LIBRARY_NAME,$(LIBJDBCODBC_NAME))
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBJDBCODBC,\
+		LIBRARY:=JdbcOdbc,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+		SRC:=$(JDK_TOPDIR)/src/closed/share/classes/sun/jdbc/odbc,\
+		EXCLUDE_FILES:=dummyodbc.c,\
+		LANG:=C,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(LIBJDBCODBC_CFLAGS) $(CFLAGS_JDKLIB) \
+			$(SHARED_LIBRARY_FLAGS),\
+		LDFLAGS:=$(LIBJDBCODBC_LDFLAGS) \
+			 $(call SET_SHARED_LIBRARY_ORIGIN) $(LIBJDBCODBC_LIBS),\
+		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(LIBJDBCODBC_SONAME),\
+		OBJECT_DIR:=$(LIBJDBCODBC_DIR)))
+
+$(BUILD_LIBJDBCODBC) : $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBJDBCODBC)
+
+ifneq ($(OPENJDK_TARGET_OS), windows)
+
+$(eval $(call SetupNativeCompilation,BUILD_FAKEODBCINST,\
+		LIBRARY:=odbcinst,\
+                OUTPUT_DIR:=$(LIBJDBCODBC_DIR),\
+		SRC:=$(JDK_OUTPUTDIR)/gensrc_c/libjdbcodbc,\
+		INCLUDE_FILES:=dummyodbc1.c,\
+		LANG:=C,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB),\
+		LDFLAGS:=$(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN) $(LIBJDBCODBC_LDFLAGS),\
+		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(LIBJDBCODBC_SONAME),\
+		OBJECT_DIR:=$(LIBJDBCODBC_DIR)))
+
+$(eval $(call SetupNativeCompilation,BUILD_FAKEODBC,\
+		LIBRARY:=odbc,\
+                OUTPUT_DIR:=$(LIBJDBCODBC_DIR),\
+		SRC:=$(JDK_OUTPUTDIR)/gensrc_c/libjdbcodbc,\
+		INCLUDE_FILES:=dummyodbc2.c,\
+		LANG:=C,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(LIBJDBCODBC_CFLAGS) $(CFLAGS_JDKLIB),\
+		LDFLAGS:=$(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN) $(LIBJDBCODBC_LDFLAGS),\
+		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(LIBJDBCODBC_SONAME),\
+		OBJECT_DIR:=$(LIBJDBCODBC_DIR)))
+
+$(BUILD_FAKEODBCINST) $(BUILD_FAKEODBC) : \
+  $(BUILD_LIBJAVA)
+
+$(BUILD_LIBJDBCODBC) : $(BUILD_FAKEODBCINST) $(BUILD_FAKEODBC)
+
+endif
+
+endif
+endif
+
+##########################################################################################
+
+BUILD_LIBINSTRUMENT_SRC   :=$(JDK_TOPDIR)/src/share/instrument \
+                               $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/java/io \
+                               $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/instrument
+
+BUILD_LIBINSTRUMENT_FILES :=\
+	EncodingSupport.c \
+	EncodingSupport_md.c \
+	FileSystemSupport_md.c \
+	InstrumentationImplNativeMethods.c \
+	InvocationAdapter.c \
+	JarFacade.c \
+	JPLISAgent.c \
+	JPLISAssert.c \
+	JavaExceptions.c \
+	PathCharsValidator.c \
+	Reentrancy.c \
+	Utilities.c \
+	canonicalize_md.c
+
+BUILD_LIBINSTRUMENT_DIR   :=$(JDK_OUTPUTDIR)/objs/libinstrument
+BUILD_LIBINSTRUMENT_CFLAGS:=-I$(JDK_TOPDIR)/src/share/instrument \
+                               -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/instrument \
+                               -I$(JDK_TOPDIR)/src/share/bin
+
+BUILD_LIBINSTRUMENT_LDFLAGS:=
+BUILD_LIBINSTRUMENT_LDFLAGS_SUFFIX:=
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  BUILD_LIBINSTRUMENT_LDFLAGS += $(JDK_OUTPUTDIR)/objs/jli_static.lib $(WIN_JAVA_LIB) \
+				 -export:Agent_OnAttach
+  # equivalent of strcasecmp is stricmp on Windows
+  BUILD_LIBINSTRUMENT_CFLAGS += -Dstrcasecmp=stricmp
+else ifneq (,$(findstring $(OPENJDK_TARGET_OS), macosx))
+	ifneq ($(ARCH), universal)
+		BUILD_LIBINSTRUMENT_LDFLAGS += -Wl,-all_load
+	endif
+
+	BUILD_LIBINSTRUMENT_LDFLAGS += $(JDK_OUTPUTDIR)/objs/libjli_static.a
+	BUILD_LIBINSTRUMENT_LDFLAGS += -liconv
+	BUILD_LIBINSTRUMENT_LDFLAGS += -framework Cocoa -framework Security -framework ApplicationServices
+	BUILD_LIBINSTRUMENT_LDFLAGS += $(LIBZ)
+else
+	BUILD_LIBINSTRUMENT_LDFLAGS += -L $(INSTALL_LIBRARIES_HERE)/jli
+	BUILD_LIBINSTRUMENT_LDFLAGS_SUFFIX += -ljli $(LIBDL)
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT,\
+		LIBRARY:=instrument, \
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+		SRC:=$(BUILD_LIBINSTRUMENT_SRC),\
+		INCLUDE_FILES:=$(BUILD_LIBINSTRUMENT_FILES),\
+		LANG:=C,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
+                        $(BUILD_LIBINSTRUMENT_CFLAGS),\
+		CFLAGS_debug:=-DJPLIS_LOGGING,\
+		CFLAGS_release:=-DNO_JPLIS_LOGGING,\
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libinstrument/mapfile-vers, \
+		LDFLAGS:=$(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN)\
+			 $(call SET_SHARED_LIBRARY_ORIGIN,jli) \
+                         $(BUILD_LIBINSTRUMENT_LDFLAGS),\
+		LDFLAGS_SUFFIX:=$(LIBZ) $(BUILD_LIBINSTRUMENT_LDFLAGS_SUFFIX),\
+		OBJECT_DIR:=$(BUILD_LIBINSTRUMENT_DIR),\
+		DEBUG_SYMBOLS:=true))
+
+ifneq (,$(findstring $(OPENJDK_TARGET_OS), macosx windows))
+$(BUILD_LIBINSTRUMENT) : $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jli_static$(STATIC_LIBRARY_SUFFIX)
+else
+$(BUILD_LIBINSTRUMENT) : $(INSTALL_LIBRARIES_HERE)/jli/$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX)
+endif
+$(BUILD_LIBINSTRUMENT) : $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBINSTRUMENT)
+
+##########################################################################################
+
+BUILD_LIBMANAGEMENT_SRC:=$(JDK_TOPDIR)/src/share/native/sun/management \
+                           $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/management \
+                           $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/com/sun/management
+
+BUILD_LIBMANAGEMENT_EXCLUDES:=
+
+BUILD_LIBMANAGEMENT_CFLAGS:=-I$(JDK_TOPDIR)/src/share/native/sun/management
+
+ifneq ($(OPENJDK_TARGET_OS), windows)
+	BUILD_LIBMANAGEMENT_EXCLUDES += OperatingSystem_md.c
+else
+	BUILD_LIBMANAGEMENT_EXCLUDES += UnixOperatingSystem_md.c
+endif
+
+ifneq ($(OPENJDK_TARGET_OS),solaris)
+	BUILD_LIBMANAGEMENT_EXCLUDES += SolarisOperatingSystem.c
+endif
+
+ifneq ($(OPENJDK_TARGET_OS),linux)
+	BUILD_LIBMANAGEMENT_EXCLUDES += LinuxOperatingSystem.c
+endif
+
+ifneq ($(OPENJDK_TARGET_OS),macosx)
+	BUILD_LIBMANAGEMENT_EXCLUDES += MacosxOperatingSystem.c
+endif
+
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT,\
+		LIBRARY:=management,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+		SRC:=$(BUILD_LIBMANAGEMENT_SRC),\
+		EXCLUDE_FILES:=$(BUILD_LIBMANAGEMENT_EXCLUDES),\
+		LANG:=C,\
+		OPTIMIZATION:=HIGH, \
+		CFLAGS:=$(CFLAGS_JDKLIB) $(BUILD_LIBMANAGEMENT_CFLAGS),\
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libmanagement/mapfile-vers, \
+		LDFLAGS:=$(LDFLAGS_JDKLIB) \
+			 $(call SET_SHARED_LIBRARY_ORIGIN),\
+		LDFLAGS_windows:=$(WIN_JAVA_LIB) jvm.lib advapi32.lib psapi.lib,\
+		LDFLAGS_solaris:=-lkstat,\
+		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libmanagement,\
+		DEBUG_SYMBOLS:=true))
+
+$(BUILD_LIBMANAGEMENT) : $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBMANAGEMENT)
+
+##########################################################################################
+
+BUILD_LIBHPROF_SRC:=$(JDK_TOPDIR)/src/share/demo/jvmti/hprof $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/demo/jvmti/hprof
+BUILD_LIBHPROF_CFLAGS:=-I$(JDK_TOPDIR)/src/share/demo/jvmti/hprof \
+                         -I$(JDK_TOPDIR)/src/share/npt \
+                         -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/npt \
+                         -I$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo
+
+BUILD_LIBHPROF_LDFLAGS:=
+
+ifeq ($(OPENJDK_TARGET_OS),solaris)
+     BUILD_LIBHPROF_LDFLAGS += -lsocket -lnsl
+endif
+
+ifneq ($(OPENJDK_TARGET_OS),windows)
+     BUILD_LIBHPROF_LDFLAGS += $(LIBDL)
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBHPROF,\
+		LIBRARY:=hprof, \
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+		SRC:=$(BUILD_LIBHPROF_SRC),\
+		LANG:=C,\
+		OPTIMIZATION:=HIGHEST, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
+                         $(BUILD_LIBHPROF_CFLAGS),\
+		CFLAGS_debug:=-DHPROF_LOGGING,\
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libhprof/mapfile-vers, \
+		LDFLAGS:=$(LDFLAGS_JDKLIB) \
+			 $(call SET_SHARED_LIBRARY_ORIGIN),\
+		LDFLAGS_windows:=wsock32.lib winmm.lib advapi32.lib,\
+		LDFLAGS_SUFFIX:=$(BUILD_LIBHPROF_LDFLAGS),\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libhprof_jvmti,\
+		DEBUG_SYMBOLS:=true))
+
+BUILD_LIBRARIES += $(BUILD_LIBHPROF)
+
+##########################################################################################
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA_CRW_DEMO,\
+		LIBRARY:=java_crw_demo, \
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+		SRC:=$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo,\
+		LANG:=C,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
+                        -I$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo,\
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjava_crw_demo/mapfile-vers, \
+		LDFLAGS:=$(LDFLAGS_JDKLIB) \
+			 $(call SET_SHARED_LIBRARY_ORIGIN),\
+		LDFLAGS_SUFFIX:=,\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjava_crw_demo,\
+		DEBUG_SYMBOLS:=true))
+
+BUILD_LIBRARIES += $(BUILD_LIBJAVA_CRW_DEMO)
+
+##########################################################################################
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBNPT,\
+		LIBRARY:=npt, \
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+		SRC:=$(JDK_TOPDIR)/src/share/npt $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/npt,\
+		LANG:=C,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
+                        -I$(JDK_TOPDIR)/src/share/npt \
+                        -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/npt,\
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libnpt/mapfile-vers, \
+		LDFLAGS:=$(LDFLAGS_JDKLIB) \
+			 $(call SET_SHARED_LIBRARY_ORIGIN),\
+		LDFLAGS_macosx:=-liconv,\
+		LDFLAGS_SUFFIX_windows:=-export:nptInitialize -export:nptTerminate,\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libnpt,\
+		DEBUG_SYMBOLS:=true))
+
+BUILD_LIBRARIES += $(BUILD_LIBNPT)
+
+##########################################################################################
+
+LIBNET_SRC_DIRS:=$(JDK_TOPDIR)/src/share/native/java/net \
+                   $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/java/net \
+                   $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/net/dns \
+                   $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/net/www/protocol/http/ntlm \
+                   $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/net/sdp \
+                   $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/net/spi
+
+LIBNET_CFLAGS:=$(foreach dir,$(LIBNET_SRC_DIRS),-I$(dir))
+
+LIBNET_EXCLUDE_FILES:=
+ifneq ($(OPENJDK_TARGET_OS),linux)
+	LIBNET_EXCLUDE_FILES += linux_close.c
+endif
+
+ifneq ($(OPENJDK_TARGET_OS),macosx)
+	LIBNET_EXCLUDE_FILES += bsd_close.c
+endif
+
+ifeq ($(OPENJDK_TARGET_OS),windows)
+	LIBNET_EXCLUDE_FILES += PlainSocketImpl.c PlainDatagramSocketImpl.c SdpSupport.c
+else
+	LIBNET_EXCLUDE_FILES += TwoStacksPlainSocketImpl.c DualStackPlainSocketImpl.c \
+                                TwoStacksPlainDatagramSocketImpl.c DualStackPlainDatagramSocketImpl.c \
+				NTLMAuthSequence.c NetworkInterface_winXP.c
+endif
+
+LIBNET_LDFLAGS_SUFFIX:=
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBNET,\
+		LIBRARY:=net,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+		SRC:=$(LIBNET_SRC_DIRS),\
+		EXCLUDE_FILES:=$(LIBNET_EXCLUDE_FILES), \
+		LANG:=C,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
+                        $(LIBNET_CFLAGS),\
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libnet/mapfile-vers, \
+		LDFLAGS:=$(LDFLAGS_JDKLIB) \
+			 $(call SET_SHARED_LIBRARY_ORIGIN),\
+		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(LIBNET_LDFLAGS_SUFFIX),\
+		LDFLAGS_SUFFIX_solaris:=-lnsl -lsocket $(LIBDL) ,\
+		LDFLAGS_SUFFIX_linux:=$(LIBDL) -lpthread ,\
+		LDFLAGS_SUFFIX_windows:=ws2_32.lib $(JVMLIB) secur32.lib iphlpapi.lib \
+					  delayimp.lib $(WIN_JAVA_LIB) jvm.lib advapi32.lib \
+                                          /DELAYLOAD:secur32.dll /DELAYLOAD:iphlpapi.dll, \
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libnet))
+
+$(BUILD_LIBNET) : $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBNET)
+
+$(JDK_OUTPUTDIR)/lib/net.properties: $(JDK_TOPDIR)/src/share/lib/net.properties
+	$(ECHO) Copying $(@F)
+	$(MKDIR) -p $(@D)
+	$(CP) $< $@
+
+COPY_FILES += $(JDK_OUTPUTDIR)/lib/net.properties
+
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+$(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template : $(JDK_TOPDIR)/src/${LEGACY_OPENJDK_TARGET_OS_API}/lib/sdp/sdp.conf.template
+	$(ECHO) Copying $(@F)
+	$(MKDIR) -p $(@D)
+	$(CP) $< $@
+
+COPY_FILES += $(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template
+endif
+
+##########################################################################################
+
+BUILD_LIBNIO_SRC:=\
+        $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/java/nio \
+	$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/nio/ch \
+	$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/nio/fs
+
+BUILD_LIBNIO_CFLAGS:=\
+	-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch \
+	-I$(JDK_TOPDIR)/src/share/native/java/io \
+	-I$(JDK_TOPDIR)/src/share/native/java/net \
+        -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/java/net
+
+BUILD_LIBNIO_FILES:=\
+        DatagramChannelImpl.c \
+        DatagramDispatcher.c \
+	FileChannelImpl.c \
+	FileDispatcherImpl.c \
+	FileKey.c \
+	IOUtil.c \
+        MappedByteBuffer.c \
+	Net.c \
+	ServerSocketChannelImpl.c \
+	SocketChannelImpl.c \
+	SocketDispatcher.c
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+	BUILD_LIBNIO_FILES += \
+		Iocp.c \
+		RegistryFileTypeDetector.c \
+		WindowsAsynchronousFileChannelImpl.c \
+		WindowsAsynchronousServerSocketChannelImpl.c \
+		WindowsAsynchronousSocketChannelImpl.c \
+		WindowsNativeDispatcher.c \
+	        WindowsSelectorImpl.c
+endif
+
+ifeq ($(OPENJDK_TARGET_OS), linux)
+	BUILD_LIBNIO_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libnio/mapfile-linux
+	BUILD_LIBNIO_FILES += \
+		EPoll.c \
+		EPollArrayWrapper.c \
+		EPollPort.c \
+		InheritedChannel.c \
+		NativeThread.c \
+	        PollArrayWrapper.c \
+		UnixAsynchronousServerSocketChannelImpl.c \
+		UnixAsynchronousSocketChannelImpl.c \
+		GnomeFileTypeDetector.c \
+		LinuxNativeDispatcher.c \
+		LinuxWatchService.c \
+		UnixCopyFile.c \
+		UnixNativeDispatcher.c
+endif
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+	BUILD_LIBNIO_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libnio/mapfile-bsd
+	BUILD_LIBNIO_SRC += $(JDK_TOPDIR)/src/macosx/native/sun/nio/ch
+	BUILD_LIBNIO_FILES += \
+		InheritedChannel.c \
+		NativeThread.c \
+	        PollArrayWrapper.c \
+		UnixAsynchronousServerSocketChannelImpl.c \
+		UnixAsynchronousSocketChannelImpl.c \
+		GnomeFileTypeDetector.c \
+		BsdNativeDispatcher.c \
+		UnixCopyFile.c \
+		UnixNativeDispatcher.c \
+		KQueue.c \
+		KQueuePort.c \
+		KQueueArrayWrapper.c
+endif
+
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+	BUILD_LIBNIO_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libnio/mapfile-solaris
+	BUILD_LIBNIO_FILES += \
+		DevPollArrayWrapper.c \
+		InheritedChannel.c \
+		NativeThread.c \
+		PollArrayWrapper.c \
+		SolarisEventPort.c \
+		UnixAsynchronousServerSocketChannelImpl.c \
+		UnixAsynchronousSocketChannelImpl.c \
+		GnomeFileTypeDetector.c \
+		SolarisNativeDispatcher.c \
+		SolarisWatchService.c \
+		UnixCopyFile.c \
+		UnixNativeDispatcher.c
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBNIO,\
+		LIBRARY:=nio,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+		SRC:=$(BUILD_LIBNIO_SRC),\
+		INCLUDE_FILES:=$(BUILD_LIBNIO_FILES), \
+		LANG:=C,\
+		OPTIMIZATION:=HIGH, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
+                        $(BUILD_LIBNIO_CFLAGS),\
+		MAPFILE:=$(BUILD_LIBNIO_MAPFILE), \
+		LDFLAGS:=$(LDFLAGS_JDKLIB) $(BUILD_LIBNIO_LDFLAGS) \
+			 $(call SET_SHARED_LIBRARY_ORIGIN),\
+		LDFLAGS_SUFFIX_linux:=-ljava -lnet -lpthread $(LIBDL),\
+		LDFLAGS_SUFFIX_solaris:=$(LDFLAGS_JDKLIB_SUFFIX) \
+                                        $(JVMLIB) -lsocket -lposix4 $(LIBDL) -lsendfile \
+		                        -ljava -lnet,\
+		LDFLAGS_SUFFIX_windows:=$(LDFLAGS_JDKLIB_SUFFIX) \
+                                        $(WIN_JAVA_LIB) $(JDK_OUTPUTDIR)/objs/libnet/net.lib \
+					advapi32.lib jvm.lib ws2_32.lib\
+                                        $(JDK_OUTPUTDIR)/objs/libjava/io_util.obj \
+		                        $(JDK_OUTPUTDIR)/objs/libjava/FileDescriptor_md.obj ,\
+		LDFLAGS_SUFFIX_macosx:=-ljava -lnet -pthread,\
+		LDFLAGS_SUFFIX:=,\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libnio))
+
+BUILD_LIBRARIES += $(BUILD_LIBNIO)
+
+$(BUILD_LIBNIO) : $(BUILD_LIBNET)
+
+##########################################################################################
+
+ifeq ($(OPENJDK_TARGET_OS_API),posix)
+  # TODO make this work on macosx
+  ifneq ($(OPENJDK_TARGET_OS),macosx)
+
+    SCTP_WERROR := -Werror
+    ifeq ($(OPENJDK_TARGET_CPU_ARCH), ppc)
+      SCTP_WERROR :=
+    endif
+
+    $(eval $(call SetupNativeCompilation,BUILD_LIBSCTP,\
+                LIBRARY:=sctp,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+                SRC:=$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/nio/ch/sctp,\
+		LANG:=C,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB)\
+			-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch \
+			-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch/sctp \
+			-I$(JDK_TOPDIR)/src/share/native/java/net \
+			-I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/nio/ch \
+			-I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/java/net,\
+		CFLAGS_linux:=$(SCTP_WERROR),\
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libsctp/mapfile-vers, \
+		LDFLAGS:=$(LDFLAGS_JDKLIB) \
+			 $(call SET_SHARED_LIBRARY_ORIGIN),\
+		LDFLAGS_SUFFIX_linux:=$(LIBDL) -lpthread,\
+		LDFLAGS_SUFFIX_posix:=-lnio -lnet,\
+		LDFLAGS_SUFFIX_solaris:=-lsocket,\
+		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
+		INCLUDE_FILES:=SctpNet.c SctpChannelImpl.c SctpServerChannelImpl.c,\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libsctp))
+
+    BUILD_LIBRARIES += $(BUILD_LIBSCTP)
+
+    $(BUILD_LIBSCTP) : $(BUILD_LIBNIO)
+  endif
+endif
+
+##########################################################################################
+
+BUILD_LIBJLI_SRC_DIRS:=$(JDK_TOPDIR)/src/share/bin $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/bin
+BUILD_LIBJLI_CFLAGS:=$(foreach dir,$(BUILD_LIBJLI_SRC_DIRS),-I$(dir))
+
+BUILD_LIBJLI_FILES:=\
+	java.c \
+	splashscreen_stubs.c \
+	parse_manifest.c \
+	version_comp.c \
+	wildcard.c \
+	jli_util.c
+
+ifeq ($(JVM_VARIANT_ZERO), true)
+	ERGO_FAMILY:=zero
+else # !ZERO_BUILD
+	ifneq (,$(findstring $(ARCH), amd64 x86_64))
+		ERGO_FAMILY:=i586
+	else # !X86 FAMILY
+		ERGO_FAMILY:=$(ARCH)
+	endif #ARCH_FAMILY
+endif # ZERO_BUILD
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+	BUILD_LIBJLI_CFLAGS += -I$(JDK_TOPDIR)/src/macosx/bin
+	BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/bin
+	BUILD_LIBJLI_FILES += java_md_common.c java_md_macosx.c
+
+	BUILD_LIBJLI_java_md_macosx.c_CFLAGS:=-x objective-c
+	BUILD_LIBJLI_STATIC_java_md_macosx.c_CFLAGS:=-x objective-c
+endif
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+	BUILD_LIBJLI_FILES += java_md.c
+else ifneq ($(OPENJDK_TARGET_OS), macosx)
+
+	BUILD_LIBJLI_FILES += java_md_common.c
+	BUILD_LIBJLI_FILES += java_md_solinux.c ergo.c 
+
+	ERGO_ARCH_FILE = ergo_$(ERGO_FAMILY).c
+
+        # if the architecture specific ergo file exists then
+        # use it, else use the generic definitions from ergo.c
+	ifneq ($(wildcard $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/bin/$(ERGO_ARCH_FILE)),)
+		BUILD_LIBJLI_FILES += $(ERGO_ARCH_FILE)
+	else # !ERGO_ARCH_FILE
+		BUILD_LIBJLI_CFLAGS += -DUSE_GENERIC_ERGO
+	endif # ERGO_ARCH_FILE
+endif #WINDOWS
+
+# Names of arch directories
+ifneq ($(OPENJDK_TARGET_OS), macosx)
+	BUILD_LIBJLI_CFLAGS += -DLIBARCHNAME='"$(LIBARCH)"'
+else
+	BUILD_LIBJLI_CFLAGS += -DLIBARCHNAME='"$(ARCH)"'
+endif
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+	ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
+		BUILD_LIBJLI_CFLAGS += -DLIBARCH32NAME='"sparc"'
+		BUILD_LIBJLI_CFLAGS += -DLIBARCH64NAME='"sparcv9"'
+	else
+		BUILD_LIBJLI_CFLAGS += -DLIBARCH32NAME='"i386"'
+		BUILD_LIBJLI_CFLAGS += -DLIBARCH64NAME='"amd64"'
+	endif
+endif # OPENJDK_TARGET_OS
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+	BUILD_LIBJLI_CFLAGS += -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
+endif
+
+ifneq ($(USE_EXTERNAL_LIBZ),true)
+	BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
+	BUILD_LIBJLI_CFLAGS += $(LIBZ_INCLUDE)
+	BUILD_LIBJLI_FILES += \
+		inflate.c \
+		inftrees.c \
+		inffast.c \
+		zadler32.c \
+		zcrc32.c \
+		zutil.c
+endif
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+    LIBJLI_OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE)
+else
+    LIBJLI_OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE)/jli
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBJLI,\
+		LIBRARY:=jli,\
+                OUTPUT_DIR:=$(LIBJLI_OUTPUT_DIR),\
+		SRC:=$(BUILD_LIBJLI_SRC_DIRS),\
+		INCLUDE_FILES:=$(BUILD_LIBJLI_FILES),\
+		LANG:=C,\
+		OPTIMIZATION:=HIGH, \
+		CFLAGS:=$(CFLAGS_JDKLIB) $(BUILD_LIBJLI_CFLAGS),\
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjli/mapfile-vers, \
+		LDFLAGS:=$(LDFLAGS_JDKLIB) \
+			 $(call SET_SHARED_LIBRARY_ORIGIN),\
+		LDFLAGS_SUFFIX:=$(LIBZ),\
+		LDFLAGS_SUFFIX_posix:=$(LIBDL) -lc,\
+		LDFLAGS_SUFFIX_linux:=-lpthread,\
+		LDFLAGS_SUFFIX_windows:=\
+			-export:JLI_Launch \
+			-export:JLI_ManifestIterate \
+			-export:JLI_SetTraceLauncher \
+			-export:JLI_ReportErrorMessage \
+			-export:JLI_ReportErrorMessageSys \
+			-export:JLI_ReportMessage \
+			-export:JLI_ReportExceptionDescription \
+			advapi32.lib \
+			comctl32.lib \
+			user32.lib,\
+		LDFLAGS_SUFFIX_macosx:=-framework Cocoa -framework Security -framework ApplicationServices, \
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjli))
+
+BUILD_LIBRARIES += $(BUILD_LIBJLI)
+
+# On windows, the static library has the same suffix as the import library created by
+# with the shared library, so the static library is given a different name. No harm
+# in doing it for all platform to reduce complexity.
+ifeq ($(OPENJDK_TARGET_OS), windows)
+    $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC,\
+		STATIC_LIBRARY:=jli_static,\
+                OUTPUT_DIR:=$(JDK_OUTPUTDIR)/objs,\
+		SRC:=$(BUILD_LIBJLI_SRC_DIRS),\
+		INCLUDE_FILES:=$(BUILD_LIBJLI_FILES),\
+		LANG:=C,\
+		OPTIMIZATION:=HIGH, \
+		CFLAGS:=$(CFLAGS_JDKLIB) $(STATIC_LIBRARY_FLAGS) $(BUILD_LIBJLI_CFLAGS),\
+		ARFLAGS:=$(ARFLAGS),\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjli_static))
+
+BUILD_LIBRARIES += $(BUILD_LIBJLI_STATIC)
+
+else ifeq ($(OPENJDK_TARGET_OS),macosx)
+    #
+    # On macosx they do partial (incremental) linking of libjli_static.a
+    #   code it here...rather than add support to NativeCompilation
+    #   as this is first time I see it
+    $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC,\
+		LIBRARY:=jli_static, \
+                OUTPUT_DIR:=$(JDK_OUTPUTDIR)/objs,\
+		SRC:=$(BUILD_LIBJLI_SRC_DIRS),\
+		INCLUDE_FILES:=$(BUILD_LIBJLI_FILES),\
+		LANG:=C,\
+		OPTIMIZATION:=HIGH, \
+		CFLAGS:=$(CFLAGS_JDKLIB) $(BUILD_LIBJLI_CFLAGS),\
+		LDFLAGS:=-nostdlib -r,\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjli_static))
+
+$(JDK_OUTPUTDIR)/objs/libjli_static.a : $(BUILD_LIBJLI_STATIC)
+	$(CP) -a $< $@
+
+BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/objs/libjli_static.a
+endif
+
+##########################################################################################
+
+ifeq ($(ENABLE_JFR), true)
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBJFR,\
+		LIBRARY:=jfr,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+		SRC:=$(JDK_TOPDIR)/src/closed/share/native/oracle/jfr,\
+		LANG:=C,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
+                        -I$(JDK_TOPDIR)/src/closed/share/javavm/export, \
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjfr/mapfile-vers, \
+		LDFLAGS:=$(LDFLAGS_JDKLIB) \
+			 $(call SET_SHARED_LIBRARY_ORIGIN),\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjfr))
+
+BUILD_LIBRARIES += $(BUILD_LIBJFR)
+
+endif
+
+##########################################################################################
+
+ifndef OPENJDK
+
+BUILD_LIBKCMS_EXCLUDE_FILES:=
+ifeq ($(OPENJDK_TARGET_OS),windows)
+	BUILD_LIBKCMS_EXCLUDE_FILES += ukcpmgr.c unixmem.c
+else
+	BUILD_LIBKCMS_EXCLUDE_FILES += cmmdll.c registry.c spxffile.c sysinfo.c winmem.c wkcpmgr.c
+endif
+
+BUILD_LIBKCMS_FLAGS:=$(CFLAGS_JDKLIB)
+
+ifeq ($(OPENJDK_TARGET_OS),solaris)
+     # This particular library uses a feature called PIC_CODE_SMALL (on solaris)
+     #   implement it like this...since it's only used here
+     BUILD_LIBKCMS_FLAGS:=$(patsubst -KPIC,-Kpic,$(BUILD_LIBKCMS_FLAGS))
+else ifeq ($(OPENJDK_TARGET_CPU_ARCH), ppc)
+     BUILD_LIBKCMS_FLAGS:=$(patsubst -fPIC,-fpic,$(BUILD_LIBKCMS_FLAGS))
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBKCMS,\
+		LIBRARY:=kcms,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+		SRC:=$(JDK_TOPDIR)/src/closed/share/native/sun/java2d/cmm/kcms,\
+		LANG:=C,\
+		EXCLUDE_FILES:=$(BUILD_LIBKCMS_EXCLUDE_FILES),\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(BUILD_LIBKCMS_FLAGS) \
+                        -DJAVACMM -DFUT_CALC_EX -DNO_FUT_GCONST,\
+		CFLAGS_linux:=-Wno-missing-field-initializers,\
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libkcms/mapfile-vers, \
+		LDFLAGS:=$(LDFLAGS_JDKLIB) \
+			 $(call SET_SHARED_LIBRARY_ORIGIN),\
+		LDFLAGS_SUFFIX_linux:=-lpthread,\
+		LDFLAGS_SUFFIX_windows:=$(WIN_JAVA_LIB) advapi32.lib user32.lib version.lib, \
+		LDFLAGS_SUFFIX:=-lm $(LDFLAGS_JDKLIB_SUFFIX),\
+		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/closed/share/native/sun/java2d/cmm/kcms/cmm.rc,\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libkcms))
+
+$(BUILD_LIBKCMS) : $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBKCMS)
+
+endif
+
+##########################################################################################
+
+ifndef OPENJDK
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+ifneq ($(ARCH), amd64)
+
+ifeq ($(shell if test "$(OS_VERSION_MAJOR)" -eq 5 -a "$(OS_VERSION_MINOR)" -le 10; then $(ECHO) ok; fi), ok)
+
+SUNWJDGA_MAPFILE:=
+ifneq (,$(findstring $(ARCH),sparc))
+	SUNWJDGA_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjdga/mapfile-vers
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBSUNWJDGA, \
+		LIBRARY:=sunwjdga,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+		SRC:=$(JDK_TOPDIR)/src/solaris/native/sun/jdga, \
+		LANG:=C, \
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
+			-I$(JDK_TOPDIR)/src/share/javavm/export \
+			-I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/javavm/export \
+			-I$(OPENWIN_HOME)/include, \
+		MAPFILE:=$(SUNWJDGA_MAPFILE), \
+		LDFLAGS:=$(LDFLAGS_JDKLIB) \
+			 $(call SET_SHARED_LIBRARY_ORIGIN), \
+		LDFLAGS_SUFFIX:=-L$(OPENWIN_LIB)$(ISA_DIR) -R$(OPENWIN_LIB)$(ISA_DIR) -ldga -lX11 $(LIBDL) -lc, \
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libsunwjdga))
+
+BUILD_LIBRARIES += $(BUILD_LIBSUNWJDGA)
+
+endif
+endif
+endif
+endif
+
+##########################################################################################
+
+ifeq ($(BUILD_HEADLESS), true)
+ifneq ($(OPENJDK_TARGET_OS), windows)
+
+LIBAWT_HEADLESS_DIRS:=$(JDK_TOPDIR)/src/share/native/sun/font \
+                        $(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
+			$(JDK_TOPDIR)/src/solaris/native/sun/font \
+			$(JDK_TOPDIR)/src/solaris/native/sun/awt \
+			$(JDK_TOPDIR)/src/solaris/native/sun/java2d/opengl \
+			$(JDK_TOPDIR)/src/solaris/native/sun/java2d/x11
+
+LIBAWT_HEADLESS_CFLAGS:=-DHEADLESS=true \
+                          -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \
+			  $(CUPS_CFLAGS) \
+			  $(X_CFLAGS) \
+			  -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
+			  -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/java2d \
+			  -I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
+			  -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
+			  -I$(JDK_TOPDIR)/src/share/native/sun/awt/image \
+			  -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
+			  -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
+			  -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/jdga \
+                          $(foreach dir,$(LIBAWT_HEADLESS_DIRS),-I$(dir))
+
+LIBAWT_HEADLESS_FILES:=\
+	awt_Font.c \
+	HeadlessToolkit.c \
+	fontpath.c \
+	VDrawingArea.c \
+	X11Color.c \
+	X11Renderer.c \
+	X11PMBlitLoops.c \
+	X11SurfaceData.c \
+	X11FontScaler_md.c \
+	X11TextRenderer_md.c \
+        OGLBlitLoops.c \
+        OGLBufImgOps.c \
+        OGLContext.c \
+        OGLFuncs.c \
+        OGLMaskBlit.c \
+        OGLMaskFill.c \
+        OGLPaints.c \
+        OGLRenderQueue.c \
+        OGLRenderer.c \
+        OGLSurfaceData.c \
+        OGLTextRenderer.c \
+        OGLVertexCache.c \
+        GLXGraphicsConfig.c \
+        GLXSurfaceData.c \
+        AccelGlyphCache.c \
+	CUPSfuncs.c
+
+LIBAWT_HEADLESS_LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) -lawt -lm
+
+LIBAWT_HEADLESS_REORDER:=
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+	ifneq ($(ARCH), amd64)
+		LIBAWT_HEADLESS_REORDER:=$(JDK_TOPDIR)/makefiles/mapfiles/libawt_headless/reorder-$(ARCH)
+	endif
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBAWT_HEADLESS,\
+		LIBRARY:=awt_headless,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+		SRC:=$(LIBAWT_HEADLESS_DIRS),\
+		INCLUDE_FILES:=$(LIBAWT_HEADLESS_FILES),\
+		LANG:=C,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) $(LIBAWT_HEADLESS_CFLAGS),\
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libawt_headless/mapfile-vers, \
+		LDFLAGS:=$(LDFLAGS_JDKLIB) \
+			 $(call SET_SHARED_LIBRARY_ORIGIN),\
+		REORDER:=$(LIBAWT_HEADLESS_REORDER), \
+		LDFLAGS_SUFFIX:=$(LIBAWT_HEADLESS_LDFLAGS_SUFFIX),\
+		LDFLAGS_SUFFIX_posix:=$(LIBDL),\
+		LDFLAGS_SUFFIX_macosx:=$(LIBCXX), \
+		LDFLAGS_SUFFIX_solaris:=$(LIBCXX), \
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libawt_headless))
+
+$(BUILD_LIBAWT_HEADLESS) : $(BUILD_LIBAWT)
+
+BUILD_LIBRARIES += $(BUILD_LIBAWT_HEADLESS)
 
 endif
 endif
@@ -1932,38 +2319,38 @@
 ##########################################################################################
 
 ifndef BUILD_HEADLESS_ONLY
-LIBSPLASHSCREEN_DIRS := \
+LIBSPLASHSCREEN_DIRS:=\
 	$(JDK_TOPDIR)/src/share/native/sun/awt/giflib \
 	$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg \
 	$(JDK_TOPDIR)/src/share/native/sun/awt/libpng \
 	$(JDK_TOPDIR)/src/share/native/sun/awt/splashscreen \
-        $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/awt/splashscreen
-
-LIBSPLASHSCREEN_CFLAGS := -DSPLASHSCREEN -DPNG_NO_MMX_CODE \
+        $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/awt/splashscreen
+
+LIBSPLASHSCREEN_CFLAGS:=-DSPLASHSCREEN -DPNG_NO_MMX_CODE \
 	$(foreach dir,$(LIBSPLASHSCREEN_DIRS),-I$(dir))
 
-ifeq ($(PLATFORM), macosx)
-	LIBSPLASHSCREEN_CFLAGS := -I$(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen \
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+	LIBSPLASHSCREEN_CFLAGS:=-I$(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen \
                                   $(LIBSPLASHSCREEN_CFLAGS) \
                                   -F/System/Library/Frameworks/JavaVM.framework/Frameworks
 	LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX
 	LIBSPLASHSCREEN_CFLAGS += -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp
 
-	LIBSPLASHSCREEN_java_awt_SplashScreen.c_CFLAGS := -x objective-c -O0
-	LIBSPLASHSCREEN_splashscreen_gfx_impl.c_CFLAGS := -x objective-c -O0
-	LIBSPLASHSCREEN_splashscreen_gif.c_CFLAGS := -x objective-c -O0
-	LIBSPLASHSCREEN_splashscreen_impl.c_CFLAGS := -x objective-c -O0
-	LIBSPLASHSCREEN_splashscreen_jpeg.c_CFLAGS := -x objective-c -O0
-	LIBSPLASHSCREEN_splashscreen_png.c_CFLAGS := -x objective-c -O0
-	LIBSPLASHSCREEN_splashscreen_sys.m_CFLAGS := -O0
-
-else ifneq ($(PLATFORM), windows)
+	LIBSPLASHSCREEN_java_awt_SplashScreen.c_CFLAGS:=-x objective-c -O0
+	LIBSPLASHSCREEN_splashscreen_gfx_impl.c_CFLAGS:=-x objective-c -O0
+	LIBSPLASHSCREEN_splashscreen_gif.c_CFLAGS:=-x objective-c -O0
+	LIBSPLASHSCREEN_splashscreen_impl.c_CFLAGS:=-x objective-c -O0
+	LIBSPLASHSCREEN_splashscreen_jpeg.c_CFLAGS:=-x objective-c -O0
+	LIBSPLASHSCREEN_splashscreen_png.c_CFLAGS:=-x objective-c -O0
+	LIBSPLASHSCREEN_splashscreen_sys.m_CFLAGS:=-O0
+
+else ifneq ($(OPENJDK_TARGET_OS), windows)
 	LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
 else
 	LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32
 endif
 
-LIBSPLASHSCREEN_FILES := \
+LIBSPLASHSCREEN_FILES:=\
 	java_awt_SplashScreen.c \
 	splashscreen_gfx_impl.c \
 	splashscreen_gif.c \
@@ -2033,14 +2420,14 @@
 	jfdctfst.c \
 	jfdctint.c
 
-ifneq ($(PLATFORM), macosx)
+ifneq ($(OPENJDK_TARGET_OS), macosx)
 LIBSPLASHSCREEN_FILES += splashscreen_sys.c
 else
 LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen
 LIBSPLASHSCREEN_FILES += splashscreen_sys.m
 endif
 
-LIBSPLASHSCREEN_LDFLAGS_SUFFIX :=
+LIBSPLASHSCREEN_LDFLAGS_SUFFIX:=
 
 ifneq ($(USE_EXTERNAL_LIBZ),true)
 	LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
@@ -2063,422 +2450,205 @@
 		zutil.c
 endif
 
-ifeq ($(PLATFORM), macosx)
+ifeq ($(OPENJDK_TARGET_OS), macosx)
 	LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(LIBM) -lpthread -liconv -losxapp \
 				  -framework ApplicationServices \
 				  -framework Foundation \
 				  -framework Cocoa \
                                   -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
 				  -framework JavaNativeFoundation
-else ifneq ($(PLATFORM), windows)
-	LIBSPLASHSCREEN_LDFLAGS_SUFFIX += -L$(OPENWIN_LIB)$(ISA_DIR) -lX11 -lXext $(LIBM) -lpthread $(LIBDL)
-else # PLATFORM
+else ifneq ($(OPENJDK_TARGET_OS), windows)
+	LIBSPLASHSCREEN_LDFLAGS_SUFFIX += -L$(OPENWIN_LIB)$(ISA_DIR) -lX11 -lXext $(LIBM) -lpthread
+else # OPENJDK_TARGET_OS
 	LIBSPLASHSCREEN_LDFLAGS_SUFFIX += kernel32.lib user32.lib gdi32.lib delayimp.lib /DELAYLOAD:user32.dll
-endif # PLATFORM
+endif # OPENJDK_TARGET_OS
 
 $(eval $(call SetupNativeCompilation,LIBSPLASHSCREEN,\
+		LIBRARY:=splashscreen,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(LIBSPLASHSCREEN_DIRS),\
-		INCLUDE_FILES := $(LIBSPLASHSCREEN_FILES),\
+		INCLUDE_FILES:=$(LIBSPLASHSCREEN_FILES),\
 		LANG:=C,\
-		CFLAGS:= $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS),\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libsplashscreen/mapfile-vers, \
-		LDFLAGS:= $(LDFLAGS_JDKLIB) \
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB),\
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libsplashscreen/mapfile-vers, \
+		LDFLAGS:=$(LDFLAGS_JDKLIB) \
 			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX := $(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ),\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libsplashscreen,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)splashscreen$(SHARED_LIBRARY_SUFFIX)))
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)splashscreen$(SHARED_LIBRARY_SUFFIX)
-
-ifeq ($(PLATFORM),macosx)
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)splashscreen$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX) 
+		LDFLAGS_SUFFIX_linux:=$(LIBDL), \
+		LDFLAGS_SUFFIX:=$(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ),\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libsplashscreen))
+
+BUILD_LIBRARIES += $(LIBSPLASHSCREEN)
+
+ifeq ($(OPENJDK_TARGET_OS),macosx)
+$(LIBSPLASHSCREEN) :  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX) 
 endif
 
 endif
 
 ##########################################################################################
 
-LIBAWT_DIRS := \
-	$(JDK_TOPDIR)/src/share/native/sun/awt \
-	$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/awt \
-	$(JDK_TOPDIR)/src/share/native/sun/awt/image \
-	$(JDK_TOPDIR)/src/share/native/sun/awt/image/gif \
-	$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
-	$(JDK_TOPDIR)/src/share/native/sun/awt/shell \
-	$(JDK_TOPDIR)/src/share/native/sun/awt/medialib \
-	$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-	$(JDK_TOPDIR)/src/share/native/sun/awt/utility \
-	$(JDK_TOPDIR)/src/share/native/sun/java2d \
-	$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d \
-	$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \
-	$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \
-	$(JDK_TOPDIR)/src/share/native/sun/awt/image \
-	$(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
-	$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d/opengl \
-	$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d/x11 \
-	$(JDK_TOPDIR)/src/share/native/sun/font \
-	$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/windows \
-	$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d/windows \
-	$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/java2d/d3d
-
-
-LIBAWT_CFLAGS := -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES \
-	$(foreach dir,$(LIBAWT_DIRS),-I$(dir))
-
-LIBAWT_FILES := \
-	gifdecoder.c \
-	imageInitIDs.c \
-	img_globals.c \
-	SurfaceData.c \
-	Region.c \
-	BufImgSurfaceData.c \
-	Disposer.c \
-	Trace.c \
-	GraphicsPrimitiveMgr.c \
-	Blit.c \
-	BlitBg.c \
-	ScaledBlit.c \
-	FillRect.c \
-	FillSpans.c \
-	FillParallelogram.c \
-	DrawParallelogram.c \
-	DrawLine.c \
-	DrawRect.c \
-	DrawPolygons.c \
-	DrawPath.c \
-	FillPath.c \
-	ProcessPath.c \
-	MaskBlit.c \
-	MaskFill.c \
-	TransformHelper.c \
-	AlphaMath.c \
-	AlphaMacros.c \
-	AnyByte.c \
-	ByteBinary1Bit.c \
-	ByteBinary2Bit.c \
-	ByteBinary4Bit.c \
-	ByteIndexed.c \
-	ByteGray.c \
-	Index8Gray.c \
-	Index12Gray.c \
-	AnyShort.c \
-	Ushort555Rgb.c \
-	Ushort565Rgb.c \
-	Ushort4444Argb.c \
-	Ushort555Rgbx.c \
-	UshortGray.c \
-	UshortIndexed.c \
-	Any3Byte.c \
-	ThreeByteBgr.c \
-	AnyInt.c \
-	IntArgb.c \
-	IntArgbPre.c \
-	IntArgbBm.c \
-	IntRgb.c \
-	IntBgr.c \
-	IntRgbx.c \
-	Any4Byte.c \
-	FourByteAbgr.c \
-	FourByteAbgrPre.c \
-	BufferedMaskBlit.c \
-	BufferedRenderPipe.c \
-	ShapeSpanIterator.c \
-	SpanClipRenderer.c \
-	awt_ImageRep.c \
-	awt_ImagingLib.c \
-	awt_Mlib.c \
-	awt_parseImage.c \
-	DataBufferNative.c \
-	dither.c \
-	debug_assert.c \
-	debug_mem.c \
-	debug_trace.c \
-	debug_util.c
-
-ifneq (,$(filter $(PLATFORM), solaris linux))
-	LIBAWT_FILES += awt_LoadLibrary.c initIDs.c img_colors.c
-endif
-
-ifeq ($(PLATFORM),macosx)
-	LIBAWT_DIRS += $(JDK_TOPDIR)/src/macosx/native/com/apple/resources
-	LIBAWT_FILES += awt_LoadLibrary.c MacOSXResourceBundle.m
-	LIBAWT_CFLAGS += -F/System/Library/Frameworks/JavaVM.framework/Frameworks
-
-	LIBAWT_MacOSXResourceBundle.m_CFLAGS := -O0
-endif
-
-ifeq ($(PLATFORM)-$(ARCH_FAMILY), solaris-sparc)
-#
-# TODO...
-#
-
-#	FILES_c += $(FILES_2D_vis)
-#	ASFLAGS += -P
-#	FILES_s += mlib_v_ImageCopy_blk.s
-#	INLINE_VIS = $(PLATFORM_SRC)/native/sun/awt/medialib/vis_$(ARCH_DATA_MODEL).il
-#	CFLAGS_sparcv9 = -DMLIB_OS64BIT
-#	CFLAGS += $(CFLAGS_$(ARCH)) -DMLIB_ADD_SUFF $(INLINE_VIS)
-else
-	LIBAWT_FILES += MapAccelFunc.c
-endif
-
-ifneq ($(PLATFORM),solaris)
-	LIBAWT_CFLAGS += -DMLIB_NO_LIBSUNMATH
-endif
-
-LIBAWT_LANG := C
-
-ifeq ($(PLATFORM),windows)
-	LIBAWT_FILES += AccelGlyphCache.c \
-			ShaderList.c \
-			CmdIDList.cpp \
-			Hashtable.cpp \
-			GDIHashtable.cpp \
-			Devices.cpp \
-			ObjectList.cpp \
-			GDIBlitLoops.cpp \
-			GDIRenderer.cpp \
-			GDIWindowSurfaceData.cpp \
-			WindowsFlags.cpp \
-			WPrinterJob.cpp \
-			awt_%.cpp \
-			D3DBlitLoops.cpp \
-			D3DBufImgOps.cpp \
-			D3DContext.cpp \
-			D3DGlyphCache.cpp \
-			D3DGraphicsDevice.cpp \
-			D3DMaskBlit.cpp \
-			D3DMaskCache.cpp \
-			D3DMaskFill.cpp \
-			D3DPipelineManager.cpp \
-			D3DPaints.cpp \
-			D3DRenderer.cpp \
-			D3DRenderQueue.cpp \
-			D3DResourceManager.cpp \
-			D3DSurfaceData.cpp \
-			D3DTextRenderer.cpp \
-			D3DVertexCacher.cpp \
-			ShellFolder2.cpp \
-			ThemeReader.cpp \
-			ComCtl32Util.cpp \
-			DllUtil.cpp \
-			initIDs.cpp \
-			MouseInfo.cpp \
-			rect.c
-	LIBAWT_LANG := C++
-	LIBAWT_CFLAGS += $(GX_OPTION) -DUNICODE -D_UNICODE
-	ifeq ($(ARCH_DATA_MODEL), 64)
-		LIBAWT_CFLAGS += -DMLIB_OS64BIT
-	endif
-
-	ifdef OPENJDK
-		LIBAWT_RC_FLAGS := -i "$(JDK_TOPDIR)/src/windows/resource/icons"
-	else
-		LIBAWT_RC_FLAGS := -i "$(JDK_TOPDIR)/src/closed/windows/native/sun/windows"
-	endif
-	LIBAWT_VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/native/sun/windows/awt.rc
-endif
-
-ifeq ($(MILESTONE), internal)
-	LIBAWT_CFLAGS += -DINTERNAL_BUILD
-endif
-
-LIBAWT_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libawt/mapfile-vers
-ifeq ($(PLATFORM),linux)
-	LIBAWT_MAPFILE :=
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBAWT,\
-		SRC:=$(LIBAWT_DIRS),\
-		INCLUDE_FILES := $(LIBAWT_FILES),\
-		LANG:=$(LIBAWT_LANG),\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) $(LIBAWT_CFLAGS),\
-		MAPFILE := $(LIBAWT_MAPFILE), \
-		LDFLAGS:=$(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_windows:=advapi32.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
-				 imm32.lib ole32.lib uuid.lib shell32.lib \
-				 comdlg32.lib winmm.lib comctl32.lib \
-				 shlwapi.lib delayimp.lib java.lib jvm.lib \
-				 /DELAYLOAD:user32.dll /DELAYLOAD:gdi32.dll \
-				 /DELAYLOAD:shell32.dll /DELAYLOAD:winmm.dll \
-				 /DELAYLOAD:winspool.drv /DELAYLOAD:imm32.dll \
-				 /DELAYLOAD:ole32.dll /DELAYLOAD:comdlg32.dll \
-				 /DELAYLOAD:comctl32.dll /DELAYLOAD:shlwapi.dll,\
-		LDFLAGS_macosx :=-framework Cocoa \
-				 -framework OpenGL \
-				 -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-				 -framework JavaNativeFoundation \
-				 -framework JavaRuntimeSupport \
-				 -framework ApplicationServices \
-				 -framework AudioToolbox,\
-		LDFLAGS_solaris := -R/usr/dt/lib$(ISA_DIR) -R$(OPENWIN_LIB)$(ISA_DIR),\
-		LDFLAGS_SUFFIX_posix := -ljvm $(LIBM) -ljava $(LIBDL),\
-		VERSIONINFO_RESOURCE := $(LIBAWT_VERSIONINFO_RESOURCE),\
-		RC_FLAGS := $(RC_FLAGS) $(LIBAWT_RC_FLAGS) \
-			  /D "JDK_FNAME=awt.dll" \
-			  /D "JDK_INTERNAL_NAME=awt" \
-			  /D "JDK_FTYPE=0x2L",\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libawt,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)awt$(SHARED_LIBRARY_SUFFIX)))
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)awt$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt$(SHARED_LIBRARY_SUFFIX)
-
-##########################################################################################
-
 ifndef OPENJDK
 
-LIBDCPR_SRC_DIRS := \
+LIBDCPR_SRC_DIRS:=\
 	$(JDK_TOPDIR)/src/closed/share/native/sun/dc/doe \
 	$(JDK_TOPDIR)/src/closed/share/native/sun/dc/path \
 	$(JDK_TOPDIR)/src/closed/share/native/sun/dc/pr \
 	$(JDK_TOPDIR)/src/closed/share/native/sun/dc/util
 
-LIBDCPR_CFLAGS := $(foreach dir,$(LIBDCPR_SRC_DIRS),-I$(dir)) \
+LIBDCPR_CFLAGS:=$(foreach dir,$(LIBDCPR_SRC_DIRS),-I$(dir)) \
 	          -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe
 
 $(eval $(call SetupNativeCompilation,BUILD_LIBDCPR,\
+		LIBRARY:=dcpr,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(LIBDCPR_SRC_DIRS),\
 		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
 			$(LIBDCPR_CFLAGS), \
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libdcpr/mapfile-vers, \
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libdcpr/mapfile-vers, \
 		LDFLAGS:=$(LDFLAGS_JDKLIB) $(LIBM)\
 			 $(call SET_SHARED_LIBRARY_ORIGIN),\
 		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
-		LDFLAGS_SUFFIX_posix := $(LIBDL) -lm,\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libdcpr,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)dcpr$(SHARED_LIBRARY_SUFFIX)))
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)dcpr$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)dcpr$(SHARED_LIBRARY_SUFFIX)
+		LDFLAGS_SUFFIX_posix:=-lm,\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libdcpr))
+
+$(BUILD_LIBDCPR) : $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBDCPR)
 
 endif
 
 ##########################################################################################
 
 $(eval $(call SetupNativeCompilation,BUILD_LIBJ2PCSC,\
+		LIBRARY:=j2pcsc,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(JDK_TOPDIR)/src/share/native/sun/security/smartcardio \
-                     $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/smartcardio,\
+                     $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/security/smartcardio,\
 		LANG:=C,\
-		CFLAGS_posix:= -D__sun_jdk,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
+		CFLAGS_posix:=-D__sun_jdk,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
                      -I$(JDK_TOPDIR)/src/share/native/sun/security/smartcardio \
-                     -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/smartcardio\
-                     -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/smartcardio/MUSCLE,\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libj2pcsc/mapfile-vers, \
+                     -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/security/smartcardio\
+                     -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/security/smartcardio/MUSCLE,\
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libj2pcsc/mapfile-vers, \
 		LDFLAGS:=$(LDFLAGS_JDKLIB) \
 			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX_posix := $(LIBDL), \
-		LDFLAGS_SUFFIX_windows := winscard.lib,\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libj2pcsc,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)j2pcsc$(SHARED_LIBRARY_SUFFIX)))
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)j2pcsc$(SHARED_LIBRARY_SUFFIX)
+		LDFLAGS_SUFFIX_posix:=$(LIBDL), \
+		LDFLAGS_SUFFIX_windows:=winscard.lib,\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libj2pcsc))
+
+BUILD_LIBRARIES += $(BUILD_LIBJ2PCSC)
 
 ##########################################################################################
 
-ifneq ($(PLATFORM), windows)
+ifneq ($(OPENJDK_TARGET_OS), windows)
 $(eval $(call SetupNativeCompilation,BUILD_LIBJ2GSS,\
+		LIBRARY:=j2gss,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(JDK_TOPDIR)/src/share/native/sun/security/jgss/wrapper \
-                     $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/jgss/wrapper,\
+                     $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/security/jgss/wrapper,\
 		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
                      -I$(JDK_TOPDIR)/src/share/native/sun/security/jgss/wrapper \
-                     -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/jgss/wrapper,\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libj2gss/mapfile-vers, \
+                     -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/security/jgss/wrapper,\
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libj2gss/mapfile-vers, \
 		LDFLAGS:=$(LDFLAGS_JDKLIB) \
 			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX := $(LIBDL), \
-		BIN:=$(JDK_OUTPUTDIR)/objs/libj2gss,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)j2gss$(SHARED_LIBRARY_SUFFIX)))
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)j2gss$(SHARED_LIBRARY_SUFFIX)
+		LDFLAGS_SUFFIX:=$(LIBDL), \
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libj2gss))
+
+BUILD_LIBRARIES += $(BUILD_LIBJ2GSS)
 endif
 
 ##########################################################################################
 
-BUILD_LIBKRB5_NAME :=
-ifeq ($(PLATFORM), windows)
-     BUILD_LIBKRB5_NAME := w2k_lsa_auth
-     BUILD_LIBKRB5_FILES := NativeCreds.c WindowsDirectory.c
-     BUILD_LIBKRB5_SRC := $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/krb5
-     BUILD_LIBKRB5_LIBS := Secur32.lib netapi32.lib \
+BUILD_LIBKRB5_NAME:=
+ifeq ($(OPENJDK_TARGET_OS), windows)
+     BUILD_LIBKRB5_NAME:=w2k_lsa_auth
+     BUILD_LIBKRB5_FILES:=NativeCreds.c WindowsDirectory.c
+     BUILD_LIBKRB5_SRC:=$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/security/krb5
+     BUILD_LIBKRB5_LIBS:=Secur32.lib netapi32.lib \
 	kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib \
 	advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib \
 	odbccp32.lib wsock32.lib
-else ifeq ($(PLATFORM), macosx)
-     BUILD_LIBKRB5_NAME := osxkrb5
-     BUILD_LIBKRB5_FILES := nativeccache.c
-     BUILD_LIBKRB5_LIBS := -framework Kerberos
+else ifeq ($(OPENJDK_TARGET_OS), macosx)
+     BUILD_LIBKRB5_NAME:=osxkrb5
+     BUILD_LIBKRB5_FILES:=nativeccache.c
+     BUILD_LIBKRB5_LIBS:=-framework Kerberos
 endif
 
 ifneq ($(BUILD_LIBKRB5_NAME),)
 $(eval $(call SetupNativeCompilation,BUILD_LIBKRB5,\
+		LIBRARY:=$(BUILD_LIBKRB5_NAME),\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(JDK_TOPDIR)/src/share/native/sun/security/krb5 \
                      $(BUILD_LIBKRB5_SRC) ,\
-		INCLUDE_FILES := $(BUILD_LIBKRB5_FILES),\
+		INCLUDE_FILES:=$(BUILD_LIBKRB5_FILES),\
 		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
 		        -I$(JDK_TOPDIR)/src/share/native/sun/security/krb5 \
-                        -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/krb5 ,\
+                        -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/security/krb5 ,\
 		LDFLAGS:=$(LDFLAGS_JDKLIB) \
 			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX := $(BUILD_LIBKRB5_LIBS) ,\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libkrb5,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)$(BUILD_LIBKRB5_NAME)$(SHARED_LIBRARY_SUFFIX)))
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)$(BUILD_LIBKRB5_NAME)$(SHARED_LIBRARY_SUFFIX)
+		LDFLAGS_SUFFIX:=$(BUILD_LIBKRB5_LIBS) ,\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libkrb5))
+
+BUILD_LIBRARIES += $(BUILD_LIBKRB5)
 endif
 
 ##########################################################################################
 
-ifeq ($(PLATFORM), windows)
+ifeq ($(OPENJDK_TARGET_OS), windows)
 
 $(eval $(call SetupNativeCompilation,BUILD_LIBSUNMSCAPI,\
+		LIBRARY:=sunmscapi,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(JDK_TOPDIR)/src/share/native/sun/security/mscapi \
-		     $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/mscapi,\
-		INCLUDE_FILES := security.cpp, \
+		     $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/security/mscapi,\
+		INCLUDE_FILES:=security.cpp, \
 		LANG:=C++,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
 		        -I$(JDK_TOPDIR)/src/share/native/sun/security/mscapi \
-                        -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/mscapi ,\
+                        -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/security/mscapi ,\
 		LDFLAGS:=$(LDFLAGS_JDKLIB) \
 			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX := Crypt32.Lib advapi32.lib,\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libsunmscapi,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)sunmscapi$(SHARED_LIBRARY_SUFFIX)))
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)sunmscapi$(SHARED_LIBRARY_SUFFIX)
+		LDFLAGS_SUFFIX:=Crypt32.Lib advapi32.lib,\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libsunmscapi))
+
+BUILD_LIBRARIES += $(BUILD_LIBSUNMSCAPI)
 endif
 
 ##########################################################################################
 
-ifneq ($(PLATFORM)-$(ARCH_DATA_MODEL), windows-64)
+ifneq ($(OPENJDK_TARGET_OS)-$(ARCH_DATA_MODEL), windows-64)
 $(eval $(call SetupNativeCompilation,BUILD_LIBJ2PKCS11,\
+		LIBRARY:=j2pkcs11,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(JDK_TOPDIR)/src/share/native/sun/security/pkcs11 \
-                     $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/pkcs11 \
+                     $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/security/pkcs11 \
                      $(JDK_TOPDIR)/src/share/native/sun/security/pkcs11/wrapper \
-                     $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/pkcs11/wrapper,\
+                     $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/security/pkcs11/wrapper,\
 		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
 		        -I$(JDK_TOPDIR)/src/share/native/sun/security/pkcs11 \
-		        -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/pkcs11 \
+		        -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/security/pkcs11 \
 		        -I$(JDK_TOPDIR)/src/share/native/sun/security/pkcs11/wrapper \
-                        -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/security/pkcs11/wrapper,\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libj2pkcs11/mapfile-vers, \
+                        -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/security/pkcs11/wrapper,\
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libj2pkcs11/mapfile-vers, \
 		LDFLAGS:=$(LDFLAGS_JDKLIB) \
 			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX_posix := $(LIBDL), \
-		BIN:=$(JDK_OUTPUTDIR)/objs/libj2pkcs11,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)j2pkcs11$(SHARED_LIBRARY_SUFFIX)))
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)j2pkcs11$(SHARED_LIBRARY_SUFFIX)
+		LDFLAGS_SUFFIX_posix:=$(LIBDL), \
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libj2pkcs11))
+
+BUILD_LIBRARIES += $(BUILD_LIBJ2PKCS11)
 endif
 
 ##########################################################################################
@@ -2488,40 +2658,56 @@
 # TODO Set DISABLE_INTREE_EC in configure if src/share/native/sun/security/ec/impl
 #      is not present
 #
-BUILD_LIBSUNEC_FLAGS := -DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B \
-                        -I$(JDK_TOPDIR)/src/share/native/sun/security/ec \
-                        -I$(JDK_TOPDIR)/src/share/native/sun/security/ec/impl
+BUILD_LIBSUNEC_FLAGS:= -I$(JDK_TOPDIR)/src/share/native/sun/security/ec \
+                       -I$(JDK_TOPDIR)/src/share/native/sun/security/ec/impl
+
+#
+# On sol-sparc...all libraries are compiled with -xregs=no%appl
+#   (set in CFLAGS_REQUIRED_sparc)
+#
+# except!!! libsunec.so
+#
+ECC_JNI_SOLSPARC_FILTER:=
+ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
+     ECC_JNI_SOLSPARC_FILTER:=-xregs=no%appl
+endif
 
 $(eval $(call SetupNativeCompilation,BUILD_LIBSUNEC,\
+		LIBRARY:=sunec,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(JDK_TOPDIR)/src/share/native/sun/security/ec \
                      $(JDK_TOPDIR)/src/share/native/sun/security/ec/impl, \
-		LANG := C++, \
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) $(BUILD_LIBSUNEC_FLAGS),\
-		CXXFLAGS:=$(CXXFLAGS_JDKLIB) $(CXX_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) $(BUILD_LIBSUNEC_FLAGS),\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libsunec/mapfile-vers, \
+		LANG:=C++, \
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CFLAGS_JDKLIB))\
+                        $(BUILD_LIBSUNEC_FLAGS) \
+                        -DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B,\
+		CXXFLAGS:=$(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CXXFLAGS_JDKLIB)) \
+                          $(BUILD_LIBSUNEC_FLAGS),\
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libsunec/mapfile-vers, \
 		LDFLAGS:=$(LDFLAGS_JDKLIB) \
 			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_SUFFIX := $(LIBCXX),\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libsunec,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)sunec$(SHARED_LIBRARY_SUFFIX)))
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)sunec$(SHARED_LIBRARY_SUFFIX)
+		LDFLAGS_SUFFIX:=$(LIBCXX),\
+                LDFLAGS_SUFFIX_solaris:=-lc ,\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libsunec))
+
+BUILD_LIBRARIES += $(BUILD_LIBSUNEC)
 endif
 
 ##########################################################################################
 
-LIBJSOUND_SRC_DIRS := \
+LIBJSOUND_SRC_DIRS:=\
 	$(JDK_TOPDIR)/src/share/native/com/sun/media/sound \
-	$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/com/sun/media/sound
-
-LIBJSOUND_SRC_FILES := Utilities.c Platform.c
-
-LIBJSOUND_LANG := C
-LIBJSOUND_CFLAGS := $(foreach dir,$(LIBJSOUND_SRC_DIRS),-I$(dir))
-
-EXTRA_SOUND_JNI_LIBS := 
-
-LIBJSOUND_MIDIFILES := \
+	$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/com/sun/media/sound
+
+LIBJSOUND_SRC_FILES:=Utilities.c Platform.c
+
+LIBJSOUND_LANG:=C
+LIBJSOUND_CFLAGS:=$(foreach dir,$(LIBJSOUND_SRC_DIRS),-I$(dir))
+
+EXTRA_SOUND_JNI_LIBS:=
+
+LIBJSOUND_MIDIFILES:=\
 	MidiInDevice.c \
 	MidiInDeviceProvider.c \
 	MidiOutDevice.c \
@@ -2529,16 +2715,16 @@
 	PlatformMidi.c
 
 # files needed for ports
-LIBJSOUND_PORTFILES := \
+LIBJSOUND_PORTFILES:=\
 	PortMixerProvider.c \
 	PortMixer.c
 
 # files needed for direct audio
-LIBJSOUND_DAUDIOFILES := \
+LIBJSOUND_DAUDIOFILES:=\
 	DirectAudioDeviceProvider.c \
 	DirectAudioDevice.c
 
-ifeq ($(PLATFORM), windows)
+ifeq ($(OPENJDK_TARGET_OS), windows)
 	EXTRA_SOUND_JNI_LIBS += jsoundds
 	LIBJSOUND_CFLAGS += -DX_PLATFORM=X_WINDOWS \
                             -DUSE_PLATFORM_MIDI_OUT=TRUE \
@@ -2551,15 +2737,15 @@
 		PLATFORM_API_WinOS_Ports.c
 	LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES)
 	LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES)
-endif # PLATFORM windows
-
-ifeq ($(PLATFORM), linux)
+endif # OPENJDK_TARGET_OS windows
+
+ifeq ($(OPENJDK_TARGET_OS), linux)
 	EXTRA_SOUND_JNI_LIBS += jsoundalsa
 	LIBJSOUND_CFLAGS += -DX_PLATFORM=X_LINUX
-endif # PLATFORM linux
-
-ifeq ($(PLATFORM), macosx)
-	LIBJSOUND_LANG := C++
+endif # OPENJDK_TARGET_OS linux
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+	LIBJSOUND_LANG:=C++
 	LIBJSOUND_CFLAGS += -DX_PLATFORM=X_MACOSX \
                             -DUSE_PORTS=TRUE \
                             -DUSE_DAUDIO=TRUE \
@@ -2576,9 +2762,9 @@
 	LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES)
 	LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES)
 	LIBJSOUND_SRC_FILES += $(LIBJSOUND_DAUDIOFILES)
-endif # PLATFORM macosx
-
-ifeq ($(PLATFORM), solaris)
+endif # OPENJDK_TARGET_OS macosx
+
+ifeq ($(OPENJDK_TARGET_OS), solaris)
 	LIBJSOUND_CFLAGS += -DX_PLATFORM=X_SOLARIS \
                             -DUSE_PORTS=TRUE \
                             -DUSE_DAUDIO=TRUE
@@ -2589,7 +2775,7 @@
 	LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES)
 	LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES)
 	LIBJSOUND_SRC_FILES += $(LIBJSOUND_DAUDIOFILES)
-endif # PLATFORM solaris
+endif # OPENJDK_TARGET_OS solaris
 
 
 ifeq ($(JVM_VARIANT_ZERO), true)
@@ -2623,37 +2809,38 @@
 LIBJSOUND_CFLAGS += -DEXTRA_SOUND_JNI_LIBS='"$(EXTRA_SOUND_JNI_LIBS)"'
 
 $(eval $(call SetupNativeCompilation,BUILD_LIBJSOUND,\
+		LIBRARY:=jsound,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(LIBJSOUND_SRC_DIRS),\
-		INCLUDE_FILES := $(LIBJSOUND_SRC_FILES),\
+		INCLUDE_FILES:=$(LIBJSOUND_SRC_FILES),\
 		LANG:=$(LIBJSOUND_LANG),\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
-			$(LIBJSOUND_CFLAGS), \
-		CXXFLAGS:=$(CXXFLAGS_JDKLIB) $(CXX_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
-			$(LIBJSOUND_CFLAGS), \
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjsound/mapfile-vers, \
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) $(LIBJSOUND_CFLAGS), \
+		CXXFLAGS:=$(CXXFLAGS_JDKLIB) $(LIBJSOUND_CFLAGS), \
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjsound/mapfile-vers, \
 		LDFLAGS:=$(LDFLAGS_JDKLIB)\
 			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_windows:=java.lib advapi32.lib winmm.lib,\
+		LDFLAGS_windows:=$(WIN_JAVA_LIB) advapi32.lib winmm.lib,\
 		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
 		LDFLAGS_SUFFIX_solaris:=-lc ,\
-		LDFLAGS_SUFFIX_macosx := -framework CoreAudio -framework CoreFoundation \
+		LDFLAGS_SUFFIX_macosx:=-framework CoreAudio -framework CoreFoundation \
              -framework CoreServices -framework AudioUnit $(LIBCXX) \
              -framework CoreMIDI -framework AudioToolbox ,\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libjsound,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jsound$(SHARED_LIBRARY_SUFFIX)))
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jsound$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)jsound$(SHARED_LIBRARY_SUFFIX)
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjsound))
+
+$(BUILD_LIBJSOUND) : $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBJSOUND)
 
 ##########################################################################################
 
 ifneq ($(filter jsoundalsa, $(EXTRA_SOUND_JNI_LIBS)),)
 
 $(eval $(call SetupNativeCompilation,BUILD_LIBJSOUNDALSA,\
+		LIBRARY:=jsoundalsa,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(LIBJSOUND_SRC_DIRS),\
-		INCLUDE_FILES := Utilities.c $(LIBJSOUND_MIDIFILES) $(LIBJSOUND_PORTFILES) \
+		INCLUDE_FILES:=Utilities.c $(LIBJSOUND_MIDIFILES) $(LIBJSOUND_PORTFILES) \
                                 $(LIBJSOUND_DAUDIOFILES) \
 				PLATFORM_API_LinuxOS_ALSA_CommonUtils.c   \
 				PLATFORM_API_LinuxOS_ALSA_PCM.c     \
@@ -2662,24 +2849,23 @@
 				PLATFORM_API_LinuxOS_ALSA_MidiOut.c \
 				PLATFORM_API_LinuxOS_ALSA_MidiUtils.c \
 				PLATFORM_API_LinuxOS_ALSA_Ports.c,\
-		LANG := C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
+		LANG:=C,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
 			$(LIBJSOUND_CFLAGS) \
 			-DUSE_DAUDIO=TRUE \
 			-DUSE_PORTS=TRUE  \
 			-DUSE_PLATFORM_MIDI_OUT=TRUE \
 			-DUSE_PLATFORM_MIDI_IN=TRUE, \
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libjsoundalsa/mapfile-vers, \
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjsoundalsa/mapfile-vers, \
 		LDFLAGS:=$(LDFLAGS_JDKLIB)\
 			 $(call SET_SHARED_LIBRARY_ORIGIN),\
 		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) -lasound,\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libjsoundalsa,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jsoundalsa$(SHARED_LIBRARY_SUFFIX)))
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jsoundalsa$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)jsoundalsa$(SHARED_LIBRARY_SUFFIX)
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjsoundalsa))
+
+$(BUILD_LIBJSOUNDALSA) : $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBJSOUNDALSA)
 
 endif
 
@@ -2688,104 +2874,113 @@
 ifneq ($(filter jsoundds, $(EXTRA_SOUND_JNI_LIBS)),)
 
 $(eval $(call SetupNativeCompilation,BUILD_LIBJSOUNDDS,\
+		LIBRARY:=jsoundds,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(LIBJSOUND_SRC_DIRS),\
-		INCLUDE_FILES := Utilities.c $(LIBJSOUND_DAUDIOFILES) \
+		INCLUDE_FILES:=Utilities.c $(LIBJSOUND_DAUDIOFILES) \
 				PLATFORM_API_WinOS_DirectSound.cpp, \
-		LANG := C++,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
+		LANG:=C++,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
 			$(LIBJSOUND_CFLAGS) \
 			-DUSE_DAUDIO=TRUE, \
 		LDFLAGS:=$(LDFLAGS_JDKLIB)\
 			 $(call SET_SHARED_LIBRARY_ORIGIN),\
 		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) dsound.lib winmm.lib user32.lib ole32.lib,\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libjsoundds,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jsoundds$(SHARED_LIBRARY_SUFFIX)))
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jsoundds$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)jsoundds$(SHARED_LIBRARY_SUFFIX)
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjsoundds))
+
+$(BUILD_LIBJSOUNDDS) : $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBJSOUNDDS)
 
 endif
 
 ##########################################################################################
 
-ifeq ($(PLATFORM), solaris)
+ifeq ($(OPENJDK_TARGET_OS), solaris)
 ifndef OPENJDK
 
 $(eval $(call SetupNativeCompilation,BUILD_LIBJ2UCRYPTO,\
+		LIBRARY:=j2ucrypto,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(JDK_TOPDIR)/src/closed/solaris/native/com/oracle/security/ucrypto,\
-		LANG := C,\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
+		LANG:=C,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
 			-I$(JDK_TOPDIR)/src/closed/solaris/native/com/oracle/security/ucrypto ,\
-		MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libj2ucrypto/mapfile-vers, \
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libj2ucrypto/mapfile-vers, \
 		LDFLAGS:=$(LDFLAGS_JDKLIB)\
 			 $(call SET_SHARED_LIBRARY_ORIGIN), \
 		LDFLAGS_SUFFIX:=$(LIBDL),\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libj2ucrypto,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)j2ucrypto$(SHARED_LIBRARY_SUFFIX)))
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)j2ucrypto$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)j2ucrypto$(SHARED_LIBRARY_SUFFIX)
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libj2ucrypto))
+
+$(BUILD_LIBJ2UCRYPTO) : $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBJ2UCRYPTO)
 
 endif
 endif
 
 ##########################################################################################
 
-ifeq ($(PLATFORM), macosx)
-
-LIBAPPLESCRIPTENGINE_FILES := \
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+
+LIBAPPLESCRIPTENGINE_FILES:=\
 	AppleScriptEngine.m \
         AppleScriptExecutionContext.m \
         AS_NS_ConversionUtils.m \
         NS_Java_ConversionUtils.m
 
 $(eval $(call SetupNativeCompilation,BUILD_LIBAPPLESCRIPTENGINE,\
+		LIBRARY:=AppleScriptEngine,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(JDK_TOPDIR)/src/macosx/native/apple/applescript,\
-		LANG := C,\
+		LANG:=C,\
 		INCLUDE_FILES:=$(LIBAPPLESCRIPTENGINE_FILES),\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
 			-I$(JDK_TOPDIR)/src/macosx/native/apple/applescript \
 			-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
                         -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks, \
 		LDFLAGS:=$(LDFLAGS_JDKLIB)\
 			 $(call SET_SHARED_LIBRARY_ORIGIN), \
-		LDFLAGS_SUFFIX:= \
+		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) \
     -framework Cocoa \
     -framework Carbon \
     -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
     -framework JavaNativeFoundation, \
-		BIN:=$(JDK_OUTPUTDIR)/objs/libAppleScriptEngine,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)AppleScriptEngine$(SHARED_LIBRARY_SUFFIX)))
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)AppleScriptEngine$(SHARED_LIBRARY_SUFFIX)
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libAppleScriptEngine))
+
+$(BUILD_LIBAPPLESCRIPTENGINE) : $(BUILD_LIBJAVA)
+
+BUILD_LIBRARIES += $(BUILD_LIBAPPLESCRIPTENGINE)
 
 endif
 
 ##########################################################################################
 
-ifeq ($(PLATFORM), macosx)
-
-LIBOSXAPP_FILES := \
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+
+LIBOSXAPP_FILES:=\
 	NSApplicationAWT.m \
 	QueuingApplicationDelegate.m \
 	PropertiesUtilities.m \
 	ThreadUtilities.m
 
 $(eval $(call SetupNativeCompilation,BUILD_LIBOSXAPP,\
+		LIBRARY:=osxapp,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(JDK_TOPDIR)/src/macosx/native/sun/osxapp,\
-		LANG := C,\
+		LANG:=C,\
 		INCLUDE_FILES:=$(LIBOSXAPP_FILES),\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
 			-I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
                         -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
                         -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks,\
 		LDFLAGS:=$(LDFLAGS_JDKLIB)\
 			 $(call SET_SHARED_LIBRARY_ORIGIN), \
-		LDFLAGS_SUFFIX_macosx := \
+		LDFLAGS_SUFFIX_macosx:=\
 	-framework Accelerate \
 	-framework ApplicationServices \
 	-framework AudioToolbox \
@@ -2799,18 +2994,17 @@
 	-framework OpenGL \
 	-framework IOSurface \
 	-framework QuartzCore, \
-		BIN:=$(JDK_OUTPUTDIR)/objs/libosxapp,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX)))
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX)
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libosxapp))
+
+BUILD_LIBRARIES += $(BUILD_LIBOSXAPP)
 
 endif
 
 ##########################################################################################
 
-ifeq ($(PLATFORM), macosx)
-
-LIBOSX_FILES := \
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+
+LIBOSX_FILES:=\
     Dispatch.m \
     CFileManager.m \
     KeystoreImpl.m \
@@ -2818,7 +3012,7 @@
     MacOSXPreferencesFile.m \
     SCDynamicStoreConfig.m
 
-LIBOSX_DIRS := \
+LIBOSX_DIRS:=\
   $(JDK_TOPDIR)/src/macosx/native/com/apple/concurrent \
   $(JDK_TOPDIR)/src/macosx/native/java/util \
   $(JDK_TOPDIR)/src/macosx/native/com/apple/eio \
@@ -2826,17 +3020,20 @@
   $(JDK_TOPDIR)/src/macosx/native/apple/launcher
 
 $(eval $(call SetupNativeCompilation,BUILD_LIBOSX,\
+		LIBRARY:=osx,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(LIBOSX_DIRS),\
-		LANG := C,\
+		LANG:=C,\
 		INCLUDE_FILES:=$(LIBOSX_FILES),\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
                         $(foreach dir,$(LIBOSX_DIRS),-I$(dir)) \
                         -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
                         -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
                         -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks,\
 		LDFLAGS:=$(LDFLAGS_JDKLIB)\
 			 $(call SET_SHARED_LIBRARY_ORIGIN), \
-		LDFLAGS_SUFFIX_macosx := \
+		LDFLAGS_SUFFIX_macosx:=\
     -losxapp \
     -framework Cocoa \
     -framework ApplicationServices \
@@ -2846,24 +3043,21 @@
     -framework Security \
     -framework SystemConfiguration \
     $(LDFLAGS_JDKLIB_SUFFIX), \
-		BIN:=$(JDK_OUTPUTDIR)/objs/libosx,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)osx$(SHARED_LIBRARY_SUFFIX)))
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osx$(SHARED_LIBRARY_SUFFIX)
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)osx$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX) 
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)osx$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libosx))
+
+BUILD_LIBRARIES += $(BUILD_LIBOSX)
+
+$(BUILD_LIBOSX) : $(BUILD_LIBOSXAPP)
+
+$(BUILD_LIBOSX) : $(BUILD_LIBJAVA)
 
 endif
 
 ##########################################################################################
 
-ifeq ($(PLATFORM), macosx)
-
-LIBAWT_LWAWT_FILES := \
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+
+LIBAWT_LWAWT_FILES:=\
         awt.m \
         ApplicationDelegate.m \
         CFRetainedResource.m \
@@ -2938,7 +3132,7 @@
         CUPSfuncs.c
 
 
-LIBAWT_LWAWT_DIRS := \
+LIBAWT_LWAWT_DIRS:=\
   $(JDK_TOPDIR)/src/macosx/native/sun/awt \
   $(JDK_TOPDIR)/src/macosx/native/sun/font \
   $(JDK_TOPDIR)/src/macosx/native/sun/java2d/opengl \
@@ -2947,10 +3141,13 @@
   $(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
 
 $(eval $(call SetupNativeCompilation,BUILD_LIBAWT_LWAWT,\
+		LIBRARY:=awt_lwawt,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(LIBAWT_LWAWT_DIRS),\
-		LANG := C,\
+		LANG:=C,\
 		INCLUDE_FILES:=$(LIBAWT_LWAWT_FILES),\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
                         $(foreach dir,$(LIBAWT_LWAWT_DIRS),-I$(dir)) \
                         -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
                         -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
@@ -2964,7 +3161,7 @@
                         -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks,\
 		LDFLAGS:=$(LDFLAGS_JDKLIB)\
 			 $(call SET_SHARED_LIBRARY_ORIGIN), \
-		LDFLAGS_SUFFIX_macosx := \
+		LDFLAGS_SUFFIX_macosx:=\
 	-lawt -lmlib_image -losxapp $(LDFLAGS_JDKLIB_SUFFIX) $(LIBM) \
 	-framework Accelerate \
 	-framework ApplicationServices \
@@ -2978,30 +3175,25 @@
 	-framework JavaRuntimeSupport \
 	-framework OpenGL \
         -framework QuartzCore ,\
-		BIN:=$(JDK_OUTPUTDIR)/objs/libawt_lwawt,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX)))
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX)
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt$(SHARED_LIBRARY_SUFFIX) 
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)mlib_image$(SHARED_LIBRARY_SUFFIX) 
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX) 
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libawt_lwawt))
+
+BUILD_LIBRARIES += $(BUILD_LIBAWT_LWAWT)
+
+$(BUILD_LIBAWT_LWAWT) : $(BUILD_LIBAWT) 
+
+$(BUILD_LIBAWT_LWAWT) : $(BUILD_LIBMLIB_IMAGE)
+
+$(BUILD_LIBAWT_LWAWT) : $(BUILD_LIBOSXAPP)
+
+$(BUILD_LIBAWT_LWAWT) : $(BUILD_LIBJAVA)
 
 endif
 
 ##########################################################################################
 
-ifeq ($(PLATFORM), macosx)
-
-LIBOSXUI_FILES := \
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+
+LIBOSXUI_FILES:=\
         AquaFileView.m \
         AquaLookAndFeel.m \
         AquaNativeResources.m \
@@ -3012,17 +3204,21 @@
         ScreenMenu.m
 
 $(eval $(call SetupNativeCompilation,BUILD_LIBOSXUI,\
+		LIBRARY:=osxui,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
 		SRC:=$(JDK_TOPDIR)/src/macosx/native/com/apple/laf,\
-		LANG := C,\
+		LANG:=C,\
 		INCLUDE_FILES:=$(LIBOSXUI_FILES),\
-		CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(CFLAGS_JDKLIB) \
                         -I$(JDK_TOPDIR)/src/macosx/native/com/apple/laf \
 			-I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
 			-I$(JDK_TOPDIR)/src/macosx/native/sun/awt \
                         -F/System/Library/Frameworks/JavaVM.framework/Frameworks, \
 		LDFLAGS:=$(LDFLAGS_JDKLIB)\
 			 $(call SET_SHARED_LIBRARY_ORIGIN), \
-		LDFLAGS_SUFFIX_macosx := \
+		LDFLAGS_SUFFIX_macosx:=\
+    $(LDFLAGS_JDKLIB_SUFFIX) \
     -lawt -losxapp -lawt_lwawt \
     -framework Cocoa \
     -framework Carbon \
@@ -3030,22 +3226,49 @@
     -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
     -framework JavaNativeFoundation \
     -framework JavaRuntimeSupport, \
-		BIN:=$(JDK_OUTPUTDIR)/objs/libosxui,\
-		LIB:=$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)osxui$(SHARED_LIBRARY_SUFFIX)))
-
-BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxui$(SHARED_LIBRARY_SUFFIX)
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)osxui$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt$(SHARED_LIBRARY_SUFFIX) 
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)osxui$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX) 
-
-$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)osxui$(SHARED_LIBRARY_SUFFIX) : \
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX) 
-
-#$(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)osxui$(SHARED_LIBRARY_SUFFIX) : \
-#  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) 
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libosxui))
+
+BUILD_LIBRARIES += $(BUILD_LIBOSXUI)
+
+$(BUILD_LIBOSXUI) : $(BUILD_LIBAWT) 
+
+$(BUILD_LIBOSXUI) : $(BUILD_LIBOSXAPP)
+
+$(BUILD_LIBOSXUI) : $(BUILD_LIBAWT_LWAWT)
+
+#$(BUILD_LIBOSXUI) : $(BUILD_LIBJAVA)
+
+endif
+
+##########################################################################################
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBJOBJC,\
+		LIBRARY:=JObjC,\
+                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
+		SRC:=$(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/native \
+                     $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/native ,\
+		LANG:=C,\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=-fpascal-strings \
+                        -fobjc-gc \
+                        -gdwarf-2 \
+                        $(CFLAGS_JDKLIB) \
+                        -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+			, \
+		LDFLAGS:=-fpascal-strings \
+                         -fobjc-gc \
+                         -gdwarf-2 \
+                         $(LDFLAGS_JDKLIB)\
+			 $(call SET_SHARED_LIBRARY_ORIGIN), \
+		LDFLAGS_SUFFIX:=-framework Foundation -framework JavaVM \
+                                  -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+                                  -framework JavaNativeFoundation \
+                                  -lffi, \
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjobjc))
+
+BUILD_LIBRARIES += $(BUILD_LIBJOBJC)
 
 endif
 
--- a/jdk/makefiles/CopyFiles.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/CopyFiles.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -25,12 +25,12 @@
 
 INCLUDEDIR = $(JDK_OUTPUTDIR)/include
 
-PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM)
+OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/$(OPENJDK_TARGET_OS)
 
-ifeq ($(PLATFORM), windows)
-     PLATFORM_INCLUDE = $(INCLUDEDIR)/win32
-else ifeq ($(PLATFORM), macosx)
-     PLATFORM_INCLUDE = $(INCLUDEDIR)/darwin
+ifeq ($(OPENJDK_TARGET_OS), windows)
+     OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/win32
+else ifeq ($(OPENJDK_TARGET_OS), macosx)
+     OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/darwin
 endif
 
 #
@@ -42,15 +42,15 @@
 		$(INCLUDEDIR)/jvmticmlr.h		\
 		$(INCLUDEDIR)/classfile_constants.h	\
 		$(INCLUDEDIR)/jawt.h			\
-		$(PLATFORM_INCLUDE)/jni_md.h		\
-		$(PLATFORM_INCLUDE)/jawt_md.h
+		$(OPENJDK_TARGET_OS_INCLUDE)/jni_md.h		\
+		$(OPENJDK_TARGET_OS_INCLUDE)/jawt_md.h
 
 $(INCLUDEDIR)/%.h: $(JDK_TOPDIR)/src/share/javavm/export/%.h
 	$(MKDIR) -p $(@D)
 	$(RM) -f $@
 	$(CP) $< $@
 
-$(PLATFORM_INCLUDE)/%.h: $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/javavm/export/%.h
+$(OPENJDK_TARGET_OS_INCLUDE)/%.h: $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/javavm/export/%.h
 	$(MKDIR) -p $(@D)
 	$(RM) -f $@
 	$(CP) $< $@
@@ -83,6 +83,13 @@
 	$(CP) $< $@
 	$(CHMOD) 644 $@
 
+# this file has different permissions...don't know why...
+$(MGMT_LIBDIR)/jmxremote.access: $(MGMT_LIB_SRC)/jmxremote.access
+	$(MKDIR) -p $(@D)
+	$(RM) -f $@
+	$(CP) $< $@
+	$(CHMOD) 644 $@
+
 $(MGMT_LIBDIR)/%: $(MGMT_LIB_SRC)/%
 	$(MKDIR) -p $(@D)
 	$(RM) -f $@
@@ -121,9 +128,13 @@
 #
 # Copy flavormap.properties, cursor.properties and cursors gif files to LIBDIR
 #
-PLATFORM_LIB_SRC = $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/lib
+ifneq ($(OPENJDK_TARGET_OS), macosx)
+OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/lib
+else
+OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/macosx/lib
+endif
 
-$(LIBDIR)/flavormap.properties: $(PLATFORM_LIB_SRC)/flavormap.properties
+$(LIBDIR)/flavormap.properties: $(OPENJDK_TARGET_OS_LIB_SRC)/flavormap.properties
 	$(MKDIR) -p $(@D)
 	$(RM) -f $@
 	$(CP) $< $@
@@ -131,9 +142,9 @@
 COPY_FILES += $(LIBDIR)/flavormap.properties
 
 CURSORS_DEST_DIR = $(LIBDIR)/images/cursors
-CURSORS_PLATFORM_LIB_SRC = $(PLATFORM_LIB_SRC)/images/cursors
+CURSORS_OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/lib/images/cursors
 
-$(CURSORS_DEST_DIR)/cursors.properties: $(CURSORS_PLATFORM_LIB_SRC)/cursors.properties
+$(CURSORS_DEST_DIR)/cursors.properties: $(CURSORS_OPENJDK_TARGET_OS_LIB_SRC)/cursors.properties
 	$(MKDIR) -p $(@D)
 	$(RM) -f $@
 	$(CP) $< $@
@@ -141,11 +152,11 @@
 COPY_FILES += $(CURSORS_DEST_DIR)/cursors.properties
 
 CURSORS_LIB_SRC = $(JDK_TOPDIR)/src/share/lib/images/cursors
-ifeq ($(PLATFORM), windows)
+ifeq ($(OPENJDK_TARGET_OS), windows)
 CURSORS_SRC_FILES = $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/win32_*.gif)
-else # PLATFORM
+else # OPENJDK_TARGET_OS
 CURSORS_SRC_FILES = $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/motif_*.gif)
-endif # PLATFORM
+endif # OPENJDK_TARGET_OS
 CURSORS_TARGET_FILES =  $(subst $(CURSORS_LIB_SRC),$(CURSORS_DEST_DIR),$(CURSORS_SRC_FILES))
 
 $(CURSORS_DEST_DIR)/%: $(CURSORS_LIB_SRC)/%
@@ -157,7 +168,7 @@
 
 ##########################################################################################
 
-CONTENT_TYPES_SRC=$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/lib
+CONTENT_TYPES_SRC=$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/lib
 
 $(LIBDIR)/content-types.properties: $(CONTENT_TYPES_SRC)/content-types.properties
 	$(MKDIR) -p $(@D)
@@ -179,9 +190,9 @@
 
 ##########################################################################################
 
-ifeq ($(PLATFORM),windows)
+ifeq ($(OPENJDK_TARGET_OS),windows)
 
-TZMAPPINGS_SRC := $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/lib
+TZMAPPINGS_SRC := $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/lib
 
 $(LIBDIR)/tzmappings: $(TZMAPPINGS_SRC)/tzmappings
 	$(MKDIR) -p $(@D)
@@ -233,7 +244,7 @@
 #TODO: rework this to avoid hardcoding library name in the makefile
 #
 ifdef OPENJDK
-    ifeq ($(PLATFORM), windows)
+    ifeq ($(OPENJDK_TARGET_OS), windows)
         FREETYPE_LIB = $(JDK_OUTPUTDIR)/bin/$(call SHARED_LIBRARY,freetype)
     else 
         ifeq ($(USING_SYSTEM_FT_LIB), false)
@@ -243,7 +254,7 @@
 
     $(FREETYPE_LIB): $(FREETYPE2_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
 	$(CP) $(FREETYPE2_LIB_PATH)/$(call SHARED_LIBRARY,freetype) $@
-    ifeq ($(BUILD_OS), windows)
+    ifeq ($(OPENJDK_BUILD_OS), windows)
 	$(CHMOD) +rx $@
     endif
 
@@ -254,7 +265,7 @@
 
 # Copy msvcr100.dll on windows
 
-ifeq ($(PLATFORM),windows)
+ifeq ($(OPENJDK_TARGET_OS),windows)
     MSVCRNN_TARGET := $(JDK_OUTPUTDIR)/bin/$(notdir $(MSVCRNN_DLL))
     $(MSVCRNN_TARGET): $(MSVCRNN_DLL)
 	$(MKDIR) -p $(@D)
@@ -286,14 +297,14 @@
     JVMCFG_ARCH := $(ARCH)
 endif
 
-ifeq ($(PLATFORM),macosx)
+ifeq ($(OPENJDK_TARGET_OS),macosx)
   ifeq ($(JVMCFG_ARCH),amd64)
       JVMCFG_ARCH := x86_64
   endif
   JVMCFG_SRC := $(JDK_TOPDIR)/src/macosx/bin/$(JVMCFG_ARCH)/jvm.cfg
   JVMCFG_DIR := $(JDK_OUTPUTDIR)/lib
 else
-  JVMCFG_SRC := $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/bin/$(JVMCFG_ARCH)/jvm.cfg
+  JVMCFG_SRC := $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/bin/$(JVMCFG_ARCH)/jvm.cfg
   JVMCFG_DIR := $(JDK_OUTPUTDIR)/lib/$(LIBARCH)
 endif
 
@@ -353,15 +364,15 @@
 PROPS_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.security
 PROPS_DST := $(JDK_OUTPUTDIR)/lib/security/java.security
 
-ifeq ($(PLATFORM), solaris)
+ifeq ($(OPENJDK_TARGET_OS), solaris)
 	PROPS_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.security-solaris
 endif
 
-ifeq ($(PLATFORM), windows)
+ifeq ($(OPENJDK_TARGET_OS), windows)
 	PROPS_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.security-windows
 endif
 
-ifeq ($(PLATFORM), macosx)
+ifeq ($(OPENJDK_TARGET_OS), macosx)
 	PROPS_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.security-macosx
 endif
 
@@ -453,7 +464,7 @@
 
 COPY_FILES += $(SHARED_FONTS_DST) $(SHARED_FONTS_DST_DIR)/fonts.dir
 
-ifeq ($(PLATFORM), linux)
+ifeq ($(OPENJDK_TARGET_OS), linux)
 
 # The oblique fonts are only needed/wanted on Linux.
 
@@ -532,11 +543,13 @@
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(CP) $< $@
+	$(CHMOD) 755 $@
 
 $(JDK_OUTPUTDIR)/lib/$(LIBARCH)/libjdgaSUNW%.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(ARCH)/libjdgaSUNW%.so
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(CP) $< $@
+	$(CHMOD) 755 $@
 
 $(JDK_OUTPUTDIR)/lib/$(LIBARCH)/libjdgaSUNWafb.so: $(JDK_OUTPUTDIR)/lib/$(LIBARCH)/libjdgaSUNWffb.so
 	$(MKDIR) -p $(@D)
@@ -549,7 +562,7 @@
 
 ##########################################################################################
 
-ifeq ($(PLATFORM), solaris)
+ifeq ($(OPENJDK_TARGET_OS), solaris)
 
 SUNPKCS11_CFG_SRC := $(JDK_TOPDIR)/src/share/lib/security/sunpkcs11-solaris.cfg
 SUNPKCS11_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/sunpkcs11-solaris.cfg
@@ -566,7 +579,7 @@
 ##########################################################################################
 
 ifndef OPENJDK
-ifeq ($(PLATFORM), solaris)
+ifeq ($(OPENJDK_TARGET_OS), solaris)
 
 UCRYPTO_CFG_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/ucrypto-solaris.cfg
 UCRYPTO_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/ucrypto-solaris.cfg
--- a/jdk/makefiles/CopyIntoClasses.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/CopyIntoClasses.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -133,7 +133,7 @@
   $(wildcard $(SWING_PLAF_METAL_RESOURCES_DIR)/icons/ocean/*.png) \
   $(wildcard $(SWING_PLAF_METAL_RESOURCES_DIR)/sounds/*.wav)
 
-ifneq ($(PLATFORM), windows)
+ifneq ($(OPENJDK_TARGET_OS), windows)
   # Only copy GTK resources on Solaris/Linux
   SWING_PLAF_GTK_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/gtk
   COPY_FILES += \
@@ -174,11 +174,11 @@
 $(shell $(MKDIR) -p $(JDK_OUTPUTDIR)/classes/META-INF/services)
 # Find all META-INF/services/* files
 ALL_META-INF_DIRS_share:=$(shell $(FIND) $(JDK_TOPDIR)/src/share/classes -type d -a -name META-INF)
-ALL_META-INF_DIRS_hostapi:=$(shell $(FIND) $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes -type d -a -name META-INF)
+ALL_META-INF_DIRS_targetapi:=$(shell $(FIND) $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/classes -type d -a -name META-INF)
 # Platform specific overrides shared
-ifneq ($(ALL_META-INF_DIRS_hostapi),)
-    ALL_META-INF_DIRS:=$(ALL_META-INF_DIRS_hostapi) \
-	$(filter-out %$(patsubst $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes%,%,$(ALL_META-INF_DIRS_hostapi)),\
+ifneq ($(ALL_META-INF_DIRS_targetapi),)
+    ALL_META-INF_DIRS:=$(ALL_META-INF_DIRS_targetapi) \
+	$(filter-out %$(patsubst $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/classes%,%,$(ALL_META-INF_DIRS_targetapi)),\
 		$(ALL_META-INF_DIRS_share))
 else
     ALL_META-INF_DIRS:=$(ALL_META-INF_DIRS_share)
@@ -189,7 +189,7 @@
 endif
 
 ifndef OPENJDK
-ifneq ($(PLATFORM), macosx)
+ifneq ($(OPENJDK_TARGET_OS), macosx)
     ALL_META-INF_DIRS += $(JDK_TOPDIR)/src/closed/share/classes/sun/jdbc/odbc/META-INF
 endif
 endif
@@ -216,9 +216,9 @@
 	$(shell $(PRINTF) "$(SRC_SERVICES_FILES)\n" | $(SED) -e 's|/[^ ]*/META-INF/services/||g'))
 OUT_SERVICES_FILES_COLON:=$(addsuffix :,$(OUT_SERVICES_FILES))
 # Exception handling for print services with no META-INF directory
-SRC_SERVICES_FILES_PRINT = $(wildcard $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes/sun/print/services/*)
+SRC_SERVICES_FILES_PRINT = $(wildcard $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/classes/sun/print/services/*)
 OUT_SERVICES_FILES_PRINT = $(addprefix $(JDK_OUTPUTDIR)/classes/META-INF/services/,\
-	$(patsubst $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes/sun/print/services/%,%,\
+	$(patsubst $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/classes/sun/print/services/%,%,\
 		$(SRC_SERVICES_FILES_PRINT)))
 OUT_SERVICES_FILES_PRINT_COLON = $(addsuffix :,$(OUT_SERVICES_FILES_PRINT))
 RULES_SERVICES_PRINT = $(join $(OUT_SERVICES_FILES_PRINT_COLON),$(SRC_SERVICES_FILES_PRINT))
@@ -229,7 +229,7 @@
 define addto_meta-inf_services
 $1
 	echo Installing META-INF/services/$$(@F) 
-	$(CAT) $$< | $(SED) -e "s/^#\[$(PLATFORM)\]//" > $$@
+	$(CAT) $$< | $(SED) -e "s/^#\[$(OPENJDK_TARGET_OS)\]//" > $$@
 endef
 $(foreach i,$(META-INF_RULES_SERVICES),$(eval $(call addto_meta-inf_services,$i)))
 # Here is the generic rule, whose receipt the above rules will trigger.
@@ -261,13 +261,13 @@
 
 COPY_EXTRA += $(foreach F,$(notdir $(JAVAX_SOUND_SRC_FILES)),$(JDK_OUTPUTDIR)/classes/META-INF/services/${F})
 
-ifeq ($(PLATFORM)-$(ARCH),windows-ia64)
+ifeq ($(OPENJDK_TARGET_OS)-$(ARCH),windows-ia64)
 	JAVAX_SOUND_SRC_FILES += windows-ia64/javax.sound.sampled.spi.MixerProvider
 	COPY_EXTRA += $(JDK_OUTPUTDIR)/classes/META-INF/services/javax.sound.sampled.spi.MixerProvider
-else ifeq ($(PLATFORM),windows)
+else ifeq ($(OPENJDK_TARGET_OS),windows)
 	JAVAX_SOUND_SRC_FILES += windows-i586/javax.sound.sampled.spi.MixerProvider
 	COPY_EXTRA += $(JDK_OUTPUTDIR)/classes/META-INF/services/javax.sound.sampled.spi.MixerProvider
-else ifeq ($(PLATFORM)-$(ARCH),linux-i586)
+else ifeq ($(OPENJDK_TARGET_OS)-$(ARCH),linux-i586)
 	JAVAX_SOUND_SRC_FILES += linux-i586/javax.sound.sampled.spi.MixerProvider
 	COPY_EXTRA += $(JDK_OUTPUTDIR)/classes/META-INF/services/javax.sound.sampled.spi.MixerProvider
 else
--- a/jdk/makefiles/CopySamples.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/CopySamples.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -46,7 +46,7 @@
     SAMPLE_TARGET += $(SAMPLE_CLOSED_TARGET)
 endif
 
-ifneq (, $(filter $(PLATFORM), solaris macosx))
+ifneq (, $(filter $(OPENJDK_TARGET_OS), solaris macosx))
     SAMPLE_SOLARIS_SOURCE := $(shell $(FIND) $(SAMPLE_SOLARIS_SOURCE_DIR) -type f -print)
     SAMPLE_SOLARIS_TARGET := $(subst $(SAMPLE_SOLARIS_SOURCE_DIR),$(SAMPLE_TARGET_DIR),$(SAMPLE_SOLARIS_SOURCE))
     SAMPLE_TARGET += $(SAMPLE_SOLARIS_TARGET)
@@ -72,4 +72,3 @@
 all: $(COPY_FILES) 
 
 .PHONY: all
-
--- a/jdk/makefiles/CreateJars.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/CreateJars.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -32,6 +32,10 @@
 
 include Tools.gmk
 
+#
+# This makefile...so that altering will trigger rebuilding include/exclude-lists => jars
+#
+MAKEFILE=$(JDK_TOPDIR)/makefiles/CreateJars.gmk
 
 MAINMANIFEST := $(JDK_TOPDIR)/make/tools/manifest.mf
 BEANMANIFEST := $(JDK_TOPDIR)/make/javax/swing/beaninfo/manifest
@@ -46,7 +50,7 @@
 
 $(eval $(call SetupArchive,BUILD_JCONSOLE_JAR,$(JCONSOLE_JAR_DEPS),\
 		SRCS:=$(JDK_OUTPUTDIR)/classes,\
-		SUFFIXES:=.class .gif .png,\
+		SUFFIXES:=.class .gif .png .properties,\
 		INCLUDES:=sun/tools/jconsole com/sun/tools/jconsole,\
 		JARMAIN:=sun.tools.jconsole.JConsole,\
 		JAR:=$(JDK_OUTPUTDIR)/lib/jconsole.jar,\
@@ -242,12 +246,35 @@
 	sun/swing/BeanInfoUtils.class \
 	$(LOCALEDATA_INCLUDES)
 
-ifndef OPENJDK
-ifndef JAVASE_EMBEDDED
+# These files should never be put into rt.jar
+# but due to a misstake...some are put there if embedded
+#
+ifneq ($(JAVASE_EMBEDDED), true)
+# normal (correct) case
 RT_JAR_EXCLUDES += \
 	com/oracle/jrockit/jfr \
 	oracle/jrockit/jfr
+else
+# embedded (broken) case
+RT_JAR_EXCLUDES += \
+  oracle/jrockit/jfr/parser \
+  oracle/jrockit/jfr/tools \
+  oracle/jrockit/jfr/NativeOptions.class \
+  oracle/jrockit/jfr/RepositoryChunkHandler.class
 endif
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+        RT_JAR_EXCLUDES += com/sun/nio/sctp \
+                           sun/nio/ch/sctp \
+                           sun/jdbc \
+                           sun/nio/ch/DevPollArrayWrapper\$$$$Updator.class \
+                           sun/nio/ch/DevPollArrayWrapper.class \
+                           sun/nio/ch/DevPollSelectorImpl.class \
+                           sun/nio/ch/DevPollSelectorProvider.class \
+                           sun/nio/ch/EPollArrayWrapper\$$$$Updator.class \
+                           sun/nio/ch/EPollArrayWrapper.class \
+                           sun/nio/ch/EPollSelectorImpl.class \
+                           sun/nio/ch/EPollSelectorProvider.class
 endif
 
 # Find all files in the classes dir to use as dependencies. This could be more fine granular.
@@ -271,12 +298,19 @@
 	       -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
 	       $(MAINMANIFEST) >> $@
 
-$(JDK_OUTPUTDIR)/lib/_the.jars.exclude:
+$(JDK_OUTPUTDIR)/lib/_the.jars.exclude: $(MAKEFILE)
 	$(MKDIR) -p $(@D)
 	$(call ListPathsSafely,RT_JAR_EXCLUDES,\n, >> $@)
 
+$(JDK_OUTPUTDIR)/lib/classlist : $(JDK_TOPDIR)/make/tools/sharing/classlist.$(OPENJDK_TARGET_OS) \
+  $(MAKEFILE)
+	$(MKDIR) -p $(@D)
+	$(RM) -f $@.temp
+	$(TOOL_ADDJSUM) $< $@.temp
+	$(MV) $@.temp $@
+
 $(JDK_OUTPUTDIR)/lib/_the.jars.contents: $(BUILD_TOOLS) $(JDK_OUTPUTDIR)/lib/_the.jars.exclude \
-					 $(ALL_FILES_IN_CLASSES)
+					 $(ALL_FILES_IN_CLASSES) $(JDK_OUTPUTDIR)/lib/classlist
 	$(MKDIR) -p $(@D)
 	$(RM) $@.temp
 	($(CD) $(JDK_OUTPUTDIR)/classes && \
@@ -290,17 +324,22 @@
 $(JDK_OUTPUTDIR)/lib/_the.resources.jar.contents: $(JDK_OUTPUTDIR)/lib/_the.jars.contents
 	$(GREP) -v -e '\.class$$' -e '/_the\.*' -e '^_the\.*' $(JDK_OUTPUTDIR)/lib/_the.jars.contents > $@
 
+RT_JAR_CREATE_OPTIONS := c0fm
+ifeq ($(COMPRESS_JARS), true)
+    RT_JAR_CREATE_OPTIONS := cfm
+endif
+
 $(JDK_OUTPUTDIR)/lib/rt.jar: $(JDK_OUTPUTDIR)/lib/_the.rt.jar.contents $(RT_JAR_MANIFEST_FILE)
 	$(ECHO) Creating rt.jar
 	$(CD) $(JDK_OUTPUTDIR)/classes && \
-	    $(JAR) cfm $@ $(RT_JAR_MANIFEST_FILE) \
+	    $(JAR) $(RT_JAR_CREATE_OPTIONS) $@ $(RT_JAR_MANIFEST_FILE) \
 	        @$(JDK_OUTPUTDIR)/lib/_the.rt.jar.contents
 
 $(JDK_OUTPUTDIR)/lib/resources.jar: $(JDK_OUTPUTDIR)/lib/_the.resources.jar.contents \
 				    $(RESOURCE_JAR_MANIFEST_FILE)
 	$(ECHO) Creating resources.jar
 	$(CD) $(JDK_OUTPUTDIR)/classes && \
-	    $(JAR) cfm $@ $(RESOURCE_JAR_MANIFEST_FILE) \
+	    $(JAR) $(RT_JAR_CREATE_OPTIONS) $@ $(RESOURCE_JAR_MANIFEST_FILE) \
 	        @$(JDK_OUTPUTDIR)/lib/_the.resources.jar.contents
 
 JARS+=$(JDK_OUTPUTDIR)/lib/rt.jar $(JDK_OUTPUTDIR)/lib/resources.jar
@@ -309,7 +348,7 @@
 
 CHARSETS_JAR_DEPS :=
 
-ifneq ($(HOST_OS), windows)
+ifneq ($(OPENJDK_TARGET_OS), windows)
     CHARSETS_EXTRA_FILES:=sun/awt/motif/X11GBK.class \
                           sun/awt/motif/X11GB2312\$$$$Decoder.class \
                           sun/awt/motif/X11GB2312.class \
@@ -328,20 +367,22 @@
 			       $(CHARSETS_EXTRA_FILES) \
                                META-INF/services/java.nio.charset.spi.CharsetProvider, \
 		JAR:=$(JDK_OUTPUTDIR)/lib/charsets.jar, \
-		SKIP_METAINF := true))
+		SKIP_METAINF := true, \
+                CHECK_COMPRESS_JAR:=true))
 
 JARS+=$(JDK_OUTPUTDIR)/lib/charsets.jar
 
 ##########################################################################################
 
-ifndef OPENJDK
+ifeq ($(ENABLE_JFR), true)
     $(eval $(call SetupArchive,BUILD_JFR_JAR,,\
 		SRCS:=$(JDK_OUTPUTDIR)/classes,\
 		INCLUDES:=com/oracle/jrockit/jfr \
 			  oracle/jrockit/jfr,\
 		JAR:=$(JDK_OUTPUTDIR)/lib/jfr.jar,\
 		SKIP_METAINF:=true,\
-		MANIFEST:=$(MAINMANIFEST)))
+		MANIFEST:=$(MAINMANIFEST), \
+                CHECK_COMPRESS_JAR:=true))
 
     JARS+=$(JDK_OUTPUTDIR)/lib/jfr.jar
 endif
@@ -356,13 +397,14 @@
 			  com/sun/net/ssl/internal/ssl,\
 		JAR:=$(JDK_OUTPUTDIR)/lib/jsse.jar,\
 		SKIP_METAINF:=true,\
-		MANIFEST:=$(MAINMANIFEST)))
+		MANIFEST:=$(MAINMANIFEST), \
+                CHECK_COMPRESS_JAR:=true))
 
 JARS+=$(JDK_OUTPUTDIR)/lib/jsse.jar
 
 ##########################################################################################
 
-ifneq ($(PLATFORM)-$(ARCH_DATA_MODEL),windows-64)
+ifneq ($(OPENJDK_TARGET_OS)-$(ARCH_DATA_MODEL),windows-64)
     SUNPKCS11_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunpkcs11.jar
 
     ifndef OPENJDK
@@ -544,7 +586,7 @@
 
 ##########################################################################################
 
-ifeq ($(PLATFORM),windows)
+ifeq ($(OPENJDK_TARGET_OS),windows)
 
 SUNMSCAPI_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunmscapi.jar
 
@@ -574,7 +616,7 @@
 
 ##########################################################################################
 
-ifeq ($(PLATFORM),solaris)
+ifeq ($(OPENJDK_TARGET_OS),solaris)
 ifndef OPENJDK
 
 UCRYPTO_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/ucrypto.jar
@@ -661,7 +703,8 @@
 			     META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
 			     META-INF/services/com.sun.tools.internal.xjc.Plugin,\
 		JAR:=$(JDK_OUTPUTDIR)/lib/tools.jar,\
-		SKIP_METAINF:=true))
+		SKIP_METAINF:=true, \
+                CHECK_COMPRESS_JAR:=true))
 
 JARS+=$(JDK_OUTPUTDIR)/lib/tools.jar
 
@@ -696,6 +739,7 @@
                         com.oracle.nio
 
 $(IMAGES_OUTPUTDIR)/symbols/_the.symbols: $(JDK_OUTPUTDIR)/lib/rt.jar
+	$(RM) -rf $(IMAGES_OUTPUTDIR)/symbols/META-INF/sym
 	$(MKDIR) -p $(IMAGES_OUTPUTDIR)/symbols/META-INF/sym
 	$(JAVA) \
 		-Xbootclasspath/a:$(JDK_OUTPUTDIR)/classes \
@@ -711,7 +755,8 @@
 $(eval $(call SetupArchive,BUILD_CT_SYM,$(IMAGES_OUTPUTDIR)/symbols/_the.symbols,\
 		SRCS:=$(IMAGES_OUTPUTDIR)/symbols,\
 		INCLUDES:=META-INF/sym,\
-		JAR:=$(JDK_OUTPUTDIR)/lib/ct.sym))
+		JAR:=$(JDK_OUTPUTDIR)/lib/ct.sym, \
+		CHECK_COMPRESS_JAR:=true))
 
 JARS+=$(JDK_OUTPUTDIR)/lib/ct.sym
 
@@ -765,7 +810,7 @@
 	org/xml/sax			\
 	sunw
 
-SRC_ZIP_SRCS = $(JDK_TOPDIR)/src/share/classes $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes
+SRC_ZIP_SRCS = $(JDK_TOPDIR)/src/share/classes $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/classes
 SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/gensrc
 SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/impsrc
 SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/gendocsrc_rmic
@@ -776,16 +821,16 @@
 # Need to copy launcher src files into desired directory structure
 # before zipping the sources.
 LAUNCHER_SRC_FILES := $(wildcard $(JDK_TOPDIR)/src/share/bin/*) \
-                      $(wildcard $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/bin/java_md*)
+                      $(wildcard $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/bin/java_md*)
 LAUNCHER_ZIP_SRC := $(patsubst $(JDK_TOPDIR)/src/share/bin/%,$(IMAGES_OUTPUTDIR)/src/launcher/%,\
-		    $(patsubst $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/bin/%,$(IMAGES_OUTPUTDIR)/src/launcher/%,\
+		    $(patsubst $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/bin/%,$(IMAGES_OUTPUTDIR)/src/launcher/%,\
 			$(LAUNCHER_SRC_FILES)))
 
 $(IMAGES_OUTPUTDIR)/src/launcher/%: $(JDK_TOPDIR)/src/share/bin/%
 	$(MKDIR) -p $(@D)
 	$(CP) $< $@
 
-$(IMAGES_OUTPUTDIR)/src/launcher/%: $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/bin/%
+$(IMAGES_OUTPUTDIR)/src/launcher/%: $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/bin/%
 	$(MKDIR) -p $(@D)
 	$(CP) $< $@
 
--- a/jdk/makefiles/GendataBreakIterator.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/GendataBreakIterator.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -35,10 +35,10 @@
 #
 TEXT_SRCDIR = $(JDK_TOPDIR)/src/share/classes
 TEXT_PKG  = sun/text/resources
-TEXT_SOURCES = 	%$(TEXT_PKG)/BreakIteratorRules.java \
-		%$(TEXT_PKG)/BreakIteratorInfo.java \
-		%$(TEXT_PKG)/BreakIteratorRules_th.java \
-		%$(TEXT_PKG)/BreakIteratorInfo_th.java
+TEXT_SOURCES = 	$(TEXT_PKG)/BreakIteratorRules.java \
+		$(TEXT_PKG)/BreakIteratorInfo.java \
+		$(TEXT_PKG)/BreakIteratorRules_th.java \
+		$(TEXT_PKG)/BreakIteratorInfo_th.java
 
 # Generate BreakIteratorData
 BREAK_ITERATOR_DIR = $(JDK_OUTPUTDIR)/break_iterator
--- a/jdk/makefiles/GendataFontConfig.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/GendataFontConfig.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -25,13 +25,13 @@
 
 GENDATA_FONT_CONFIG_DST := $(JDK_OUTPUTDIR)/lib
 
-ifeq ($(PLATFORM), windows)
+ifeq ($(OPENJDK_TARGET_OS), windows)
 GENDATA_FONT_CONFIG_SRC_DIR    := $(JDK_TOPDIR)/src/windows/classes/sun/awt/windows
 GENDATA_FONT_CONFIG_SRC_FILES  := fontconfig.properties
 GENDATA_FONT_CONFIG_SRC_PREFIX := 
 endif
 
-ifeq ($(PLATFORM), linux)
+ifeq ($(OPENJDK_TARGET_OS), linux)
 GENDATA_FONT_CONFIG_SRC_PREFIX := linux.
 ifdef OPENJDK
 GENDATA_FONT_CONFIG_SRC_DIR   := $(JDK_TOPDIR)/src/solaris/classes/sun/awt/fontconfigs
@@ -52,27 +52,29 @@
 endif
 endif
 
-ifeq ($(PLATFORM), solaris)
+ifeq ($(OPENJDK_TARGET_OS), solaris)
 GENDATA_FONT_CONFIG_SRC_DIR    := $(JDK_TOPDIR)/src/solaris/classes/sun/awt/fontconfigs
 GENDATA_FONT_CONFIG_SRC_FILES  := fontconfig.properties
 GENDATA_FONT_CONFIG_SRC_PREFIX := solaris.
 endif
 
-ifeq ($(PLATFORM), macosx)
+ifeq ($(OPENJDK_TARGET_OS), macosx)
 GENDATA_FONT_CONFIG_SRC_DIR    := $(JDK_TOPDIR)/src/macosx/classes/sun/awt/fontconfigs
 GENDATA_FONT_CONFIG_SRC_FILES  := fontconfig.properties
 GENDATA_FONT_CONFIG_SRC_PREFIX := macosx.
-endif # PLATFORM
+endif # OPENJDK_TARGET_OS
 
 ###
 
 $(GENDATA_FONT_CONFIG_DST)/%.src : $(GENDATA_FONT_CONFIG_SRC_DIR)/$(GENDATA_FONT_CONFIG_SRC_PREFIX)%
 	$(MKDIR) -p $(@D)
 	$(CP) $< $@
+	$(CHMOD) 644 $@
 
 $(GENDATA_FONT_CONFIG_DST)/%.bfc : $(GENDATA_FONT_CONFIG_SRC_DIR)/$(GENDATA_FONT_CONFIG_SRC_PREFIX)%.properties
 	$(MKDIR) -p $(@D)
 	$(TOOL_COMPILEFONTCONFIG) $< $@
+	$(CHMOD) 444 $@
 
 ###
 
--- a/jdk/makefiles/GendataHtml32dtd.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/GendataHtml32dtd.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -32,5 +32,4 @@
 	$(RM) $@
 	($(TOOL_DTDBUILDER) html32 > $@) || exit 1
 
-GENDATA_HTML32DTD += $(HTML32DTD)
-
+GENDATA_HTML32DTD += $(HTML32DTD)
\ No newline at end of file
--- a/jdk/makefiles/GenerateClasses.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/GenerateClasses.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -27,7 +27,13 @@
 
 include $(SPEC)
 include MakeBase.gmk
-include RMICompile.gmk
+include RMICompilation.gmk
+
+# To ensure the latest stub generator files are picked up from corba repo
+# when available, we need to run with latest rmic version available. 
+ifeq ($(CROSS_COMPILE_ARCH),)
+    RMIC := $(UNCYGDRIVE) $(JDK_OUTPUTDIR)/bin/rmic
+endif  
 
 CLASSES_DIR := $(JDK_OUTPUTDIR)/classes
 # NOTE: If the smart javac dependency management is reintroduced, these classes risk 
--- a/jdk/makefiles/GenerateData.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/GenerateData.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -69,6 +69,7 @@
 	$(RM) $@
 	$(TOOL_GENERATECURRENCYDATA) -o $@.temp < $<
 	$(MV) $@.temp $@
+	$(CHMOD) 444 $@
 
 GENDATA += $(GENDATA_CURDATA)
 
--- a/jdk/makefiles/GenerateJavaSources.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/GenerateJavaSources.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -65,7 +65,7 @@
 include GensrcExceptions.gmk
 GENSRC += $(GENSRC_EXCEPTIONS)
 
-ifneq ($(HOST_OS),windows)
+ifneq ($(OPENJDK_TARGET_OS),windows)
 include GensrcIcons.gmk
 GENSRC += $(GENSRC_ICONS)
 
@@ -78,6 +78,11 @@
   GENSRC += $(GENSRC_SWING_NIMBUS)
 endif
 
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+     include GensrcJObjC.gmk
+     GENSRC += $(GENSRC_JOBJC)
+endif
+
 $(GENSRC) : $(BUILD_TOOLS)
 
 # The exception handling of swing beaninfo
@@ -100,7 +105,10 @@
 		$(MKDIR) -p gensrc/javax/swing/plaf && \
 		$(CP) -rp gensrc_swing/javax/swing/plaf/* gensrc/javax/swing/plaf) \
 	fi
-ifneq ($(HOST_OS),windows)
+	if [ -d $(JDK_OUTPUTDIR)/gensrc_jobjc ] ; then \
+		(cd $(JDK_OUTPUTDIR) && cp -rp gensrc_jobjc/src/* gensrc) \
+	fi
+ifneq ($(OPENJDK_TARGET_OS),windows)
 	(cd $(JDK_OUTPUTDIR) && \
 		$(CP) -rp gensrc_icons/* gensrc && \
 		$(CP) -rp gensrc_x11wrappers/classes/* gensrc)
--- a/jdk/makefiles/GensrcBuffer.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/GensrcBuffer.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -198,6 +198,7 @@
 	$(if $(12),$1_$(strip $(12)))
 	$(if $(13),$1_$(strip $(13)))
 	$(if $(14),$1_$(strip $(14)))
+	$(if $(15),$(error Internal makefile error: Too many arguments to SetupGenBuffer, please update GensrcBuffer.gmk))
 
 	$(call fixRw,$1,$$($1_RW))
 	$(call typesAndBits,$1,$$($1_type),$$($1_BO))
--- a/jdk/makefiles/GensrcIcons.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/GensrcIcons.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -29,7 +29,7 @@
 GENSRC_ICONS_DST := $(GENSRC_ICONS_TMP)/sun/awt/X11
 
 ifdef OPENJDK
-	ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)
+	ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)
 else
 	ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/closed/solaris
 endif
@@ -41,7 +41,7 @@
     $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon48.png
 
 
-ICONPATH := $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes/sun/awt/X11
+ICONPATH := $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/classes/sun/awt/X11
 
 GENSRC_ICONS_SRC += \
    $(ICONPATH)/security-icon-bw16.png \
@@ -86,7 +86,7 @@
 	$(ECHO) "public class $$($1_NAME32) {" >> $$@.tmp
 	$(ECHO) "public static int[] $$($1_SHORTNAME) = { " >> $$@.tmp
 # TODO FIX FIX FIX
-ifneq ($(PLATFORM),macosx)
+ifneq ($(OPENJDK_TARGET_OS),macosx)
 	$(CAT) $$< | $(TOOL_TOBIN) >> $$@.tmp
 endif
 	$(ECHO) "}; }" >> $$@.tmp
@@ -100,7 +100,7 @@
 	$(ECHO) "public class $$($1_NAME64) {" >> $$@.tmp
 	$(ECHO) "public static long[] $$($1_SHORTNAME) = { " >> $$@.tmp
 # TODO FIX FIX FIX
-ifneq ($(PLATFORM),macosx)
+ifneq ($(OPENJDK_TARGET_OS),macosx)
 	$(CAT) $$< | $(TOOL_TOBIN) >> $$@.tmp
 endif
 	$(ECHO) "}; }" >> $$@.tmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/makefiles/GensrcJObjC.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -0,0 +1,80 @@
+#
+# 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.
+#
+
+GENSRC_JOBJC :=
+
+JOBJC_FRAMEWORKS := Foundation CoreFoundation AppKit
+FRAMEWORKS_DIR := /System/Library/Frameworks
+GBM := /usr/bin/gen_bridge_metadata
+
+JOBJC_SRC := $(JDK_TOPDIR)/src/macosx/native/jobjc
+JOBJC_TMP := $(JDK_OUTPUTDIR)/gensrc_jobjc
+JOBJC_DST := $(JDK_OUTPUTDIR)/gensrc_jobjc/src
+
+#
+# Build generator
+#
+$(eval $(call SetupJavaCompilation,BUILD_JOBJC_PRIMITIVE_CODER,\
+		SETUP:=GENERATE_OLDBYTECODE,\
+		INCLUDES:=core/java \
+                          com/apple,\
+                HEADERS :=$(JOBJC_DST)/jni_headers/core ,\
+		SRC:=$(JOBJC_SRC)/src \
+                     $(JOBJC_SRC)/src/generator/java, \
+		BIN:=$(JOBJC_TMP)/bin))
+
+GENSRC_JOBJC += $(JOBJC_TMP)/bin/_the.batch
+
+#
+# Generate bridge support
+#
+BRIDGESUPPORT := $(addprefix $(JOBJC_TMP)/bridge/,$(addsuffix Full.bridgesupport,$(JOBJC_FRAMEWORKS)))
+
+$(JOBJC_TMP)/bridge/%Full.bridgesupport : $(FRAMEWORKS_DIR)/%.framework/Headers/*.h
+	$(MKDIR) -p $(@D)
+	if [ -f $(FRAMEWORKS_DIR)/$*.framework/Resources/BridgeSupport/$(@F) ]; then \
+		cp $(FRAMEWORKS_DIR)/$*.framework/Resources/BridgeSupport/$(@F) $@ ;\
+	else \
+		$(GBM) -F complete --framework $* -o $@ ; \
+	fi
+
+#
+# Find Xbootclasspath
+#
+$(JOBJC_TMP)/_the.generator_bootclasspath : $(JOBJC_TMP)/bin/_the.batch
+	$(JAVA) -cp $(JOBJC_TMP)/bin com.apple.internal.jobjc.generator.BootClassPathMinus JObjC.jar > $@.tmp
+	$(MV) $@.tmp $@
+
+
+#
+# Run generator
+#
+TOOL_JOBJC := $(JAVA) -cp $(JOBJC_TMP)/bin -ea com.apple.internal.jobjc.generator.Generator
+
+$(JOBJC_TMP)/_the.generator : $(JOBJC_TMP)/bin/_the.batch $(JOBJC_TMP)/_the.generator_bootclasspath $(BRIDGESUPPORT)
+	$(JAVA) -d64 -Xbootclasspath:`$(CAT) $(JOBJC_TMP)/_the.generator_bootclasspath` -cp $(JOBJC_TMP)/bin -ea com.apple.internal.jobjc.generator.Generator dst=$(JOBJC_DST) frameworks=$(JOBJC_TMP)/bridge
+	$(TOUCH) $@
+
+GENSRC_JOBJC += $(JOBJC_TMP)/_the.generator
--- a/jdk/makefiles/GensrcMisc.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/GensrcMisc.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -53,9 +53,9 @@
 
 ##########################################################################################
 
-ifeq ($(HOST_OS_API),posix)
-    UPSUFFIX:=$(PLATFORM)
-    ifeq ($(PLATFORM),macosx)
+ifeq ($(OPENJDK_TARGET_OS_API),posix)
+    UPSUFFIX:=$(OPENJDK_TARGET_OS)
+    ifeq ($(OPENJDK_TARGET_OS),macosx)
         UPSUFFIX:=bsd
     endif
     # UNIXProcess.java is different for solaris and linux. We need to copy
@@ -64,7 +64,7 @@
     $(JDK_OUTPUTDIR)/gensrc_misc/java/lang/UNIXProcess.java : \
               $(JDK_TOPDIR)/src/solaris/classes/java/lang/UNIXProcess.java.$(UPSUFFIX)
 	$(MKDIR) -p $(@D)
-	$(ECHO) Copying UNIXProcess.java.$(PLATFORM) to java/lang/UNIXProcess.java
+	$(ECHO) Copying UNIXProcess.java.$(OPENJDK_TARGET_OS) to java/lang/UNIXProcess.java
 	$(CP) $< $@
 	$(CHMOD) u+rw $@
 
@@ -74,8 +74,8 @@
 ##########################################################################################
 
 ifndef OPENJDK
-ifneq ($(PLATFORM), windows)
-ifneq ($(PLATFORM), macosx)
+ifneq ($(OPENJDK_TARGET_OS), windows)
+ifneq ($(OPENJDK_TARGET_OS), macosx)
     # These file(s) are needed for building fake .so libs on !windows for jdbcodbc
 
     $(JDK_OUTPUTDIR)/gensrc_c/libjdbcodbc/dummyodbc1.c : 
@@ -101,85 +101,98 @@
 
 GENSRC_SOR_SRC := $(JDK_TOPDIR)/src/share/native/sun/nio/ch
 GENSRC_SOR_SRC_FILE := genSocketOptionRegistry.c
-GENSRC_SOR_BIN := $(JDK_OUTPUTDIR)/objs/gensrc/genSocketOptionRegistry
-GENSRC_SOR_EXE := $(GENSRC_SOR_BIN)/genSocketOptionRegistry$(EXE_SUFFIX)
+GENSRC_SOR_BIN := $(JDK_OUTPUTDIR)/gensrc_misc/genSocketOptionRegistry
 
 SOR_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_SOR_SRC)/$(GENSRC_SOR_SRC_FILE) | \
 	$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }') 
 
-$(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/ch/SocketOptionRegistry.java : $(GENSRC_SOR_EXE)
-	$(MKDIR) -p $(@D)
-	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/makefiles/scripts/addNotices.sh "$(SOR_COPYRIGHT_YEARS)" > $@.tmp
-	$(GENSRC_SOR_EXE) >> $@.tmp
-	$(MV) $@.tmp $@
-
-
 $(eval $(call SetupNativeCompilation,BUILD_GENSRC_SOR_EXE,\
 		SRC:=$(GENSRC_SOR_SRC),\
 		INCLUDE_FILES:=$(GENSRC_SOR_SRC_FILE),\
 		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB),\
-		BIN:=$(GENSRC_SOR_BIN),\
-		EXE:=$(GENSRC_SOR_EXE)))
+		CC:=$(HOST_CC),\
+		LDEXE:=$(HOST_LD),\
+		OBJECT_DIR:=$(GENSRC_SOR_BIN),\
+		OUTPUT_DIR:=$(GENSRC_SOR_BIN),\
+                PROGRAM:=genSocketOptionRegistry))
+
+ifneq ($(JAVASE_EMBEDDED), true)
+$(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/ch/SocketOptionRegistry.java : $(BUILD_GENSRC_SOR_EXE)
+	$(MKDIR) -p $(@D)
+	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/makefiles/scripts/addNotices.sh "$(SOR_COPYRIGHT_YEARS)" > $@.tmp
+	$(BUILD_GENSRC_SOR_EXE) >> $@.tmp
+	$(MV) $@.tmp $@
+else
+$(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/ch/SocketOptionRegistry.java : $(JDK_TOPDIR)/src/closed/solaris/classes/sun/nio/ch/SocketOptionRegistry-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH).java
+	$(MKDIR) -p $(@D)
+	$(CP) $< $@
+endif
 
 ##########################################################################################
 
-ifneq ($(PLATFORM),windows)
+ifneq ($(OPENJDK_TARGET_OS),windows)
 
 GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/fs/UnixConstants.java
 
-GENSRC_UC_SRC := $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/nio/fs
+GENSRC_UC_SRC := $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/nio/fs
 GENSRC_UC_SRC_FILE := genUnixConstants.c
-GENSRC_UC_BIN := $(JDK_OUTPUTDIR)/objs/gensrc/genUnixConstants
-GENSRC_UC_EXE := $(GENSRC_UC_BIN)/genUnixConstants$(EXE_SUFFIX)
+GENSRC_UC_BIN := $(JDK_OUTPUTDIR)/gensrc_misc/genUnixConstants
 
 UC_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_UC_SRC)/$(GENSRC_UC_SRC_FILE) | \
 	$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }') 
 
-$(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/fs/UnixConstants.java : $(GENSRC_UC_EXE)
-	$(MKDIR) -p $(@D)
-	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/makefiles/scripts/addNotices.sh "$(UC_COPYRIGHT_YEARS)" > $@.tmp
-	$(GENSRC_UC_EXE) >> $@.tmp
-	$(MV) $@.tmp $@
-
-
 $(eval $(call SetupNativeCompilation,BUILD_GENSRC_UC_EXE,\
 		SRC:=$(GENSRC_UC_SRC),\
 		INCLUDE_FILES:=$(GENSRC_UC_SRC_FILE),\
 		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB),\
-		BIN:=$(GENSRC_UC_BIN),\
-		EXE:=$(GENSRC_UC_EXE)))
+		CC:=$(HOST_CC),\
+		LDEXE:=$(HOST_CC),\
+		OBJECT_DIR:=$(GENSRC_UC_BIN),\
+                OUTPUT_DIR:=$(GENSRC_UC_BIN),\
+		PROGRAM:=genUnixConstants))
+
+ifneq ($(JAVASE_EMBEDDED), true)
+$(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/fs/UnixConstants.java : $(BUILD_GENSRC_UC_EXE)
+	$(MKDIR) -p $(@D)
+	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/makefiles/scripts/addNotices.sh "$(UC_COPYRIGHT_YEARS)" > $@.tmp
+	$(BUILD_GENSRC_UC_EXE) >> $@.tmp
+	$(MV) $@.tmp $@
+else
+$(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/fs/UnixConstants.java : $(JDK_TOPDIR)/src/closed/solaris/classes/sun/nio/fs/UnixConstants-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH).java
+	$(MKDIR) -p $(@D)
+	$(CP) $< $@
+endif
 
 endif
 
 ##########################################################################################
 
-ifeq ($(PLATFORM),solaris)
+ifeq ($(OPENJDK_TARGET_OS),solaris)
 
 GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/fs/SolarisConstants.java
 
-GENSRC_SOL_SRC := $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/nio/fs
+GENSRC_SOL_SRC := $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/nio/fs
 GENSRC_SOL_SRC_FILE := genSolarisConstants.c
-GENSRC_SOL_BIN := $(JDK_OUTPUTDIR)/objs/gensrc/genSolarisConstants
-GENSRC_SOL_EXE := $(GENSRC_SOL_BIN)/genSolarisConstants$(EXE_SUFFIX)
+GENSRC_SOL_BIN := $(JDK_OUTPUTDIR)/gensrc_misc/genSolarisConstants
 
 SOL_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_SOL_SRC)/$(GENSRC_SOL_SRC_FILE) | \
 	$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }') 
 
-$(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/fs/SolarisConstants.java : $(GENSRC_SOL_EXE)
-	$(MKDIR) -p $(@D)
-	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/makefiles/scripts/addNotices.sh "$(SOL_COPYRIGHT_YEARS)" > $@.tmp
-	$(GENSRC_SOL_EXE) >> $@.tmp
-	$(MV) $@.tmp $@
-
-
 $(eval $(call SetupNativeCompilation,BUILD_GENSRC_SOL_EXE,\
 		SRC:=$(GENSRC_SOL_SRC),\
 		INCLUDE_FILES:=$(GENSRC_SOL_SRC_FILE),\
 		LANG:=C,\
-		CFLAGS:=$(CFLAGS_JDKLIB),\
-		BIN:=$(GENSRC_SOL_BIN),\
-		EXE:=$(GENSRC_SOL_EXE)))
+		CC:=$(HOST_CC),\
+		LDEXE:=$(HOST_CC),\
+		OBJECT_DIR:=$(GENSRC_SOL_BIN),\
+		OUTPUT_DIR:=$(GENSRC_SOL_BIN),\
+		PROGRAM:=genSolarisConstants))
+
+$(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/fs/SolarisConstants.java : $(BUILD_GENSRC_SOL_EXE)
+	$(MKDIR) -p $(@D)
+	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/makefiles/scripts/addNotices.sh "$(SOL_COPYRIGHT_YEARS)" > $@.tmp
+	$(BUILD_GENSRC_SOL_EXE) >> $@.tmp
+	$(MV) $@.tmp $@
+
 
 endif
--- a/jdk/makefiles/GensrcProperties.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/GensrcProperties.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -46,7 +46,7 @@
 
   # Strip away prefix and suffix,
   # leaving for example: sun/util/resources/CurrencyNames_sv
-  $1_PROPPATHS:=$$(patsubst $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes/%.properties,%,\
+  $1_PROPPATHS:=$$(patsubst $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/classes/%.properties,%,\
                 $$(patsubst $(JDK_TOPDIR)/src/share/classes/%.properties,%,$2))
 
   # Apply optional name transformation, example: hz_TW -> hz_HK
@@ -75,7 +75,7 @@
 
   # Strip away prefix and suffix,
   # leaving for example: sun/util/resources/CurrencyNames_sv
-  $1_PROPPATHS:=$$(patsubst $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes/%.properties,%,\
+  $1_PROPPATHS:=$$(patsubst $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/classes/%.properties,%,\
                 $$(patsubst $(JDK_TOPDIR)/src/share/classes/%.properties,%,$2))
 
   # Apply optional name transformation, example: hz_TW -> hz_HK
@@ -124,7 +124,7 @@
 $(eval $(call add_properties_to_clean,COM_SUN_IMAGEIO,\
 	$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/imageio -name "*.properties")))
 #com/sun/java/swing/plaf/gtk/resources
-ifneq ($(PLATFORM), windows)
+ifneq ($(OPENJDK_TARGET_OS), windows)
 # Only compile GTK resource bundles on Solaris/Linux
 $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_GTK,\
 	$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/gtk/resources -name "*.properties"),\
@@ -264,6 +264,10 @@
 $(eval $(call add_properties_to_clean,SUN_TOOLS_SERIALVER,\
 	$(shell find $(JDK_TOPDIR)/src/share/classes/sun/tools/javac/resources -name "javac.properties")))
 
+#sun/tools/jconsole/resources
+$(eval $(call add_properties_to_clean,SUN_TOOLS_JCONSOLE,\
+	$(shell find $(JDK_TOPDIR)/src/share/classes/sun/tools/jconsole/resources -name "*.properties")))
+
 #sun/tools/serialver
 $(eval $(call add_properties_to_clean,SUN_TOOLS_SERIALVER,\
 	$(shell find $(JDK_TOPDIR)/src/share/classes/sun/tools/serialver -name "*.properties"),,,resources))
--- a/jdk/makefiles/GensrcX11Wrappers.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/GensrcX11Wrappers.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -30,10 +30,10 @@
 
 GENSRC_SIZES :=
 
-ifeq ($(PLATFORM)-$(LIBARCH), solaris-i386)
+ifeq ($(OPENJDK_TARGET_OS)-$(LIBARCH), solaris-i386)
 GENSRC_SIZES := sizes.32 sizes.64
-else ifeq ($(PLATFORM), solaris)
-isalist:=$(shell $(ISAINFO))
+else ifeq ($(OPENJDK_TARGET_OS), solaris)
+isalist:=$(shell isainfo)
 ifneq (,$(findstring sparcv9, $(isalist)))
 # On sparcv9 we generate both 32 and 64-bit sizers in spite of ARCH_DATA_MODEL.
 GENSRC_SIZES := sizes.32 sizes.64
@@ -46,7 +46,7 @@
 endif # amd64
 endif # sparcv9
 else # !solaris
-ifeq ($(PLATFORM), macosx)
+ifeq ($(OPENJDK_TARGET_OS), macosx)
 GENSRC_SIZES := sizes.32 sizes.64
 else # !macosx
 GENSRC_SIZES := sizes.$(ARCH_DATA_MODEL)
@@ -62,18 +62,23 @@
 	$(TOOL_WRAPPERGENERATOR) $(@D) $< "sizer" $*
 
 $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.exe : $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.c
-	(cd $(@D) && $(CC) -m$* -o $@ $< $(CFLAGS_JDKLIB) \
+	(cd $(@D) && $(HOST_CC) -m$* -o $@ $< \
+              -I$(JDK_OUTPUTDIR)/include \
+              -I$(JDK_TOPDIR)/src/share/javavm/export \
+              -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/javavm/export \
+              -I$(JDK_TOPDIR)//src/share/native/common \
+              -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/common \
               -I$(JDK_TOPDIR)/src/solaris/native/sun/awt \
 	      -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
 	      -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils -lc)
 
-ifeq ($(PLATFORM)-$(LIBARCH), solaris-i386)
+ifeq ($(OPENJDK_TARGET_OS)-$(LIBARCH), solaris-i386)
 
 $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.32 : $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.32.exe
 	$< > $@.tmp
 	$(MV) $@.tmp $@
 
-$(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.64 : $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes/sun/awt/X11/generator/sizes.64-$(PLATFORM)-$(LIBARCH)
+$(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.64 : $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/classes/sun/awt/X11/generator/sizes.64-$(OPENJDK_TARGET_OS)-$(LIBARCH)
 	$(MKDIR) -p $(@D)
 	$(CP) $< $@
 else
@@ -88,9 +93,9 @@
 	$(MKDIR) -p $(@D)/sun/awt/X11
 	$(RM) $(@D)/sun/awt/X11/*
 	$(TOOL_WRAPPERGENERATOR) $(@D)/sun/awt/X11 $(GENSRC_SIZER_SRC)/xlibtypes.txt "gen" $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes
-ifeq ($(PLATFORM)-$(LIBARCH), solaris-amd64)
-	$(ECHO) COMPARING $@ and $(GENSRC_SIZER_SRC)/sizes.64-$(PLATFORM)-i386
-	$(DIFF) $(GENSRC_X11WRAPPERS_TMP)/sizes.64 $(GENSRC_SIZER_SRC)/sizes.64-$(PLATFORM)-i386
+ifeq ($(OPENJDK_TARGET_OS)-$(LIBARCH), solaris-amd64)
+	$(ECHO) COMPARING $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.64 and $(GENSRC_SIZER_SRC)/sizes.64-$(OPENJDK_TARGET_OS)-i386
+	$(DIFF) $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.64 $(GENSRC_SIZER_SRC)/sizes.64-$(OPENJDK_TARGET_OS)-i386
 endif
 	$(TOUCH) $@
 
--- a/jdk/makefiles/Images.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/Images.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -34,15 +34,20 @@
 
 images: jre-image jdk-image
 
-ifeq ($(HOST_OS),solaris)
+ifeq ($(OPENJDK_TARGET_OS),solaris)
 define install-file
 	$(MKDIR) -p $(@D)
-	$(CP) -r -P '$<' '$(@D)'
+	$(CP) -f -r -P '$<' '$(@D)'
+endef
+else ifeq ($(OPENJDK_TARGET_OS),macosx)
+define install-file
+	$(MKDIR) -p $(@D)
+	$(CP) -fpRP '$<' '$@'
 endef
 else
 define install-file
 	$(MKDIR) -p $(@D)
-	$(CP) -P '$<' '$@'
+	$(CP) -fP '$<' '$@'
 endef
 endif
 
@@ -67,7 +72,7 @@
 	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(install-file)
 
-NOT_JRE_BIN_FILES = \
+NOT_JRE_BIN_FILES := \
 	appletviewer$(EXE_SUFFIX) \
 	extcheck$(EXE_SUFFIX) \
 	idlj$(EXE_SUFFIX) \
@@ -107,7 +112,12 @@
 
 # Find all files in bin dir
 ALL_BIN_LIST := $(shell $(FIND) $(JDK_OUTPUTDIR)/bin -type f)
-ifeq ($(HOST_OS),windows)
+
+# For unknown reason the debuginfo files for binaries are not put into images
+# e.g filter them out
+ALL_BIN_LIST := $(filter-out %.debuginfo %.diz, $(ALL_BIN_LIST))
+
+ifeq ($(OPENJDK_TARGET_OS),windows)
     JDK_BIN_LIST := $(filter $(addprefix %,$(WINDOWS_JDK_BIN_FILES)), $(ALL_BIN_LIST))
 else
     JDK_BIN_LIST := $(ALL_BIN_LIST)
@@ -147,7 +157,7 @@
 	ct.sym
 
 JDK_LIB_FILES := $(NOT_JRE_LIB_FILES)
-ifeq ($(HOST_OS), linux)
+ifeq ($(OPENJDK_TARGET_OS), linux)
     JDK_LIB_FILES += jexec
 endif
 
@@ -236,14 +246,21 @@
         wsimport.1         \
         xjc.1
 
-ifeq ($(HOST_OS), linux)
+ifeq ($(OPENJDK_TARGET_OS), linux)
     MAN_SRC_DIR:=$(JDK_TOPDIR)/src/linux/doc
     MAN1_SUBDIR:=man
 endif
-ifeq ($(HOST_OS), solaris)
+ifeq ($(OPENJDK_TARGET_OS), solaris)
     MAN_SRC_DIR:=$(JDK_TOPDIR)/src/solaris/doc
     MAN1_SUBDIR:=sun/man/man1
 endif
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+    MAN_SRC_DIR:=$(JDK_TOPDIR)/src/bsd/doc
+    MAN1_SUBDIR:=man
+    JDK_MAN_PAGES := $(filter-out jcmd.1, $(JDK_MAN_PAGES))
+    JDK_MAN_PAGES := $(filter-out jvisualvm.1, $(JDK_MAN_PAGES))
+endif
+
 
 $(JRE_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/%
 	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
@@ -286,7 +303,7 @@
 	$(ECHO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(call install-ja-manpage,PCK)
 
-ifeq ($(HOST_OS), solaris)
+ifeq ($(OPENJDK_TARGET_OS), solaris)
     $(JRE_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
 	$(ECHO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(install-file)
@@ -302,7 +319,17 @@
 	$(MKDIR) -p $(@D)
 	$(TOUCH) $@
 
-ifeq ($(HOST_OS), linux)
+ifeq ($(OPENJDK_TARGET_OS), linux)
+    $(JRE_IMAGE_DIR)/man/ja:
+	$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
+
+    $(JDK_IMAGE_DIR)/man/ja:
+	$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
+endif
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
     $(JRE_IMAGE_DIR)/man/ja:
 	$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
@@ -312,7 +339,7 @@
 	$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
 endif
 
-ifeq ($(HOST_OS), linux)
+ifeq ($(OPENJDK_TARGET_OS), linux)
     JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/,$(JRE_MAN_PAGES)) \
 			 $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JRE_MAN_PAGES)) \
 			 $(JRE_IMAGE_DIR)/man/ja
@@ -322,7 +349,7 @@
 			 $(JDK_IMAGE_DIR)/man/ja
 endif
 
-ifeq ($(HOST_OS), solaris)
+ifeq ($(OPENJDK_TARGET_OS), solaris)
     JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/,$(JRE_MAN_PAGES)) \
 			 $(addprefix $(JRE_IMAGE_DIR)/man/ja/man1/,$(JRE_MAN_PAGES)) \
 			 $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JRE_MAN_PAGES)) \
@@ -334,6 +361,16 @@
 			 $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/,$(JDK_MAN_PAGES))
 endif
 
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+    JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/,$(JRE_MAN_PAGES)) \
+			 $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JRE_MAN_PAGES)) \
+			 $(JRE_IMAGE_DIR)/man/ja
+
+    JDK_MAN_PAGE_LIST := $(addprefix $(JDK_IMAGE_DIR)/man/man1/,$(JDK_MAN_PAGES)) \
+			 $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JDK_MAN_PAGES)) \
+			 $(JDK_IMAGE_DIR)/man/ja
+endif
+
 ################################################################################
 # /demo dir
 
@@ -383,6 +420,7 @@
     $(JDK_IMAGE_DIR)/db/README-JDK.html: $(JDK_TOPDIR)/src/closed/share/db/README-JDK.html
 	$(ECHO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'
 	$(install-file)
+	$(CHMOD) 644 $(@)
 
     JDK_DB_TARGETS := $(patsubst $(JDK_TOPDIR)/src/closed/share/db/%,$(IMAGES_OUTPUTDIR)/_unzip/%.unzipped,\
 			$(shell $(FIND) $(JDK_TOPDIR)/src/closed/share/db -name "*.zip" ! -name "*demo*")) \
@@ -411,7 +449,7 @@
 else
     JRE_DOC_FILES := COPYRIGHT Welcome.html LICENSE THIRDPARTYLICENSEREADME.txt
     JDK_DOC_FILES := COPYRIGHT README.html  LICENSE THIRDPARTYLICENSEREADME.txt
-    ifeq ($(HOST_OS), windows)
+    ifeq ($(OPENJDK_TARGET_OS), windows)
         JRE_DOC_FILES += README.txt
     else
         JRE_DOC_FILES += README
@@ -432,32 +470,39 @@
 $(JRE_IMAGE_DIR)/%: $(JRE_DOC_LOCATION)/%
 	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(install-file)
+	$(CHMOD) 444 $(@)
 
 $(JDK_IMAGE_DIR)/jre/%: $(JRE_DOC_LOCATION)/%
 	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(install-file)
+	$(CHMOD) 444 $(@)
 
 $(JRE_IMAGE_DIR)/README.txt: $(JRE_DOC_LOCATION)/README
 	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $(@D)
 	$(CP) $< $@
+	$(CHMOD) 444 $(@)
 
 $(JDK_IMAGE_DIR)/jre/README.txt: $(JRE_DOC_LOCATION)/README
 	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $(@D)
 	$(CP) $< $@
+	$(CHMOD) 444 $(@)
 
 $(JDK_IMAGE_DIR)/%: $(JDK_DOC_LOCATION)/%
 	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(install-file)
+	$(CHMOD) 444 $(@)
 
 $(JDK_IMAGE_DIR)/demo/%: $(JDK_DOC_LOCATION)/%
 	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(install-file)
+	$(CHMOD) 444 $(@)
 
 $(JDK_IMAGE_DIR)/sample/%: $(JDK_DOC_LOCATION)/%
 	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(install-file)
+	$(CHMOD) 444 $(@)
 
 JRE_INFO_FILE := $(JRE_IMAGE_DIR)/release
 JDK_INFO_FILE := $(JDK_IMAGE_DIR)/release
@@ -500,7 +545,7 @@
 # Post processing (strip etc)
 
 ifneq ($(POST_STRIP_CMD),)
-    ifeq ($(HOST_OS), windows)
+    ifeq ($(OPENJDK_TARGET_OS), windows)
         EXEC_LIST:=$(shell $(FIND) $(JDK_OUTPUTDIR)/bin -type f -name \*.exe \
 		-o -name \*.dll | $(EGREP) -v -i "$(MSVCRNN_DLL)")
     else
@@ -510,17 +555,43 @@
 		| $(EGREP) 'ELF' | $(CUT) -d':' -f1)
     endif
     # Filter out non JRE files and convert to unique touch files to depend on
-    JRE_EXEC_TOUCH_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%,$(IMAGES_OUTPUTDIR)/_strip/%.stripped,\
+    JRE_EXEC_TOUCH_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%,$(IMAGES_OUTPUTDIR)/_strip_jre/%.stripped,\
+			$(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES)), $(EXEC_LIST)))
+
+    JDK_JRE_EXEC_TOUCH_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%, \
+                        $(IMAGES_OUTPUTDIR)/_strip_jdk/jre/%.stripped, \
 			$(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES)), $(EXEC_LIST)))
 
+    JDK_BIN_EXEC_TOUCH_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \
+                          $(IMAGES_OUTPUTDIR)/_strip_jdk/%.stripped, \
+                          $(filter-out $(JDK_OUTPUTDIR)/lib/%, $(EXEC_LIST)))
+
     # Setup a rule for stripping files based on touch files
-    $(IMAGES_OUTPUTDIR)/_strip/%.stripped: $(JRE_IMAGE_DIR)/%
+    $(IMAGES_OUTPUTDIR)/_strip_jre/%.stripped: $(JRE_IMAGE_DIR)/%
 	$(ECHO) Stripping $(patsubst $(OUTPUT_ROOT)/%,%,$<)
 	$(CHMOD) u+w $<
 	$(POST_STRIP_CMD) $<
 	$(CHMOD) go-w $<
 	$(MKDIR) -p $(@D)
 	$(TOUCH) $@
+
+    $(IMAGES_OUTPUTDIR)/_strip_jdk/bin/%.stripped: $(JDK_IMAGE_DIR)/bin/%
+	$(ECHO) Stripping $(patsubst $(OUTPUT_ROOT)/%,%,$<)
+	$(CHMOD) u+w $<
+	$(POST_STRIP_CMD) $<
+	$(CHMOD) go-w $<
+	$(MKDIR) -p $(@D)
+	$(TOUCH) $@
+
+    # Setup a rule for stripping files based on touch files
+    $(IMAGES_OUTPUTDIR)/_strip_jdk/jre/%.stripped: $(JDK_IMAGE_DIR)/jre/%
+	$(ECHO) Stripping $(patsubst $(OUTPUT_ROOT)/%,%,$<)
+	$(CHMOD) u+w $<
+	$(POST_STRIP_CMD) $<
+	$(CHMOD) go-w $<
+	$(MKDIR) -p $(@D)
+	$(TOUCH) $@
+
 endif
 
 ################################################################################
@@ -538,7 +609,8 @@
 	$(JDK_MAN_PAGE_LIST) $(JDK_SAMPLE_TARGETS) \
 	$(JDK_DB_TARGETS) $(JDK_INCLUDE_TARGETS) \
 	$(JDKJRE_DOC_TARGETS) $(JDK_DOC_TARGETS) \
-	$(JDK_INFO_FILE) $(JDK_IMAGE_DIR)/src.zip
+	$(JDK_INFO_FILE) $(JDK_JRE_EXEC_TOUCH_LIST) $(JDK_BIN_EXEC_TOUCH_LIST) \
+        $(JDK_IMAGE_DIR)/src.zip
 
 ################################################################################
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/makefiles/Import.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -0,0 +1,243 @@
+#
+# 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.  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.
+#
+
+default: all
+
+include $(SPEC)
+include MakeBase.gmk
+
+#######
+
+IMPORT_TARGET_FILES :=
+
+IMPORT_CLASSES := CORBA JAXP JAXWS LANGTOOLS
+IMPORT_SOURCES := CORBA JAXP JAXWS LANGTOOLS
+# Only Corba has binaries
+IMPORT_BINARIES := CORBA
+
+#######
+
+# Put the libraries here. Different locations for different target apis.
+ifeq ($(OPENJDK_TARGET_OS_API),posix)
+    ifneq ($(OPENJDK_TARGET_OS),macosx)
+        INSTALL_LIBRARIES_HERE:=$(JDK_OUTPUTDIR)/lib/$(LIBARCH)
+    else
+        INSTALL_LIBRARIES_HERE:=$(JDK_OUTPUTDIR)/lib
+    endif
+    HOTSPOT_LIB_DIR:=$(HOTSPOT_DIST)/jre/lib/$(LIBARCH)
+else
+    INSTALL_LIBRARIES_HERE:=$(JDK_OUTPUTDIR)/bin
+    HOTSPOT_LIB_DIR:=$(HOTSPOT_DIST)/jre/bin
+endif
+
+#######
+
+#
+# jar xf/unzip fails when executing them all in parallel
+#   introduce artificial dependency (_DEP) buuhhh 
+
+define ImportClasses
+$1_CLASSES_DEP := $$(IMPORT_TARGET_CLASSES)
+IMPORT_TARGET_CLASSES += $(JDK_OUTPUTDIR)/classes/_the.$1.classes.imported
+
+$(JDK_OUTPUTDIR)/classes/_the.$1.classes.imported : $$($1_DIST)/lib/classes.jar $$($1_CLASSES_DEP)
+	$(ECHO) Importing $1 classes.jar
+	$(MKDIR) -p $$(@D)
+	($(CD) $$(@D) && $(JAR) xvf $$< > $$@.tmp)
+	$(MV) $$@.tmp $$@
+endef
+
+define ImportSources
+$1_SOURCES_DEP := $$(IMPORT_TARGET_SOURCES)
+IMPORT_TARGET_SOURCES += $(JDK_OUTPUTDIR)/impsrc/_the.$1.src.imported
+
+$(JDK_OUTPUTDIR)/impsrc/_the.$1.src.imported : $$($1_DIST)/lib/src.zip $$($1_SOURCES_DEP)
+	$(ECHO) Importing $1 src.zip
+	$(MKDIR) -p $$(@D)
+	($(CD) $$(@D) && $(JAR) xvf $$< > $$@.tmp)
+	$(MV) $$@.tmp $$@
+endef
+
+define ImportBinaries
+$1_BINARIES_DEP := $$(IMPORT_TARGET_BINARIES)
+IMPORT_TARGET_BINARIES += $(JDK_OUTPUTDIR)/_the.$1.binaries.imported
+
+$(JDK_OUTPUTDIR)/_the.$1.binaries.imported : $$($1_DIST)/lib/bin.zip $$($1_BINARIES_DEP)
+	$(ECHO) Importing $1 bin.zip
+	$(MKDIR) -p $$(@D)
+	($(CD) $$(@D) && $(JAR) xvf $$< > $$@.tmp)
+	$(MV) $$@.tmp $$@
+endef
+
+#######
+
+$(foreach I,$(IMPORT_CLASSES), $(eval $(call ImportClasses,$I)))
+$(foreach I,$(IMPORT_SOURCES), $(eval $(call ImportSources,$I)))
+$(foreach I,$(IMPORT_BINARIES), $(eval $(call ImportBinaries,$I)))
+
+IMPORT_TARGET_FILES += $(IMPORT_TARGET_CLASSES) $(IMPORT_TARGET_SOURCES) $(IMPORT_TARGET_BINARIES)
+
+#######
+
+ifeq ($(OPENJDK_TARGET_OS),solaris)
+define do-install-file
+	$(MKDIR) -p $$(@D)
+	$(CP) -r -P '$$<' '$$(@D)'
+endef
+else ifeq ($(OPENJDK_TARGET_OS),macosx)
+define do-install-file
+	$(MKDIR) -p $$(@D)
+	$(CP) -pRP '$$<' '$$@'
+endef
+else
+define do-install-file
+	$(MKDIR) -p $$(@D)
+	$(CP) -P '$$<' '$$@'
+endef
+endif
+
+define CopyDir
+        $1_SRC_FILES := $(shell $(FIND) $2 -type f)
+        $1_DST_FILES := $$(patsubst $2/%,$3/%,$$($1_SRC_FILES))
+        IMPORT_TARGET_FILES += $$($1_DST_FILES)
+$3/% : $2/%
+	$(ECHO) Copying $$(@F)
+	$(do-install-file)
+endef
+
+#######
+
+#
+# Import hotspot
+#
+
+$(eval $(call CopyDir,HOTSPOT0, $(HOTSPOT_LIB_DIR), $(INSTALL_LIBRARIES_HERE)))
+$(eval $(call CopyDir,HOTSPOT1, $(HOTSPOT_DIST)/lib, $(JDK_OUTPUTDIR)/lib))
+
+JSIG_DEBUGINFO := $(wildcard $(HOTSPOT_DIST)/jre/lib/$(LIBARCH)/libjsig.debuginfo) \
+                  $(wildcard $(HOTSPOT_DIST)/jre/lib/$(LIBARCH)/libjsig.diz)
+
+ifneq ($(OPENJDK_TARGET_OS), windows)
+    ifeq ($(JVM_VARIANT_SERVER), true)
+        IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/server/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
+        ifneq (,$(JSIG_DEBUGINFO))
+            IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/server/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
+        endif
+    endif
+    ifeq ($(JVM_VARIANT_CLIENT), true)
+        IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/client/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
+        ifneq (,$(JSIG_DEBUGINFO))
+            IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/client/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
+        endif
+    endif
+endif
+
+$(INSTALL_LIBRARIES_HERE)/server/%$(SHARED_LIBRARY_SUFFIX) : $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
+	$(RM) -f $@
+	$(LN) -s ../$(@F) $@
+
+$(INSTALL_LIBRARIES_HERE)/server/%.debuginfo : $(INSTALL_LIBRARIES_HERE)/%.debuginfo
+	$(RM) -f $@
+	$(LN) -s ../$(@F) $@
+
+$(INSTALL_LIBRARIES_HERE)/server/%.diz : $(INSTALL_LIBRARIES_HERE)/%.diz
+	$(RM) -f $@
+ifeq (REALLY_WEIRD,1)
+	$(LN) -s ../$(@F) $@
+else
+#
+# TODO: Check if this is what they really want...a zip containing a symlink
+#
+	$(RM) -f $(basename $@).debuginfo
+	$(LN) -s ../$(basename $(@F)).debuginfo $(basename $@).debuginfo
+	$(ZIP) -q -y $@ $(basename $@).debuginfo
+	$(RM) -f $(basename $@).debuginfo
+endif
+
+$(INSTALL_LIBRARIES_HERE)/client/%$(SHARED_LIBRARY_SUFFIX) : $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
+	$(RM) -f $@
+	$(LN) -s ../$(@F) $@
+
+$(INSTALL_LIBRARIES_HERE)/client/%.debuginfo : $(INSTALL_LIBRARIES_HERE)/%.debuginfo
+	$(RM) -f $@
+	$(LN) -s ../$(@F) $@
+
+$(INSTALL_LIBRARIES_HERE)/client/%.diz : $(INSTALL_LIBRARIES_HERE)/%.diz
+	$(RM) -f $@
+ifeq (REALLY_WEIRD,1)
+	$(LN) -s ../$(@F) $@
+else
+#
+# TODO: Check if this is what they really want...a zip containing a symlink
+#
+	$(RM) -f $(basename $@).debuginfo
+	$(LN) -s ../$(basename $(@F)).debuginfo $(basename $@).debuginfo
+	$(ZIP) -q -y $@ $(basename $@).debuginfo
+	$(RM) -f $(basename $@).debuginfo
+endif
+
+#######
+
+ifeq ($(OPENJDK_TARGET_OS),solaris)
+define install-file
+	$(MKDIR) -p $(@D)
+	$(CP) -r -P '$<' '$(@D)'
+endef
+else ifeq ($(OPENJDK_TARGET_OS),macosx)
+define install-file
+	$(MKDIR) -p $(@D)
+	$(CP) -pRP '$<' '$@'
+endef
+else
+define install-file
+	$(MKDIR) -p $(@D)
+	$(CP) -P '$<' '$@'
+endef
+endif
+
+ifndef OPENJDK
+
+IMPORT_TARGET_FILES += \
+            $(JDK_OUTPUTDIR)/lib/security/US_export_policy.jar \
+            $(JDK_OUTPUTDIR)/lib/security/local_policy.jar \
+            $(JDK_OUTPUTDIR)/lib/jce.jar
+
+$(JDK_OUTPUTDIR)/lib/jce.jar : $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
+	$(ECHO) Copying $(@F)
+	$(install-file)
+
+$(JDK_OUTPUTDIR)/lib/security/local_policy.jar: $(JDK_TOPDIR)/make/closed/tools/crypto/jce/local_policy.jar
+	$(ECHO) Copying $(@F)
+	$(install-file)
+
+$(JDK_OUTPUTDIR)/lib/security/US_export_policy.jar: $(JDK_TOPDIR)/make/closed/tools/crypto/jce/US_export_policy.jar
+	$(ECHO) Copying $(@F)
+	$(install-file)
+
+endif # OPENJDK
+
+#######
+
+all: $(IMPORT_TARGET_FILES)
--- a/jdk/makefiles/LegacyMakefiles.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-#
-# 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.
-#
-
-include $(SPEC)
-include MakeBase.gmk
-
-all: $(JDK_OUTPUTDIR)/_the.legacy_make
-
-DEPS:=	$(shell $(FIND) $(JDK_TOPDIR)/makefiles/java -type f) \
-		$(shell $(FIND) $(JDK_TOPDIR)/makefiles/javax -type f) \
-		$(shell $(FIND) $(JDK_TOPDIR)/makefiles/sun -type f) \
-		$(shell $(FIND) $(JDK_TOPDIR)/makefiles/com -type f)
-
-$(JDK_OUTPUTDIR)/_the.legacy_make: $(DEPS)
-	(echo Building single threaded Java subdir && \
-        $(MAKE) -j1 -C java all && \
-	touch $@)
-
-.PHONY: all
-
--- a/jdk/makefiles/Makefile	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/Makefile	Wed Jul 05 18:16:12 2017 +0200
@@ -38,21 +38,21 @@
 include Tools.gmk
 
 all: $(BUILD_TOOLS)
+#       Import (corba jaxp jaxws langtools hotspot)
+	+$(MAKE) -f Import.gmk
+#
 	+$(MAKE) -f GenerateJavaSources.gmk
-#       Drop back to the old makefiles for
-#       packages/libs that have not yet been converted.
-	+$(MAKE) -f LegacyMakefiles.gmk
 #       Ok, now gensrc is fully populated.
 	+$(MAKE) -f GenerateData.gmk
 	+$(MAKE) -f CompileJavaClasses.gmk
-#	The classes have been built, now generate
-#	classes that have other sources.
-	+$(MAKE) -f GenerateClasses.gmk
 #       The classes are now built and
 #       any javah files have now been generated.
 	+$(MAKE) -f CompileNativeLibraries.gmk
 #       Finally compile the launchers.
 	+$(MAKE) -f CompileLaunchers.gmk
+#	Generate classes that have other sources. Needs
+#       to execute launchers.
+	+$(MAKE) -f GenerateClasses.gmk
 #       Now we have a complete jdk, which you can run.
 #       It is not yet wrapped up as an installed image.
 #       The demos are compiled against this jdk.
@@ -64,16 +64,11 @@
 	+$(MAKE) -f CopySamples.gmk
 endif
 
-# Create the final jdk and jre images in the old way. Kept for reference
-# until conversion is fully done.
-old-images:
-	+$(MAKE) $(IMAGES_MAKE_ARGS) -f OldImages.gmk 
-
 # Create the final jdk and jre images, to be wrapped up
 # into packages, or installed.
 images:
 	+$(MAKE) -f CreateJars.gmk
-	+$(MAKE) $(IMAGES_MAKE_ARGS) -f Images.gmk 
+	+$(MAKE) -f Images.gmk 
 
 
 BINARIES:=$(shell if test -d $(IMAGES_OUTPUTDIR)/j2sdk-image/bin; then cd $(IMAGES_OUTPUTDIR)/j2sdk-image/bin && $(LS) ; fi)
@@ -90,9 +85,4 @@
 	$(RM) $(addprefix $(INSTALL_PREFIX)/bin/,$(BINARIES))
 	$(foreach b,$(BINARIES),$(LN) -s $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/bin/$b $(INSTALL_PREFIX)/bin/$b &&) true
 
-# Create the deb,rpm,tgz,zip, packages.
-packages: images
-	echo Creating packages...well, in the future.
-	$(MKDIR) -p $(OUTPUT_ROOT)/packages
-
 .PHONY: all install images
--- a/jdk/makefiles/OldImages.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,175 +0,0 @@
-#
-# 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.
-#
-
-include $(SPEC)
-include MakeBase.gmk
-include JavaCompilation.gmk
-include Setup.gmk
-
-default: $(IMAGES_OUTPUTDIR)/_the.images
-
-include Tools.gmk
-
-JARS:=
-
-##########################################################################################
-
-JCONSOLE_JAR_DEPS := \
-  $(shell $(FIND) $(JDK_OUTPUTDIR)/newclasses/sun/tools/jconsole/ -name "_the.package") \
-  $(shell $(FIND) $(JDK_OUTPUTDIR)/newclasses/com/sun/tools/jconsole/ -name "_the.package")
-
-$(eval $(call SetupArchive,BUILD_JCONSOLE_JAR,$(JCONSOLE_JAR_DEPS),\
-		SRCS:=$(JDK_OUTPUTDIR)/newclasses,\
-		SUFFIXES:=.class .gif .png,\
-		INCLUDES:=sun/tools/jconsole com/sun/tools/jconsole,\
-		JARMAIN:=sun.tools.jconsole.JConsole,\
-		JAR:=$(JDK_OUTPUTDIR)/lib/jconsole.jar,\
-		SKIP_METAINF:=true))
-
-JARS+=$(JDK_OUTPUTDIR)/lib/jconsole.jar
-
-##########################################################################################
-
-CHARSETS_JAR_DEPS :=
-
-$(eval $(call SetupArchive,BUILD_CHARSETS_JAR,$(CHARSETS_JAR_DEPS),\
-		SRCS:=$(JDK_OUTPUTDIR)/newclasses, \
-		SUFFIXES:=.class .dat,\
-		INCLUDES:=sun/nio/cs/ext,\
-		EXTRA_FILES := sun/awt/HKSCS.class \
-                               sun/awt/motif/X11GBK.class \
-                               'sun/awt/motif/X11GB2312$$$$Decoder.class' \
-                               sun/awt/motif/X11GB2312.class \
-                               'sun/awt/motif/X11KSC5601$$$$Decoder.class' \
-                               'sun/awt/motif/X11KSC5601$$$$Encoder.class' \
-                               'sun/awt/motif/X11GB2312$$$$Encoder.class' \
-                               'sun/awt/motif/X11GBK$$$$Encoder.class' \
-                               sun/awt/motif/X11KSC5601.class \
-                               META-INF/services/java.nio.charset.spi.CharsetProvider, \
-		JAR:=$(JDK_OUTPUTDIR)/lib/charsets.jar, \
-		JARMAIN := NONE, \
-		SKIP_METAINF := true))
-
-JARS+=$(JDK_OUTPUTDIR)/lib/charsets.jar
-
-##########################################################################################
-
-SUNPKCS11_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunpkcs11.jar
-
-ifndef OPENJDK
-
-SUNPKCS11_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/pkcs11/sunpkcs11.jar
-
-$(SUNPKCS11_JAR_DST) : $(SUNPKCS11_JAR_SRC)
-	@$(ECHO) "\n>>>Installing prebuilt SunPKCS11 provider..."
-	$(RM) $@
-	$(CP) $< $@
-
-else
-
-$(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR,$(SUNPKCS11_JAR_DEPS),\
-		SRCS:=$(JDK_OUTPUTDIR)/newclasses, \
-		SUFFIXES:=.class,\
-		INCLUDES:=sun/security/pkcs11,\
-		JAR:=$(SUNPKCS11_JAR_DST), \
-		JARMAIN := NONE, \
-		SKIP_METAINF := true))
-
-endif
-
-JARS += $(SUNPKCS11_JAR_DST)
-
-##########################################################################################
-
-SUNEC_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunec.jar
-
-ifndef OPENJDK
-
-SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar
-
-$(SUNEC_JAR_DST) : $(SUNEC_JAR_SRC)
-	@$(ECHO) "\n>>>Installing prebuilt SunEC provider..."
-	$(RM) $@
-	$(CP) $< $@
-
-else
-
-$(eval $(call SetupArchive,BUILD_SUNEC_JAR,$(SUNEC_JAR_DEPS),\
-		SRCS:=$(JDK_OUTPUTDIR)/newclasses, \
-		SUFFIXES:=.class,\
-		INCLUDES:=sun/security/ec,\
-		EXCLUDE_FILES := \
-			sun/security/ec/ECKeyFactory.class \
-			sun/security/ec/ECParameters.class \
-			sun/security/ec/ECPrivateKeyImpl.class \
-			sun/security/ec/ECPublicKeyImpl.class \
-			sun/security/ec/NamedCurve.class \
-			'sun/security/ec/ECKeyFactory$$$$1.class' \
-			'sun/security/ec/ECKeyFactory$$$$2.class' ,\
-		JAR:=$(SUNEC_JAR_DST), \
-		JARMAIN := NONE, \
-		SKIP_METAINF := true))
-
-endif
-
-JARS += $(SUNEC_JAR_DST)
-
-##########################################################################################
-
-# TODO: deps?
-$(eval $(call SetupArchive,BUILD_SWINGBEANS_JAR,$(SWINGBEANS_JAR_DEPS),\
-		SRCS:=$(JDK_OUTPUTDIR)/newclasses,\
-		SUFFIXES:=BeanInfo.class .gif,\
-		INCLUDES:=javax/swing sun/swing,\
-		EXCLUDES:=javax/swing/plaf,\
-		EXTRA_FILES:=javax/swing/SwingBeanInfoBase.class sun/swing/BeanInfoUtils.class,\
-		JAR:=$(JDK_OUTPUTDIR)/lib/dt.jar,\
-		JARMAIN:=NONE,\
-		SKIP_METAINF:=true))
-
-JARS+=$(JDK_OUTPUTDIR)/lib/dt.jar
-
-##########################################################################################
-
-# Need to define BUILDDIR for Release.gmk to work
-BUILDDIR=$(JDK_TOPDIR)/makefiles
-include common/Defs.gmk
-include common/Release.gmk
-
-# A rudimentary attempt at band-aiding the dependency tracking.
-DEPS:=	$(shell $(FIND) $(JDK_OUTPUTDIR)/newclasses -name "*.class" -type f) \
-	$(shell $(FIND) $(JDK_OUTPUTDIR)/bin -type f) \
-	$(shell $(FIND) $(JDK_OUTPUTDIR)/lib -type f) 
-
-$(IMAGES_OUTPUTDIR)/_the.images : $(DEPS) $(JARS)
-	$(MKDIR) -p $(@D)
-# 	Restart this makefile, ugly, but since double colon (::) rules
-# 	have been used in Release.gmk, it is impossible to craft on
-# 	dependencies on these. I.e. -do-not-use- :: rules!!!!!
-#       Repeat after me: -do-not-use- :: rules!!!!!
-	$(MAKE) -j1 -f OldImages.gmk $(IMAGES_MAKE_ARGS) images
-	$(TOUCH) $@
-
-.PHONY: default
--- a/jdk/makefiles/Tools.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/Tools.gmk	Wed Jul 05 18:16:12 2017 +0200
@@ -123,3 +123,27 @@
 
 TOOL_TOBIN=$(JAVA) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
 	sun.awt.X11.ToBin
+
+##########################################################################################
+
+# Tools needed on solaris because OBJCOPY is broken.
+
+$(eval $(call SetupNativeCompilation,ADD_GNU_DEBUGLINK,\
+		SRC:=$(JDK_TOPDIR)/make/tools/add_gnu_debuglink,\
+		LANG:=C,\
+		CC:=$(HOST_CC),\
+		LDEXE:=$(HOST_LD),\
+		LDFLAGS:=-lelf,\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/add_gnu_debuglink,\
+		OUTPUT_DIR:=$(JDK_OUTPUTDIR)/btbin,\
+                PROGRAM:=add_gnu_debuglink))
+
+$(eval $(call SetupNativeCompilation,FIX_EMPTY_SEC_HDR_FLAGS,\
+		SRC:=$(JDK_TOPDIR)/make/tools/fix_empty_sec_hdr_flags,\
+		LANG:=C,\
+		CC:=$(HOST_CC),\
+		LDEXE:=$(HOST_LD),\
+		LDFLAGS:=-lelf,\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/fix_empty_sec_hdr_flags,\
+		OUTPUT_DIR:=$(JDK_OUTPUTDIR)/btbin,\
+                PROGRAM:=fix_empty_sec_hdr_flags))
--- a/jdk/makefiles/com/sun/crypto/provider/Makefile	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,275 +0,0 @@
-#
-# Copyright (c) 2007, 2011, 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.
-#
-
-#
-# Makefile for building sunjce_provider.jar.
-#
-# This file was derived from make/javax/crypto/Makefile.
-#
-
-#
-# (The terms "OpenJDK" and "JDK" below refer to OpenJDK and Sun JDK builds
-# respectively.)
-#
-# JCE builds are very different between OpenJDK and JDK.  The OpenJDK JCE
-# jar files do not require signing, but those for JDK do.  If an unsigned
-# jar file is installed into JDK, things will break when the crypto
-# routines are called.
-#
-# This Makefile does the "real" build of the JCE files.  There are some
-# javac options currently specific to JCE, so we recompile now to make
-# sure any implicit compilations didn't use any incorrect flags.
-#
-# For OpenJDK, the jar files built here are installed directly into the
-# OpenJDK.
-#
-# For JDK, the binaries use pre-built/pre-signed binary files stored in
-# the closed workspace that are not shipped in the OpenJDK workspaces.
-# We still build the JDK files here to verify the files compile, and in
-# preparation for possible signing.  Developers working on JCE in JDK
-# must sign the JCE files before testing.  The JCE signing key is kept
-# separate from the JDK workspace to prevent its disclosure.
-# 
-# SPECIAL NOTE TO JCE/JDK developers:  The source files must eventually
-# be built and signed, and the resulting jar files MUST BE CHECKED INTO
-# THE CLOSED PART OF THE WORKSPACE*.  This separate step *MUST NOT BE
-# FORGOTTEN*, otherwise a bug fixed in the source code will not be
-# reflected in the shipped binaries.  The "release" target should be
-# used to generate the required files.
-#
-# There are a number of targets to help both JDK/OpenJDK developers.
-#
-# Main Targets (JDK/OPENJDK):
-#
-#     all/clobber/clean        The usual.
-#                                  If OpenJDK, installs sunjce_provider.jar.
-#                                  If JDK, installs prebuilt
-#                                      sunjce_provider.jar.
-#
-#     jar                      Builds/installs sunjce_provider.jar
-#                                  If OpenJDK, does not sign.
-#                                  If JDK, tries to sign.
-#
-# Other lesser-used Targets (JDK/OPENJDK):
-#
-#     build-jar                Builds sunjce_provider.jar
-#                                  (does not sign/install)
-#
-#     install-jar              Alias for "jar" above.
-#
-# Other targets (JDK only):
-#
-#     sign                     Alias for sign-jar
-#         sign-jar             Builds/signs sunjce_provider.jar (no install)
-#
-#     release                  Builds all targets in preparation
-#                              for workspace integration.
-#
-#     install-prebuilt         Installs the pre-built jar files
-#
-# This makefile was written to support parallel target execution.
-#
-
-BUILDDIR = ../../../..
-PACKAGE = com.sun.crypto.provider
-PRODUCT = sun
-
-#
-# The following is for when we need to do postprocessing
-# (signing) against a read-only build.  If the OUTPUTDIR
-# isn't writable, the build currently crashes out.
-#
-ifndef OPENJDK
-  ifdef ALT_JCE_BUILD_DIR
-    # =====================================================
-    # Where to place the output, in case we're building from a read-only
-    # build area.  (e.g. a release engineering build.)
-    JCE_BUILD_DIR=${ALT_JCE_BUILD_DIR}
-    IGNORE_WRITABLE_OUTPUTDIR_TEST=true
-  else
-    JCE_BUILD_DIR=${TEMPDIR}
-  endif
-endif
-
-JAVAC_MAX_WARNINGS = false
-JAVAC_LINT_OPTIONS = -Xlint:all,-deprecation
-JAVAC_WARNINGS_FATAL = true
-include $(BUILDDIR)/common/Defs.gmk
-
-#
-# Location for the newly built classfiles.
-#
-CLASSDESTDIR = $(TEMPDIR)/classes
-
-#
-# Subdirectories of these are automatically included.
-#
-AUTO_FILES_JAVA_DIRS = \
-    com/sun/crypto/provider
-
-include $(BUILDDIR)/common/Classes.gmk
-
-#
-# Rules
-#
-
-#
-# Some licensees do not get the security sources, but we still need to
-# be able to build "all" for them.  Check here to see if the sources were
-# available.  If not, then we don't need to continue this rule.
-#
-
-ifdef OPENJDK
-all: build-jar install-jar
-else  # OPENJDK
-ifeq ($(strip $(FILES_java)),)
-all: install-prebuilt
-	$(no-source-warning)
-else  # FILES_java available
-all: build-jar install-prebuilt
-	$(build-warning)
-endif # $(FILES_java) available
-endif # OPENJDK
-
-#
-# We use a variety of subdirectories in the $(TEMPDIR) depending on what
-# part of the build we're doing.  Both OPENJDK/JDK builds are initially
-# done in the unsigned area.  When files are signed in JDK, they will be
-# placed in the appropriate areas.
-#
-UNSIGNED_DIR = $(TEMPDIR)/unsigned
-
-include $(BUILDDIR)/javax/crypto/Defs-jce.gmk
-
-
-# =====================================================
-# Build the unsigned sunjce_provider.jar file.
-#
-
-JAR_DESTFILE = $(EXTDIR)/sunjce_provider.jar
-
-#
-# The sunjce_provider.jar needs to be in the extension class directory,
-# therefore none of its classes should appear in $(CLASSBINDIR).
-# Currently no one is using any of the SunJCE internals, so these files
-# should not have been built.
-#
-
-#
-# Since the -C option to jar is used below, each directory entry must be
-# preceded with the appropriate directory to "cd" into.
-#
-JAR_DIRS = $(patsubst %, -C $(CLASSDESTDIR) %, $(AUTO_FILES_JAVA_DIRS))
-
-build-jar: $(UNSIGNED_DIR)/sunjce_provider.jar
-
-#
-# Build sunjce_provider.jar.
-#
-$(UNSIGNED_DIR)/sunjce_provider.jar: build $(JCE_MANIFEST_FILE)
-	$(prep-target)
-	$(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ $(JAR_DIRS) \
-	    $(BOOT_JAR_JFLAGS)
-	@$(java-vm-cleanup)
-
-
-ifndef OPENJDK
-# =====================================================
-# Sign the provider jar file.  Not needed for OpenJDK.
-#
-
-SIGNED_DIR = $(JCE_BUILD_DIR)/signed
-
-sign: sign-jar
-
-sign-jar: $(SIGNED_DIR)/sunjce_provider.jar
-
-ifndef ALT_JCE_BUILD_DIR
-$(SIGNED_DIR)/sunjce_provider.jar: $(UNSIGNED_DIR)/sunjce_provider.jar
-else
-#
-# We have to remove the build dependency, otherwise, we'll try to rebuild it
-# which we can't do on a read-only filesystem.
-#
-$(SIGNED_DIR)/sunjce_provider.jar:
-	@if [ ! -r $(UNSIGNED_DIR)/sunjce_provider.jar ] ; then \
-	    $(ECHO) "Couldn't find $(UNSIGNED_DIR)/sunjce_provider.jar"; \
-	    exit 1; \
-	fi
-endif
-	$(call sign-file, $(UNSIGNED_DIR)/sunjce_provider.jar)
-
-
-# =====================================================
-# Create the Release Engineering files.  Signed builds, etc.
-#
-
-release: $(SIGNED_DIR)/sunjce_provider.jar
-	$(RM) $(JCE_BUILD_DIR)/release/sunjce_provider.jar
-	$(MKDIR) -p $(JCE_BUILD_DIR)/release
-	$(CP) $(SIGNED_DIR)/sunjce_provider.jar $(JCE_BUILD_DIR)/release
-	$(release-warning)
-
-endif # OPENJDK
-
-
-# =====================================================
-# Install routines.
-#
-
-#
-# Install sunjce_provider.jar, depending on which type is requested.
-#
-install-jar jar: $(JAR_DESTFILE)
-ifndef OPENJDK
-	$(release-warning)
-endif
-
-ifdef OPENJDK
-$(JAR_DESTFILE): $(UNSIGNED_DIR)/sunjce_provider.jar
-else
-$(JAR_DESTFILE): $(SIGNED_DIR)/sunjce_provider.jar
-endif
-	$(install-file)
-
-ifndef OPENJDK
-install-prebuilt:
-	@$(ECHO) "\n>>>Installing prebuilt SunJCE provider..."
-	$(RM) $(JAR_DESTFILE)
-	$(CP) $(PREBUILT_DIR)/jce/sunjce_provider.jar $(JAR_DESTFILE)
-endif
-
-
-# =====================================================
-# Support routines.
-#
-
-clobber clean::
-	$(RM) -r $(JAR_DESTFILE) $(TEMPDIR) $(JCE_BUILD_DIR)
-
-.PHONY: build-jar jar install-jar
-ifndef OPENJDK
-.PHONY: sign sign-jar release install-prebuilt
-endif
--- a/jdk/makefiles/common/Classes.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-#
-# Copyright (c) 1995, 2005, 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.
-#
-
-# WARNING: This file is shared with other workspaces.
-#          So when it includes other files, it must use JDK_TOPDIR.
-#
-
-include $(JDK_TOPDIR)/makefiles/common/Rules.gmk
-
-#
-# Say you built classes into $(ALT_CLASSBINDIR) and then at the end of
-# the build you might want to copy them over to $(ALT_CLASSDESTDIR);
-# this rule takes care of that.  No one should really set these
-# variables except the bootstrap/recompile stage of the java compiler.
-#
-ifdef ALT_CLASSBINDIR
-
-# By default post-processing is copying.  Suppose you want to build
-# a jar file then set ALT_CLASSES_DISPOSITION to '../../dest/nameof.jar'
-# before including this file.
-ifndef ALT_CLASSES_DISPOSITION
-ALT_CLASSES_DISPOSITION = copy-classes
-endif
-
-build : $(ALT_CLASSES_DISPOSITION)
-
-copy-classes: 
-ifneq ($(ALT_CLASSBINDIR), $(ALT_CLASSDESTDIR))
-	@if [ -s $(TEMPDIR)/.classes.list ]; then \
-	  mkdir -p $(ALT_CLASSDESTDIR); \
-	  echo "Copying $(ALT_CLASSBINDIR)..."; \
-	  echo "(cd $(ALT_CLASSBINDIR); tar cf - .) | \
-			(cd $(ALT_CLASSDESTDIR); tar xf -)"; \
-	  (cd $(ALT_CLASSBINDIR); tar cf - .) | \
-			(cd $(ALT_CLASSDESTDIR); tar xf -); \
-	fi
-else # ALT_CLASSBINDIR
-	@if [ -s $(TEMPDIR)/.classes.list ]; then \
-	  echo "Copy source and destination are the same: $(ALT_CLASSBINDIR) -- Copy skipped..."; \
-	fi
-endif # ALT_CLASSBINDIR
-
-.PHONY: copy-classes
-endif # ALT_CLASSBINDIR
-
--- a/jdk/makefiles/common/Cscope.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-#
-# Copyright (c) 1998, 2010, 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.
-#
-
-#
-# The cscope.out file is made in the current directory and spans the entire
-# source tree.
-#
-# Things to note:
-#	1. We use relative names for cscope.
-#	2. We *don't* remove the old cscope.out file, because cscope is smart
-#	   enough to only build what has changed.  It can be confused, however,
-#	   if files are renamed or removed, so it may be necessary to manually
-#	   remove cscope.out if a lot of reorganization has occurred.
-#
-CSDIRS	= $(JDK_TOPDIR)/src $(JDK_TOPDIR)/build
-CSINCS	= $(CSDIRS:%=-I%)
-
-#
-# Set CSFLAGS env variable to -b when using fast cscope to build the fast
-# (but large) cscope data bases.
-#
-CSCOPE	= cscope-fast
-ifeq ($(CSCOPE), cscope-fast)
-CSFLAGS	= -b
-endif
-
-#
-# Adding .java files pushes the file count of a full workspace up about 2500
-# files, which slows database lookup.  Thus allow these files to be added from
-# the environment (CSCLASSES=yes).
-#
-ifdef	CSCLASSES
-ADDCLASSES=	-o -name '*.java'
-endif
-
-#
-# Adding CClassHeaders also pushes the file count of a full workspace up about
-# 200 files (these files also don't exist in a new workspace, and thus will
-# cause the recreation of the database as they get created, which might seem
-# A little confusing).  Thus allow these files to be added from the environment
-# (CSHEADERS=yes).
-#
-ifndef	CSHEADERS
-RMCCHEADERS=	-o -name CClassHeaders
-endif
-
-
-.PRECIOUS:	cscope.out
-
-cscope.out: cscope.files FRC
-	$(CSCOPE) $(CSFLAGS)
-
-#
-# What files should we include?  A simple rule might be just those files under
-# SCM control, however this would miss files we create like the opcodes and
-# CClassHeaders.  The following attempts to find everything that is *useful*.
-# (demo directories contain many .java files
-# that probably aren't useful for development, and the pkgarchive may contain
-# duplicates of files within the source hierarchy).  The ordering of the .raw
-# file is an attempt to make cscope display the most relevant files first.
-#
-cscope.files: FRC
-	@-$(RM) cscope.files cscope.files.raw
-	echo "$(CSINCS)" > cscope.files
-	-find $(CSDIRS) $(SCM_DIRS_prune) -o -type d \( -name '.del-*' -o \
-	    -name '*demo' -o -name pkgarchive $(RMCCHEADERS) \) -prune -o \
-	    -type f \( -name '*.[Ccshlxy]' -o -name '*.il' -o -name '*.cc' -o \
-	    -name 'Makefile*' -o -name GNUmakefile -o -name '*.gmk' -o \
-	    -name '*.cpp' $(ADDCLASSES) \) -print > cscope.files.raw
-	-egrep -v "\.java|\/build\/"	cscope.files.raw >> cscope.files
-	-fgrep ".java"			cscope.files.raw >> cscope.files
-	-fgrep "/build/"		cscope.files.raw >> cscope.files
-	@-$(RM) cscope.files.raw
-
-cscope.clean:
-	-$(RM) cscope.files cscope.files.raw cscope.out
-
-FRC:
--- a/jdk/makefiles/common/Defs-embedded.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-#
-# Copyright (c) 2011, 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.
-#
-
-#
-# Variable definitions for SE Embedded builds.  This file should
-# not contain rules.
-#
-ifdef JAVASE_EMBEDDED
-
-# Compress jar files
-COMPRESS_JARS = true
-
-# Don't mmap zip files
-LIBZIP_CAN_USE_MMAP = false
-
-# Disable ALSA version check
-REQUIRED_ALSA_VERSION =
-
-# Compilation settings
-OTHER_CPPFLAGS += -DJAVASE_EMBEDDED
-
-# Product naming
-PRODUCT_SUFFIX = SE Runtime Environment for Embedded
-RUNTIME_NAME = $(PRODUCT_NAME) $(PRODUCT_SUFFIX)
-
-# Reduced JRE locations
-JRE_REDUCED_HEADLESS_IMAGE_DIR = $(ABS_OUTPUTDIR)/j2re-reduced-headless-image
-JRE_REDUCED_IMAGE_DIR = $(ABS_OUTPUTDIR)/j2re-reduced-image
-
-# Override on linux to further reduce binary/lib sizes in product build
-ifeq ($(PLATFORM), linux)
-  ifeq ($(VARIANT), OPT)
-    ifneq ($(NO_STRIP), true)
-      ifneq ($(DEBUG_BINARIES), true)
-        POST_STRIP_PROCESS = $(STRIP) --strip-unneeded
-      endif
-    endif
-  endif
-endif
-
-# NIO Platform specific source file location
-ifdef CROSS_COMPILE_ARCH
-  NIO_PLATFORM_CLASSES_ROOT_DIR = $(CLOSED_PLATFORM_SRC)/classes/
-endif
-
-# For ARM sflt we need to link to a library with improved FP accuracy
-# and it must be linked after fdlibm - this places it at the end after libc
-# -z muldefs avoids linker errors for duplicate symbols.
-ifeq ($(CROSS_COMPILE_ARCH), arm)
-  EXTRA_LIBS +=  $(EXT_LIBS_PATH)/sflt_glibc_jdk.a -Xlinker -z -Xlinker muldefs
-endif
-
-endif # JAVASE_EMBEDDED
-
--- a/jdk/makefiles/common/Defs-linux.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,430 +0,0 @@
-#
-# Copyright (c) 1999, 2011, 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.
-#
-
-#
-# Makefile to specify compiler flags for programs and libraries
-# targeted to Linux.  Should not contain any rules.
-#
-# WARNING: This file is shared with other workspaces. 
-#          So when it includes other files, it must use JDK_TOPDIR.
-#
-
-# Warning: the following variables are overriden by Defs.gmk. Set
-# values will be silently ignored:
-#   CFLAGS        (set $(OTHER_CFLAGS) instead)
-#   CPPFLAGS      (set $(OTHER_CPPFLAGS) instead)
-#   CXXFLAGS      (set $(OTHER_CXXFLAGS) instead)
-#   LDFLAGS       (set $(OTHER_LDFAGS) instead)
-#   LDLIBS        (set $(EXTRA_LIBS) instead)
-#   LDLIBS_COMMON (set $(EXTRA_LIBS) instead)
-
-# Get shared JDK settings
-include $(JDK_MAKE_SHARED_DIR)/Defs.gmk
-
-# Part of INCREMENTAL_BUILD mechanism.
-#   Compiler emits things like:  path/file.o: file.h
-#   We want something like: relative_path/file.o relative_path/file.d: file.h
-CC_DEPEND	 = -MM
-CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g'
-
-ifndef PLATFORM_SRC
-  PLATFORM_SRC = $(BUILDDIR)/../src/solaris
-endif # PLATFORM_SRC
-
-# Platform specific closed sources
-ifndef OPENJDK
-  ifndef CLOSED_PLATFORM_SRC
-    CLOSED_PLATFORM_SRC = $(BUILDDIR)/../src/closed/solaris
-  endif
-endif
-
-# platform specific include files
-PLATFORM_INCLUDE_NAME = $(PLATFORM)
-PLATFORM_INCLUDE      = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
-
-# suffix used for make dependencies files.
-DEPEND_SUFFIX = d
-# The suffix applied to the library name for FDLIBM
-FDDLIBM_SUFFIX = a
-# The suffix applied to scripts (.bat for windows, nothing for unix)
-SCRIPT_SUFFIX =
-# CC compiler object code output directive flag value
-CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
-
-# Default OBJCOPY comes from GNU Binutils on Linux:
-DEF_OBJCOPY=/usr/bin/objcopy
-ifdef CROSS_COMPILE_ARCH
-  # don't try to generate .debuginfo files when cross compiling
-  _JUNK_ := $(shell \
-    echo >&2 "INFO: cross compiling for ARCH $(CROSS_COMPILE_ARCH)," \
-      "skipping .debuginfo generation.")
-  OBJCOPY=
-else
-  OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
-  ifneq ($(ALT_OBJCOPY),)
-    _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
-    # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
-    OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
-  endif
-endif
-
-ifdef LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS
-# The setting of OBJCOPY above enables the JDK build to import
-# .debuginfo files from the HotSpot build. However, adding FDS
-# support to the JDK build will occur in phases so a different
-# make variable is used to indicate that a particular library
-# supports FDS.
-
-ifeq ($(OBJCOPY),)
-  _JUNK_ := $(shell \
-    echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
-else
-  _JUNK_ := $(shell \
-    echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
-
-  # Library stripping policies for .debuginfo configs:
-  #   all_strip - strips everything from the library
-  #   min_strip - strips most stuff from the library; leaves minimum symbols
-  #   no_strip  - does not strip the library at all
-  #
-  # Oracle security policy requires "all_strip". A waiver was granted on
-  # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
-  #
-  DEF_STRIP_POLICY="min_strip"
-  ifeq ($(ALT_STRIP_POLICY),)
-    STRIP_POLICY=$(DEF_STRIP_POLICY)
-  else
-    STRIP_POLICY=$(ALT_STRIP_POLICY)
-  endif
-
-  _JUNK_ := $(shell \
-    echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
-endif
-endif
-
-#
-# Default optimization
-#
-
-ifndef OPTIMIZATION_LEVEL
-  ifeq ($(PRODUCT), java)
-    OPTIMIZATION_LEVEL = HIGHER
-  else
-    OPTIMIZATION_LEVEL = LOWER
-  endif
-endif
-ifndef FASTDEBUG_OPTIMIZATION_LEVEL
-  FASTDEBUG_OPTIMIZATION_LEVEL = LOWER
-endif
-
-CC_OPT/NONE     = 
-CC_OPT/LOWER    = -O2
-CC_OPT/HIGHER   = -O3
-CC_OPT/HIGHEST  = -O3
-
-CC_OPT          = $(CC_OPT/$(OPTIMIZATION_LEVEL))
-
-# For all platforms, do not omit the frame pointer register usage. 
-#    We need this frame pointer to make it easy to walk the stacks.
-#    This should be the default on X86, but ia64 and amd64 may not have this
-#    as the default.
-CFLAGS_REQUIRED_amd64   += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
-CFLAGS_REQUIRED_i586    += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
-CFLAGS_REQUIRED_ia64    += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
-CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9
-LDFLAGS_COMMON_sparcv9  += -m64 -mcpu=v9
-CFLAGS_REQUIRED_sparc   += -m32 -mcpu=v9
-LDFLAGS_COMMON_sparc    += -m32 -mcpu=v9
-CFLAGS_REQUIRED_arm     += -fsigned-char -D_LITTLE_ENDIAN
-CFLAGS_REQUIRED_ppc     += -fsigned-char -D_BIG_ENDIAN
-ifeq ($(ZERO_BUILD), true)
-  CFLAGS_REQUIRED       =  $(ZERO_ARCHFLAG)
-  ifeq ($(ZERO_ENDIANNESS), little)
-    CFLAGS_REQUIRED     += -D_LITTLE_ENDIAN
-  endif
-  LDFLAGS_COMMON        += $(ZERO_ARCHFLAG)
-else
-  CFLAGS_REQUIRED       =  $(CFLAGS_REQUIRED_$(ARCH))
-  LDFLAGS_COMMON        += $(LDFLAGS_COMMON_$(ARCH))
-endif
-
-# If this is a --hash-style=gnu system, use --hash-style=both
-#   The gnu .hash section won't work on some Linux systems like SuSE 10.
-_HAS_HASH_STYLE_GNU:=$(shell $(CC) -dumpspecs | $(GREP) -- '--hash-style=gnu')
-ifneq ($(_HAS_HASH_STYLE_GNU),)
-  LDFLAGS_HASH_STYLE = -Wl,--hash-style=both
-endif
-LDFLAGS_COMMON          += $(LDFLAGS_HASH_STYLE)
-
-#
-# Selection of warning messages
-#
-GCC_INHIBIT	= -Wno-unused -Wno-parentheses
-GCC_STYLE	= 
-GCC_WARNINGS	= -W -Wall $(GCC_STYLE) $(GCC_INHIBIT)
-
-#
-# Treat compiler warnings as errors, if warnings not allowed
-#
-ifeq ($(COMPILER_WARNINGS_FATAL),true)
-  GCC_WARNINGS += -Werror
-endif
-
-#
-# Misc compiler options
-#
-ifneq ($(ARCH),ppc)
-  CFLAGS_COMMON   = -fno-strict-aliasing
-endif 
-PIC_CODE_LARGE = -fPIC
-PIC_CODE_SMALL = -fpic
-GLOBAL_KPIC = $(PIC_CODE_LARGE)
-CFLAGS_COMMON   += $(GLOBAL_KPIC) $(GCC_WARNINGS)
-ifeq ($(ARCH), amd64)
- CFLAGS_COMMON += -pipe
-endif
-
-# Linux 64bit machines use Dwarf2, which can be HUGE, have fastdebug use -g1
-DEBUG_FLAG = -g
-ifeq ($(FASTDEBUG), true)
-  ifeq ($(ARCH_DATA_MODEL), 64)
-    DEBUG_FLAG = -g1
-  endif
-endif
-
-# DEBUG_BINARIES overrides everything, use full -g debug information
-ifeq ($(DEBUG_BINARIES), true)
-  DEBUG_FLAG = -g
-  CFLAGS_REQUIRED += $(DEBUG_FLAG)
-endif
-
-CFLAGS_OPT      = $(CC_OPT)
-CFLAGS_DBG      = $(DEBUG_FLAG)
-CFLAGS_COMMON += $(CFLAGS_REQUIRED)
-
-CXXFLAGS_COMMON = $(GLOBAL_KPIC) -DCC_NOEX $(GCC_WARNINGS)
-CXXFLAGS_OPT	= $(CC_OPT)
-CXXFLAGS_DBG	= $(DEBUG_FLAG)
-CXXFLAGS_COMMON += $(CFLAGS_REQUIRED)
-
-# FASTDEBUG: Optimize the code in the -g versions, gives us a faster debug java
-ifeq ($(FASTDEBUG), true)
-  CFLAGS_DBG    += $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
-  CXXFLAGS_DBG	+= $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
-endif
-
-CPP_ARCH_FLAGS = -DARCH='"$(ARCH)"'
-
-# Alpha arch does not like "alpha" defined (potential general arch cleanup issue here)
-ifneq ($(ARCH),alpha)
-  CPP_ARCH_FLAGS += -D$(ARCH)
-else
-  CPP_ARCH_FLAGS += -D_$(ARCH)_
-endif
-
-CPPFLAGS_COMMON = $(CPP_ARCH_FLAGS) -DLINUX $(VERSION_DEFINES) \
-		  -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT
-
-ifeq ($(ARCH_DATA_MODEL), 64)
-CPPFLAGS_COMMON += -D_LP64=1
-endif
-
-CPPFLAGS_OPT    = -DNDEBUG
-CPPFLAGS_DBG    = -DDEBUG
-ifneq ($(PRODUCT), java)
-  CPPFLAGS_DBG    += -DLOGGING 
-endif
-
-ifdef LIBRARY
-  # Libraries need to locate other libraries at runtime, and you can tell
-  #   a library where to look by way of the dynamic runpaths (RPATH or RUNPATH)
-  #   buried inside the .so. The $ORIGIN says to look relative to where
-  #   the library itself is and it can be followed with relative paths from
-  #   that. By default we always look in $ORIGIN, optionally we add relative
-  #   paths if the Makefile sets LD_RUNPATH_EXTRAS to those relative paths.
-  #   On Linux we add a flag -z origin, not sure if this is necessary, but 
-  #   doesn't seem to hurt.
-  #   The environment variable LD_LIBRARY_PATH will over-ride these runpaths.
-  #   Try: 'readelf -d lib*.so' to see these settings in a library.
-  #
-  Z_ORIGIN_FLAG/sparc = -Xlinker -z -Xlinker origin
-  Z_ORIGIN_FLAG/i586  = -Xlinker -z -Xlinker origin
-  Z_ORIGIN_FLAG/amd64 = -Xlinker -z -Xlinker origin 
-  Z_ORIGIN_FLAG/ia64  = -Xlinker -z -Xlinker origin
-  Z_ORIGIN_FLAG/arm   = 
-  Z_ORIGIN_FLAG/ppc   =
-  Z_ORIGIN_FLAG/zero  = -Xlinker -z -Xlinker origin
-
-  LDFLAG_Z_ORIGIN = $(Z_ORIGIN_FLAG/$(ARCH_FAMILY))
-
-  LDFLAGS_COMMON += $(LDFLAG_Z_ORIGIN) -Xlinker -rpath -Xlinker \$$ORIGIN
-  LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=$(LDFLAG_Z_ORIGIN) -Xlinker -rpath -Xlinker \$$ORIGIN/%)
-
-endif
-
-EXTRA_LIBS += -lc
-
-LDFLAGS_DEFS_OPTION  = -Xlinker -z -Xlinker defs
-#LDFLAGS_COMMON  += $(LDFLAGS_DEFS_OPTION)
-
-#
-# -L paths for finding and -ljava
-#
-LDFLAGS_OPT     = -Xlinker -O1
-LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH)
-LDFLAGS_COMMON += -Wl,-soname=$(LIB_PREFIX)$(LIBRARY).$(LIBRARY_SUFFIX)
-
-#
-# -static-libgcc is a gcc-3 flag to statically link libgcc, gcc-2.9x always
-# statically link libgcc but will print a warning with the flag. We don't 
-# want the warning, so check gcc version first.
-#
-ifeq ($(CC_MAJORVER),3)
-  OTHER_LDFLAGS  += -static-libgcc
-endif
-
-# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
-#   (See Rules.gmk) The gcc 5 compiler might have an option for this?
-AUTOMATIC_PCH_OPTION = 
-
-#
-# Post Processing of libraries/executables
-#
-ifeq ($(VARIANT), OPT)
-  ifneq ($(NO_STRIP), true)
-    ifneq ($(DEBUG_BINARIES), true)
-      # Debug 'strip -g' leaves local function Elf symbols (better stack
-      # traces)
-      POST_STRIP_PROCESS = $(STRIP) -g
-    endif
-  endif
-endif
-
-#
-# Use: ld $(LD_MAPFILE_FLAG) mapfile *.o
-#
-LD_MAPFILE_FLAG = -Xlinker --version-script -Xlinker
-
-#
-# Support for Quantify.
-#
-ifdef QUANTIFY
-QUANTIFY_CMD = quantify
-QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes
-LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS)
-endif
-
-#
-# Path and option to link against the VM, if you have to.  Note that
-# there are libraries that link against only -ljava, but they do get
-# -L to the -ljvm, this is because -ljava depends on -ljvm, whereas
-# the library itself should not.
-#
-VM_NAME         = server
-# First try to link against server, if that does not exist link against client.
-JVMLIB          = -L$(LIBDIR)/$(LIBARCH)/server -L$(LIBDIR)/$(LIBARCH)/client -ljvm
-JAVALIB         = -ljava $(JVMLIB)
-
-#
-# We want to privatize JVM symbols on Solaris. This is so the user can
-# write a function called FindClass and this should not override the 
-# FindClass that is inside the JVM. At this point in time we are not
-# concerned with other JNI libraries because we hope that there will
-# not be as many clashes there.
-#
-PRIVATIZE_JVM_SYMBOLS = false
-
-USE_PTHREADS = true
-override ALT_CODESET_KEY         = _NL_CTYPE_CODESET_NAME
-override AWT_RUNPATH             =
-override HAVE_ALTZONE            = false
-override HAVE_FILIOH             = false
-override HAVE_GETHRTIME          = false
-override HAVE_GETHRVTIME         = false
-override HAVE_SIGIGNORE          = true
-override LEX_LIBRARY             = -lfl
-ifeq ($(STATIC_CXX),true)
-override LIBCXX                  = -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic
-else
-override LIBCXX                  = -lstdc++
-endif
-override LIBPOSIX4               =
-override LIBSOCKET               =
-override LIBNSL                  =
-override LIBSCF                  =
-override LIBTHREAD               =
-override LIBDL                   = -ldl
-override MOOT_PRIORITIES         = true
-override NO_INTERRUPTIBLE_IO     = true
-ifeq ($(ARCH), amd64)
-override OPENWIN_LIB             = $(OPENWIN_HOME)/lib64
-else
-override OPENWIN_LIB             = $(OPENWIN_HOME)/lib
-endif
-override OTHER_M4FLAGS           = -D__GLIBC__ -DGNU_ASSEMBLER
-override SUN_CMM_SUBDIR          =
-override THREADS_FLAG            = native
-override USE_GNU_M4              = true
-override USING_GNU_TAR           = true
-override WRITE_LIBVERSION        = false
-
-# USE_EXECNAME forces the launcher to look up argv[0] on $PATH, and put the
-# resulting resolved absolute name of the executable in the environment
-# variable EXECNAME.  That executable name is then used that to locate the
-# installation area.
-override USE_EXECNAME            = true
-
-# If your platform has DPS, it will have Type1 fonts too, in which case
-# it is best to enable DPS support until such time as 2D's rasteriser
-# can fully handle Type1 fonts in all cases. Default is "yes".
-# HAVE_DPS should only be "no" if the platform has no DPS headers or libs
-# DPS (Displayable PostScript) is available on Solaris machines
-HAVE_DPS = no
-
-#
-# Japanese manpages
-#
-JA_SOURCE_ENCODING = eucJP
-JA_TARGET_ENCODINGS = UTF-8
-
-# Settings for the JDI - Serviceability Agent binding.
-HOTSPOT_SALIB_PATH   = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH)
-SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX)
-SA_DEBUGINFO_NAME = $(LIB_PREFIX)saproc.debuginfo
-
-# The JDI - Serviceability Agent binding is not currently supported
-# on Linux-ia64.
-ifeq ($(ARCH), ia64)
-  INCLUDE_SA = false
-else
-  INCLUDE_SA = true
-endif
-
-ifdef CROSS_COMPILE_ARCH
-  # X11 headers are not under /usr/include
-  OTHER_CFLAGS += -I$(OPENWIN_HOME)/include
-  OTHER_CXXFLAGS += -I$(OPENWIN_HOME)/include
-  OTHER_CPPFLAGS += -I$(OPENWIN_HOME)/include
-endif
--- a/jdk/makefiles/common/Defs-macosx.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,402 +0,0 @@
-#
-# Copyright (c) 1999, 2011, 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.
-#
-
-#
-# Makefile to specify compiler flags for programs and libraries
-# targeted to MACOSX.  Should not contain any rules.
-#
-# WARNING: This file is shared with other workspaces. 
-#          So when it includes other files, it must use JDK_TOPDIR.
-#
-
-# Warning: the following variables are overriden by Defs.gmk. Set
-# values will be silently ignored:
-#   CFLAGS        (set $(OTHER_CFLAGS) instead)
-#   CPPFLAGS      (set $(OTHER_CPPFLAGS) instead)
-#   CXXFLAGS      (set $(OTHER_CXXFLAGS) instead)
-#   LDFLAGS       (set $(OTHER_LDFAGS) instead)
-#   LDLIBS        (set $(EXTRA_LIBS) instead)
-#   LDLIBS_COMMON (set $(EXTRA_LIBS) instead)
-
-# Get shared JDK settings
-include $(JDK_MAKE_SHARED_DIR)/Defs.gmk
-
-# Part of INCREMENTAL_BUILD mechanism.
-#   Compiler emits things like:  path/file.o: file.h
-#   We want something like: relative_path/file.o relative_path/file.d: file.h
-CC_DEPEND	 = -MM
-CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g'
-
-ifndef PLATFORM_SRC
-  PLATFORM_SRC = $(BUILDDIR)/../src/solaris
-endif # PLATFORM_SRC
-
-PLATFORM_SRC_MACOS = $(BUILDDIR)/../src/macosx
-
-# BSD build pulls its platform sources from the solaris tree.
-JAVA_SRCDIR_LIST = src/$(PLATFORM) src/solaris src/share
-NATIVE_SRCDIR_LIST = src/$(PLATFORM) src/solaris src/share
-
-# Platform specific closed sources
-ifndef OPENJDK
-  ifndef CLOSED_PLATFORM_SRC
-    CLOSED_PLATFORM_SRC = $(BUILDDIR)/../src/closed/solaris
-  endif
-endif
-
-# platform specific include files
-PLATFORM_INCLUDE_NAME = $(OS_NAME)
-PLATFORM_INCLUDE      = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
-
-# suffix used for make dependencies files.
-DEPEND_SUFFIX = d
-# The suffix applied to the library name for FDLIBM
-FDDLIBM_SUFFIX = a
-# The suffix applied to scripts (.bat for windows, nothing for unix)
-SCRIPT_SUFFIX =
-# CC compiler object code output directive flag value
-CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
-CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
-
-#
-# Default optimization
-#
-
-ifndef OPTIMIZATION_LEVEL
-  ifeq ($(PRODUCT), java)
-    OPTIMIZATION_LEVEL = HIGHER
-  else
-    OPTIMIZATION_LEVEL = LOWER
-  endif
-endif
-ifndef FASTDEBUG_OPTIMIZATION_LEVEL
-  FASTDEBUG_OPTIMIZATION_LEVEL = LOWER
-endif
-
-# For macosx use -Os by default, unless -O3 can be proved to be worth the cost, as per policy
-# <http://wikis.sun.com/display/OpenJDK/Mac+OS+X+Port+Compilers>
-CC_OPT/NONE     = 
-CC_OPT/LOWER    = -Os
-CC_OPT/HIGHER   = -Os
-CC_OPT/HIGHEST  = -Os
-
-CC_OPT          = $(CC_OPT/$(OPTIMIZATION_LEVEL))
-
-# For all platforms, do not omit the frame pointer register usage. 
-#    We need this frame pointer to make it easy to walk the stacks.
-#    This should be the default on X86, but ia64, and x86_64
-#    may not have this as the default.
-CFLAGS_REQUIRED_x86_64  += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
-LDFLAGS_COMMON_x86_64   += -m64
-CFLAGS_REQUIRED_i586    += -m32 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
-LDFLAGS_COMMON_i586     += -m32
-CFLAGS_REQUIRED_ia64    += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
-CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9
-LDFLAGS_COMMON_sparcv9  += -m64 -mcpu=v9
-CFLAGS_REQUIRED_sparc   += -m32 -mcpu=v9
-LDFLAGS_COMMON_sparc    += -m32 -mcpu=v9
-CFLAGS_REQUIRED_arm     += -fsigned-char -D_LITTLE_ENDIAN
-CFLAGS_REQUIRED_ppc     += -fsigned-char -D_BIG_ENDIAN
-ifeq ($(ZERO_BUILD), true)
-  CFLAGS_REQUIRED       =  $(ZERO_ARCHFLAG)
-  ifeq ($(ZERO_ENDIANNESS), little)
-    CFLAGS_REQUIRED     += -D_LITTLE_ENDIAN
-  endif
-  LDFLAGS_COMMON        += $(ZERO_ARCHFLAG)
-else ifeq ($(ARCH), universal)
-  CFLAGS_REQUIRED       += -arch i386 -arch x86_64 -D_LITTLE_ENDIAN
-  LDFLAGS_COMMON        += -arch i386 -arch x86_64
-else
-  CFLAGS_REQUIRED       =  $(CFLAGS_REQUIRED_$(ARCH))
-  LDFLAGS_COMMON        += $(LDFLAGS_COMMON_$(ARCH))
-endif
-# 16-byte stack re-alignment on 32-bit Darwin
-CFLAGS_REQUIRED_i586 += -mstackrealign
-
-OTHER_CFLAGS = \
-         -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-	     -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks
-
-#
-# Selection of warning messages
-#
-GCC_INHIBIT	= -Wno-unused -Wno-parentheses
-GCC_STYLE	= 
-GCC_WARNINGS	= -W -Wall $(GCC_STYLE) $(GCC_INHIBIT)
-
-#
-# Treat compiler warnings as errors, if warnings not allowed
-#
-ifeq ($(COMPILER_WARNINGS_FATAL),true)
-  GCC_WARNINGS += -Werror
-endif
-
-#
-# Misc compiler options
-#
-ifneq ($(ARCH),ppc)
-  CFLAGS_COMMON   = -fno-strict-aliasing
-endif 
-PIC_CODE_LARGE = -fPIC
-PIC_CODE_SMALL = -fpic
-GLOBAL_KPIC = $(PIC_CODE_LARGE)
-CFLAGS_COMMON   += $(GLOBAL_KPIC) $(GCC_WARNINGS)
-ifeq ($(ARCH), x86_64)
- CFLAGS_COMMON += -pipe
-endif
-
-# BSD 64bit machines use Dwarf2, which can be HUGE, have fastdebug use -g1
-DEBUG_FLAG = -g
-ifeq ($(FASTDEBUG), true)
-  ifeq ($(ARCH_DATA_MODEL), 64)
-    DEBUG_FLAG = -g1
-  endif
-endif
-
-# DEBUG_BINARIES overrides everything, use full -g debug information
-ifeq ($(DEBUG_BINARIES), true)
-  DEBUG_FLAG = -g
-  CFLAGS_REQUIRED += $(DEBUG_FLAG)
-endif
-
-CFLAGS_OPT      = $(CC_OPT)
-CFLAGS_DBG      = $(DEBUG_FLAG)
-CFLAGS_COMMON += $(CFLAGS_REQUIRED)
-
-CXXFLAGS_COMMON = $(GLOBAL_KPIC) -DCC_NOEX $(GCC_WARNINGS)
-CXXFLAGS_OPT	= $(CC_OPT)
-CXXFLAGS_DBG	= $(DEBUG_FLAG)
-CXXFLAGS_COMMON += $(CFLAGS_REQUIRED)
-
-# FASTDEBUG: Optimize the code in the -g versions, gives us a faster debug java
-ifeq ($(FASTDEBUG), true)
-  CFLAGS_DBG    += $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
-  CXXFLAGS_DBG	+= $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
-endif
-
-CPP_ARCH_FLAGS = -DARCH='"$(ARCH)"'
-
-# Alpha arch does not like "alpha" defined (potential general arch cleanup issue here)
-ifneq ($(ARCH),alpha)
-  CPP_ARCH_FLAGS += -D$(ARCH)
-else
-  CPP_ARCH_FLAGS += -D_$(ARCH)_
-endif
-CPPFLAGS_COMMON = $(CPP_ARCH_FLAGS) -D_ALLBSD_SOURCE $(VERSION_DEFINES) \
-		  -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT
-
-CPPFLAGS_COMMON += -DMACOSX
-
-ifeq ($(ARCH_DATA_MODEL), 64)
-CPPFLAGS_COMMON += -D_LP64=1
-endif
-
-CPPFLAGS_OPT    = -DNDEBUG
-CPPFLAGS_DBG    = -DDEBUG
-ifneq ($(PRODUCT), java)
-  CPPFLAGS_DBG    += -DLOGGING 
-endif
-
-# Libraries need to locate other libraries at runtime, and you can tell
-#   a library where to look by way of the dynamic runpaths (RPATH or RUNPATH)
-#   buried inside the .{so,dylib}. The {$ORIGIN,@loader_path/} says to look
-#   relative to where the library itself is and it can be followed
-#   with relative paths from that. By default we always look in
-#   {$ORIGIN,@loader_path/}, optionally we add relative paths if the Makefile
-#   sets LD_RUNPATH_EXTRAS to those relative paths.
-#   Except on MacOS X we add a flag -z origin, not sure if this is necessary,
-#   but doesn't seem to hurt.
-#   The environment variable LD_LIBRARY_PATH will over-ride these runpaths.
-#   See 'man {dyld,rtld}' for more information.
-#   Try: 'readelf -d lib*.so' to see these settings in a library.
-#
-LDFLAGS_COMMON += -Xlinker -rpath -Xlinker @loader_path/.
-LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-Xlinker -rpath -Xlinker @loader_path/%)
-LDFLAGS_COMMON += -Xlinker -install_name -Xlinker @rpath/$(@F)
-
-#
-# -L paths for finding and -ljava
-#
-LDFLAGS_COMMON += -L$(LIBDIR)
-
-#
-# -static-libgcc is a gcc-3 flag to statically link libgcc, gcc-2.9x always
-# statically link libgcc but will print a warning with the flag. We don't 
-# want the warning, so check gcc version first.
-#
-ifeq ($(CC_MAJORVER),3)
-  OTHER_LDFLAGS  += -static-libgcc
-endif
-
-# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
-#   (See Rules.gmk) The gcc 5 compiler might have an option for this?
-AUTOMATIC_PCH_OPTION = 
-
-#
-# Post Processing of libraries/executables
-#
-ifeq ($(VARIANT), OPT)
-  ifneq ($(NO_STRIP), true)
-    ifneq ($(DEBUG_BINARIES), true)
-      # Debug 'strip -S' leaves local function Elf symbols (better stack
-      # traces)
-      POST_STRIP_PROCESS = $(STRIP) -S
-    endif
-  endif
-endif
-
-#
-# Use: ld $(LD_MAPFILE_FLAG) mapfile *.o
-#
-LD_MAPFILE_FLAG = -Xlinker --version-script -Xlinker
-
-#
-# Support for Quantify.
-#
-ifdef QUANTIFY
-QUANTIFY_CMD = quantify
-QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes
-LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS)
-endif
-
-# Darwin does not support linker map files.
-LDNOMAP=true
-
-#
-# Path and option to link against the VM, if you have to.  Note that
-# there are libraries that link against only -ljava, but they do get
-# -L to the -ljvm, this is because -ljava depends on -ljvm, whereas
-# the library itself should not.
-#
-VM_NAME         = server
-JVMLIB          = -L$(LIBDIR)/server -L$(LIBDIR)/client -ljvm
-JAVALIB         = -ljava $(JVMLIB)
-
-#
-# We want to privatize JVM symbols on Solaris. This is so the user can
-# write a function called FindClass and this should not override the 
-# FindClass that is inside the JVM. At this point in time we are not
-# concerned with other JNI libraries because we hope that there will
-# not be as many clashes there.
-#
-PRIVATIZE_JVM_SYMBOLS = false
-
-USE_PTHREADS = true
-override ALT_CODESET_KEY         = _NL_CTYPE_CODESET_NAME
-override AWT_RUNPATH             =
-override HAVE_ALTZONE            = false
-override HAVE_FILIOH             = false
-override HAVE_GETHRTIME          = false
-override HAVE_GETHRVTIME         = false
-override HAVE_SIGIGNORE          = true
-override LEX_LIBRARY             = -lfl
-ifeq ($(STATIC_CXX),true)
-override LIBCXX                  = -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic
-else
-override LIBCXX                  = -lstdc++
-endif
-override LIBPOSIX4               =
-override LIBSOCKET               =
-override LIBNSL                  =
-override LIBTHREAD               =
-override LIBDL                   =
-override MOOT_PRIORITIES         = true
-override NO_INTERRUPTIBLE_IO     = true
-override OPENWIN_HOME            = $(X11_PATH)
-override OPENWIN_LIB             = $(OPENWIN_HOME)/lib
-override OTHER_M4FLAGS           = -D__GLIBC__ -DGNU_ASSEMBLER
-override SUN_CMM_SUBDIR          =
-override THREADS_FLAG            = native
-override USE_GNU_M4              = true
-override USING_GNU_TAR           = true
-override WRITE_LIBVERSION        = false
-
-ifdef ALT_X11_PATH
-  X11_PATH = $(ALT_X11_PATH)
-else
-  X11_PATH = /usr/X11R6
-endif
-
-ifdef ALT_PACKAGE_PATH
-  PACKAGE_PATH = $(ALT_PACKAGE_PATH)
-else
-  PACKAGE_PATH = /opt/local
-endif
-
-# ALSA
-ifdef ALT_ALSA_LIB_PATH
-  ALSA_LIB_PATH = $(ALT_ALSA_LIB_PATH)
-else
-  ALSA_LIB_PATH = $(PACKAGE_PATH)/lib
-endif
-
-ifdef ALT_ALSA_HEADERS_PATH
-  ALSA_HEADERS_PATH = $(ALT_ALSA_HEADERS_PATH)
-else
-  ALSA_HEADERS_PATH = $(PACKAGE_PATH)/include
-endif
-
-# USE_EXECNAME forces the launcher to look up argv[0] on $PATH, and put the
-# resulting resolved absolute name of the executable in the environment
-# variable EXECNAME.  That executable name is then used that to locate the
-# installation area.
-override USE_EXECNAME            = true
-
-# If your platform has DPS, it will have Type1 fonts too, in which case
-# it is best to enable DPS support until such time as 2D's rasteriser
-# can fully handle Type1 fonts in all cases. Default is "yes".
-# HAVE_DPS should only be "no" if the platform has no DPS headers or libs
-# DPS (Displayable PostScript) is available on Solaris machines
-HAVE_DPS = no
-
-SYSTEM_ZLIB = true
-
-#
-# Japanese manpages
-#
-JA_SOURCE_ENCODING = eucJP
-JA_TARGET_ENCODINGS = UTF-8
-
-# Settings for the JDI - Serviceability Agent binding.
-
-HOTSPOT_SALIB_PATH = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH)
-SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX)
-
-# The JDI - Serviceability Agent binding is not currently supported
-# on ia64.
-ifeq ($(ARCH), ia64)
-  INCLUDE_SA = false
-else
-  INCLUDE_SA = true
-endif
-
-ifdef CROSS_COMPILE_ARCH
-  # X11 headers are not under /usr/include
-  OTHER_CFLAGS += -I$(OPENWIN_HOME)/include
-  OTHER_CXXFLAGS += -I$(OPENWIN_HOME)/include
-  OTHER_CPPFLAGS += -I$(OPENWIN_HOME)/include
-endif
-
-LIB_LOCATION ?= $(LIBDIR)
--- a/jdk/makefiles/common/Defs-solaris.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,757 +0,0 @@
-#
-# Copyright (c) 1995, 2011, 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.
-#
-
-#
-# Makefile to specify compiler flags for programs and libraries
-# targeted to Solaris.  Should not contain any rules.
-#
-# WARNING: This file is shared with other workspaces. 
-#          So when it includes other files, it must use JDK_TOPDIR.
-#
-
-# Warning: the following variables are overridden by Defs.gmk. Set
-# values will be silently ignored:
-#   CFLAGS        (set $(OTHER_CFLAGS) instead)
-#   CPPFLAGS      (set $(OTHER_CPPFLAGS) instead)
-#   CXXFLAGS      (set $(OTHER_CXXFLAGS) instead)
-#   LDFLAGS       (set $(OTHER_LDFAGS) instead)
-#   LDLIBS        (set $(EXTRA_LIBS) instead)
-#   LDLIBS_COMMON (set $(EXTRA_LIBS) instead)
-#   LINTFLAGS     (set $(OTHER_LINTFLAGS) instead)
-#
-# Note: CPPFLAGS are used in C and C++ compiles.
-#
-
-# Get shared JDK settings
-include $(JDK_MAKE_SHARED_DIR)/Defs.gmk
-
-ifndef PLATFORM_SRC
-PLATFORM_SRC = $(BUILDDIR)/../src/solaris
-endif # PLATFORM_SRC
-
-# Platform specific closed sources
-ifndef OPENJDK
-  ifndef CLOSED_PLATFORM_SRC
-    CLOSED_PLATFORM_SRC = $(BUILDDIR)/../src/closed/solaris
-  endif
-endif
-
-# platform specific include files
-PLATFORM_INCLUDE_NAME = $(PLATFORM)
-PLATFORM_INCLUDE      = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
-
-# suffix used for make dependencies files
-DEPEND_SUFFIX = d
-# suffix used for lint files
-LINT_SUFFIX = ln
-# The suffix applied to the library name for FDLIBM
-FDDLIBM_SUFFIX = a
-# The suffix applied to scripts (.bat for windows, nothing for unix)
-SCRIPT_SUFFIX =
-# CC compiler object code output directive flag value
-CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
-
-ifdef ENABLE_FULL_DEBUG_SYMBOLS
-# Only check for Full Debug Symbols support on Solaris if it is
-# specifically enabled. Hopefully, it can be enabled by default
-# once the .debuginfo size issues are worked out.
-
-# Default OBJCOPY comes from the SUNWbinutils package:
-DEF_OBJCOPY=/usr/sfw/bin/gobjcopy
-ifeq ($(PLATFORM)-$(LIBARCH), solaris-amd64)
-  # On Solaris AMD64/X64, gobjcopy is not happy and fails:
-  #
-  # usr/sfw/bin/gobjcopy --add-gnu-debuglink=<lib>.debuginfo <lib>.so
-  # BFD: stKPaiop: Not enough room for program headers, try linking with -N
-  # /usr/sfw/bin/gobjcopy: stKPaiop: Bad value
-  # BFD: stKPaiop: Not enough room for program headers, try linking with -N
-  # /usr/sfw/bin/gobjcopy: libsaproc.debuginfo: Bad value
-  # BFD: stKPaiop: Not enough room for program headers, try linking with -N
-  # /usr/sfw/bin/gobjcopy: stKPaiop: Bad value
-  _JUNK_ := $(shell \
-    echo >&2 "INFO: $(DEF_OBJCOPY) is not working on Solaris AMD64/X64")
-  OBJCOPY=
-else
-  OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
-  ifneq ($(ALT_OBJCOPY),)
-    _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
-    # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
-    OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
-  endif
-endif
-
-ifdef LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS
-# The setting of OBJCOPY above enables the JDK build to import
-# .debuginfo files from the HotSpot build. However, adding FDS
-# support to the JDK build will occur in phases so a different
-# make variable is used to indicate that a particular library
-# supports FDS.
-
-ifeq ($(OBJCOPY),)
-  _JUNK_ := $(shell \
-    echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
-else
-  _JUNK_ := $(shell \
-    echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
-
-  # Library stripping policies for .debuginfo configs:
-  #   all_strip - strips everything from the library
-  #   min_strip - strips most stuff from the library; leaves minimum symbols
-  #   no_strip  - does not strip the library at all
-  #
-  # Oracle security policy requires "all_strip". A waiver was granted on
-  # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
-  #
-  DEF_STRIP_POLICY="min_strip"
-  ifeq ($(ALT_STRIP_POLICY),)
-    STRIP_POLICY=$(DEF_STRIP_POLICY)
-  else
-    STRIP_POLICY=$(ALT_STRIP_POLICY)
-  endif
-  _JUNK_ := $(shell \
-    echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
-endif
-endif
-endif
-
-#
-# Java default optimization (-x04/-O2) etc.  Applies to the VM.
-#
-ifndef OPTIMIZATION_LEVEL
-  ifeq ($(PRODUCT), java)
-    OPTIMIZATION_LEVEL = HIGHER
-  else
-    OPTIMIZATION_LEVEL = LOWER
-  endif
-endif
-ifndef FASTDEBUG_OPTIMIZATION_LEVEL
-  FASTDEBUG_OPTIMIZATION_LEVEL = LOWER
-endif
-
-#
-# If -Xa is in CFLAGS_COMMON it will end up ahead of $(CC_OPT) for the
-# optimized build, and that ordering of the flags completely freaks
-# out cc.  Hence, -Xa is instead in each CFLAGS variant.
-#
-# The more unusual options to the Sun C compiler:
-#	-v		Stricter type checking, more error checking
-#			(To turn ALL warnings into fatals, use -errwarn=%all)
-#	-xstrconst	Place string literals and constants in read-only area
-#			(means you can't write on your string literals)
-#	-xs		Force debug information (stabs) into the .so or a.out
-#			(makes the library/executable debuggable without the
-#			.o files needing to be around, but at a space cost)
-#	-g & -O		If you add the -g option to the optimized compiles
-#			you will get better stack retraces, the code is
-#			still optimized. This includes a space cost too.
-#       -xc99=%none     Do NOT allow for c99 extensions to be used.
-#                       e.g. declarations must precede statements
-#       -xCC            Allow the C++ style of comments in C: //
-#                       Required with many of the source files.
-#       -mt             Assume multi-threaded (important)
-#
-# The more unusual options to the Sun C compiler:
-#       +w              Print more warnings
-#       +w2             Maximum warnings
-#
-
-#
-# Debug flag for C and C++ compiler
-#
-CFLAGS_DEBUG_OPTION    = -g $(CC_OPT/NONE)
-CXXFLAGS_DEBUG_OPTION  = -g $(CXX_OPT/NONE)
-
-# Turn off -g if we are doing tcov build
-ifdef TCOV_BUILD
-  CFLAGS_DEBUG_OPTION=
-  CXXFLAGS_DEBUG_OPTION=
-endif
-
-# FASTDEBUG: Optimize the -g builds, gives us a faster debug java
-#        If true adds -O to the debug compiles. This allows for any assert
-#        tests to remain and debug checking. The resulting code is faster
-#        but less debuggable.  Stack traces are still valid, although only
-#        approximate line numbers are given. Printing of local variables
-#        during a debugging session is not possible, but stepping and
-#        printing of global or static variables should be possible.
-#        Performance/size of files should be about the same, maybe smaller.
-#
-ifeq ($(FASTDEBUG), true)
-  CFLAGS_DEBUG_OPTION    = -g  $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
-  CXXFLAGS_DEBUG_OPTION  = -g0 $(CXX_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
-endif
-
-CFLAGS_COMMON   = -L$(OBJDIR)
-
-# Do not allow C99 language features like declarations in code etc.
-CFLAGS_COMMON  += -xc99=%none
-
-# Allow C++ comments in C code
-CFLAGS_COMMON  += -xCC
-
-# Show error message tags on errors
-CFLAGS_COMMON   += -errshort=tags
-CXXFLAGS_COMMON += -errtags=yes
-
-# Optimization flags
-CFLAGS_OPT      = $(CC_OPT)
-
-# Debug version flags
-CFLAGS_DBG      = $(CFLAGS_DEBUG_OPTION)
-
-# Required C compiler flags
-CFLAGS_COMMON  += -Xa $(CFLAGS_REQUIRED)
-
-# Maximum warnings all the time
-CXXFLAGS_COMMON += +w
-CFLAGS_COMMON   += -v
-
-# Assume MT behavior all the time (important)
-CXXFLAGS_COMMON += -mt
-CFLAGS_COMMON   += -mt
-
-# Assume no C++ exceptions are used
-CXXFLAGS_COMMON += -features=no%except -DCC_NOEX
-
-# For C++, these options tell it to assume nothing about locating libraries
-#    either at compile time, or at runtime. Use of these options will likely
-#    require the use of -L and -R options to indicate where libraries will
-#    be found at compile time (-L) and at runtime (-R).
-#    The /usr/lib location comes for free, so no need to specify that one.
-#    Note: C is much simplier and there is no need for these options. This
-#          is mostly needed to avoid dependencies on libraries in the
-#          Compiler install area, also see LIBCXX and LIBM.
-CXXFLAGS_COMMON += -norunpath -xnolib
-
-#
-# Treat compiler warnings as errors, if requested
-#
-ifeq ($(COMPILER_WARNINGS_FATAL),true)
-  CFLAGS_COMMON += -errwarn=%all
-  CXXFLAGS_COMMON += -errwarn=%all
-endif
-
-CXXFLAGS_OPT	= $(CXX_OPT)
-CXXFLAGS_DBG	= $(CXXFLAGS_DEBUG_OPTION)
-CXXFLAGS_COMMON += $(CFLAGS_REQUIRED)
-
-# Add -xstrconst to the library compiles. This forces all string
-#  literals into the read-only data section, which prevents them from
-#  being written to and increases the runtime pages shared on the system.
-#
-ifdef LIBRARY
-  CFLAGS_COMMON +=-xstrconst
-endif
-
-# Source browser database
-#
-# COMPILE_WITH_SB    
-#        If defined adds -xsb to compiles and creates a
-#        source browsing database during compilation.
-#
-ifdef COMPILE_WITH_SB
-  ifeq ($(LIBRARY), java)
-    CFLAGS_DBG +=   -xsb
-  endif
-endif
-
-# Lint Flags:
-#	-Xa			ANSI C plus K&R, favor ANSI rules
-#	-fd			report on old style func defs
-#	-errchk=structarg	report on 64bit struct args by value
-#	-errchk=longptr64	report on 64bit to 32bit issues (ignores casts)
-#	-errchk=parentheses	report on suggested use of extra parens
-#	-v 			suppress unused args
-#	-x			suppress unused externs
-#	-u			suppress extern func/vars used/defined
-#	-errfmt=simple		use one line errors with position info
-#       $(LINT_XARCH_OPTION)    See Compiler-sun.gwk
-
-LINTFLAGS_COMMON  = -Xa
-LINTFLAGS_COMMON += -fd 
-LINTFLAGS_COMMON += -errchk=structarg,longptr64,parentheses
-LINTFLAGS_COMMON += -v
-LINTFLAGS_COMMON += -x 
-LINTFLAGS_COMMON += -u
-LINTFLAGS_COMMON += -errfmt=simple 
-LINTFLAGS_OPT   = 
-LINTFLAGS_DBG   =
-
-# The -W0,-noglobal tells the compiler to NOT generate mangled global
-#    ELF data symbols for file local static data.
-#    This can break fix&continue, but we'd rather do the same compilations
-#    for deliverable bits as we do for non-deliverable bits
-#    Tell the compilers to never generate globalized names, all the time.
-CFLAGS_COMMON += -W0,-noglobal
-
-# If we have a specific arch value to use, add it
-CFLAGS_COMMON    += $(XARCH_OPTION)
-CXXFLAGS_COMMON  += $(XARCH_OPTION)
-ASFLAGS_COMMON   += $(AS_XARCH_OPTION)
-EXTRA_LIBS       += $(XARCH_OPTION)
-LINTFLAGS_COMMON += $(LINT_XARCH_OPTION)
-
-#
-# uncomment the following to build with PERTURBALOT set
-#
-# OTHER_CFLAGS += -DPERTURBALOT
-#
-
-CPPFLAGS_COMMON = -D__solaris__  -D$(ARCH_FAMILY)
-CPPFLAGS_OPT    = -DNDEBUG
-CPPFLAGS_DBG    = -DDEBUG
-
-ifneq ($(PRODUCT), java)
-  CPPFLAGS_DBG    += -DLOGGING -DDBINFO
-endif
-
-ifeq ($(ARCH_FAMILY), i586)
-  # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
-  #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
-  #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
-  #   Note: -Dmacro         is the same as    #define macro 1
-  #         -Dmacro=	    is the same as    #define macro
-  #
-  CPPFLAGS_COMMON +=  -DcpuIntel -D_LITTLE_ENDIAN= -D$(LIBARCH)
-  # Turn off a superfluous compiler error message on Intel
-  CFLAGS_COMMON += -erroff=E_BAD_PRAGMA_PACK_VALUE
-endif
-
-# Java memory management is based on memory mapping by default, but a
-# system only assuming malloc/free can be built by adding -DUSE_MALLOC 
-
-CPPFLAGS_COMMON	+= -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS
-CPPFLAGS_OPT	+= -DTRIMMED
-
-LDFLAGS_DEFS_OPTION  = -z defs
-LDFLAGS_COMMON  += $(LDFLAGS_DEFS_OPTION)
-
-#
-# -L paths for finding and -ljava
-#
-LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH)
-LDFLAGS_OPT     =
-LDFLAGS_DBG     =
-
-#
-# We never really want the incremental linker, ever
-#    The -xildoff option tells Sun's compilers to NOT use incremental linker
-#
-LDFLAGS_COMMON  += -xildoff
-
-ifdef LIBRARY
-  # Libraries need to locate other libraries at runtime, and you can tell
-  #   a library where to look by way of the dynamic runpaths (RPATH or RUNPATH)
-  #   buried inside the .so. The $ORIGIN says to look relative to where
-  #   the library itself is and it can be followed with relative paths from
-  #   that. By default we always look in $ORIGIN, optionally we add relative
-  #   paths if the Makefile sets LD_RUNPATH_EXTRAS to those relative paths.
-  #   The environment variable LD_LIBRARY_PATH will over-ride these runpaths.
-  #   Try: 'dump -Lv lib*.so' to see these settings in a library.
-  #
-  LDFLAGS_COMMON += -R\$$ORIGIN
-  LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-R\$$ORIGIN/%)
-endif
-
-EXTRA_LIBS += -lc
-
-# Postprocessing is done on the images directories only
-#
-ifeq ($(VARIANT), OPT)
-  ifeq ($(PARTIAL_GPROF), true)
-    NO_STRIP = true
-  endif
-  ifeq ($(GPROF), true)
-    NO_STRIP = true
-  endif
-  ifneq ($(NO_STRIP), true)
-    # Debug 'strip -x' leaves local function Elf symbols (better stack traces)
-    POST_STRIP_PROCESS = $(STRIP) -x
-  endif
-endif
-POST_MCS_PROCESS=$(MCS) -d -a "JDK $(FULL_VERSION)"
-
-#
-# Sun C compiler will take -M and pass it on to ld.
-# Usage: ld $(LD_MAPFILE_FLAG) mapfile *.o
-#
-ifeq ($(CC_VERSION),gcc)
-LD_MAPFILE_FLAG = -Xlinker -M -Xlinker
-else
-LD_MAPFILE_FLAG = -M
-endif
-
-#
-# Variables globally settable from the make command line (default
-# values in brackets):
-#	GPROF (false)
-# Eg: 	% gnumake GPROF=true
-GPROF = false
-ifeq ($(GPROF), true)
-    CFLAGS_COMMON += -DGPROF -xpg
-    EXTRA_LIBS += -xpg
-endif
-
-# PARTIAL_GPROF is to be used ONLY during compilation - it should not
-# appear during linking of libraries or programs.  It also should
-# prevent linking with -z defs to allow a symbol to remain undefined.
-#
-PARTIAL_GPROF = false
-ifeq ($(PARTIAL_GPROF), true)
-  CFLAGS_GPROF += -xpg
-  LDFLAGS_DEFS_OPTION  = -z nodefs
-endif
-
-#
-# For a TCOV build we add in the TCOV_OPTION
-#
-ifdef TCOV_BUILD
-  TCOV_OPTION		= -xprofile=tcov
-  LDFLAGS_COMMON 	+= $(TCOV_OPTION) -Kpic
-  CFLAGS_COMMON  	+= $(TCOV_OPTION)
-  CXXFLAGS_COMMON 	+= $(TCOV_OPTION)
-  EXTRA_LIBS 	+= $(TCOV_OPTION)
-  LDNOMAP=true
-endif
-
-#
-# Solaris only uses native threads. 
-#
-THREADS_FLAG=	native
-THREADS_DIR=	threads
-
-#
-# Support for Quantify.
-#
-ifdef QUANTIFY
-  QUANTIFY_CMD = quantify
-  QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes
-  LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS)
-  ifdef LIBRARY
-    CFLAGS_COMMON += -K PIC
-  endif
-endif
-
-#
-# Support for Purify.
-#
-ifdef PURIFY
-  PURIFY_CMD = /net/suntools.eng/export/tools/sparc/bin/purify
-  PURIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes
-  LINK_PRE_CMD = $(PURIFY_CMD) $(PURIFY_OPTIONS)
-  ifdef LIBRARY
-    CFLAGS_COMMON += -K PIC
-  endif
-endif
-
-#
-# Different "levels" of optimization.
-#
-ifeq ($(CC_VERSION),gcc)
-  
-  CC_OPT/NONE     =
-  CC_OPT/LOWER    = -O2
-  CC_OPT/HIGHER   = -O3
-  CC_OPT/HIGHEST  = -O3
-
-  CXX_OPT/NONE    =
-  CXX_OPT/LOWER   = -O2
-  CXX_OPT/HIGHER  = -O3
-  CXX_OPT/HIGHEST = -O3
-
-  CFLAGS_REQUIRED_i586  += -fno-omit-frame-pointer
-  CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer
-  
-  # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
-  #   (See Rules.gmk) May need to wait for gcc 5?
-  AUTOMATIC_PCH_OPTION = 
-
-else
-  
-  # Highest could be -xO5, but indications are that -xO5 should be reserved
-  #    for a per-file use, on sources with known performance impacts.
-  OPT_LEVEL/LOWER    = 2
-  OPT_LEVEL/HIGHER   = 4
-  OPT_LEVEL/HIGHEST  = 4
-  
-  CC_OPT/NONE     =
-  CC_OPT/LOWER    = $(OPT_LEVEL/LOWER:%=-xO%)
-  CC_OPT/HIGHER   = $(OPT_LEVEL/HIGHER:%=-xO%)
-  CC_OPT/HIGHEST  = $(OPT_LEVEL/HIGHEST:%=-xO%)
-  
-  CXX_OPT/NONE    =
-  CXX_OPT/LOWER   = $(OPT_LEVEL/LOWER:%=-xO%)
-  CXX_OPT/HIGHER  = $(OPT_LEVEL/HIGHER:%=-xO%)
-  CXX_OPT/HIGHEST = $(OPT_LEVEL/HIGHEST:%=-xO%)
-    
-  # We need stack frames at all times
-  USE_XKEEPFRAME_OPTION = false
-  ifeq ($(USE_XKEEPFRAME_OPTION),true)
-    
-    # Unknown spelling on this option at this time (Maybe in SS13?)
-    CC_XKEEPFRAME_OPTIONS  = -xkeepframe
-    CXX_XKEEPFRAME_OPTIONS = -xkeepframe
-  
-  else
-  
-    # On X86, make sure tail call optimization is off
-    #    The z and y are the tail call optimizations.
-    ifeq ($(ARCH_FAMILY), i586)
-      CC_NEWER_THAN_58 := \
-        $(shell $(EXPR) $(CC_MAJORVER) \> 5 \| \
-	    \( $(CC_MAJORVER) = 5 \& $(CC_MINORVER) \> 8 \) )
-      ifeq ($(CC_NEWER_THAN_58),1)
-        #    Somehow, tail call optimization is creeping in.
-        #    Make sure it is off.
-        # WARNING: These may cause compiler warnings about duplicate -O options
-        CC_XKEEPFRAME_OPTIONS  += -Wu,-O$(OPT_LEVEL/$(OPTIMIZATION_LEVEL))~yz
-        CXX_XKEEPFRAME_OPTIONS += -Qoption ube -O$(OPT_LEVEL/$(OPTIMIZATION_LEVEL))~yz
-      endif
-    endif
-  
-    #  On i586 we need to tell the code generator to ALWAYS use a
-    #   frame pointer.
-    ifeq ($(ARCH_FAMILY), i586)
-      # Note that in 5.7, this is done with -xregs=no%frameptr
-      ifeq ($(CC_VER), 5.5)
-        # It's not exactly clear when this optimization kicks in, the
-        #   current assumption is -xO4 or greater and for C++ with
-        #   the -features=no%except option and -xO4 and greater.
-        #   Bottom line is, we ALWAYS want a frame pointer!
-        CC_XKEEPFRAME_OPTIONS  += -Wu,-Z~B
-        CXX_XKEEPFRAME_OPTIONS += -Qoption ube -Z~B
-      endif
-
-      CC_NEWER_THAN_56 := \
-        $(shell $(EXPR) $(CC_MAJORVER) \> 5 \| \
-	    \( $(CC_MAJORVER) = 5 \& $(CC_MINORVER) \> 6 \) )
-      ifeq ($(CC_NEWER_THAN_56),1)
-        # Do NOT use frame pointer register as a general purpose opt register
-        CC_OPT/NONE            += -xregs=no%frameptr
-        CXX_OPT/NONE           += -xregs=no%frameptr
-        CC_XKEEPFRAME_OPTIONS  += -xregs=no%frameptr
-        CXX_XKEEPFRAME_OPTIONS += -xregs=no%frameptr
-      endif
-    endif
-  
-    #  Optimizer for sparc needs to be told not to do certain things
-    #   related to frames or save instructions.
-    ifeq ($(ARCH_FAMILY), sparc)
-      #  Do not use save instructions instead of add instructions
-      #  This was an optimization starting in SC5.0 that made it hard for us to
-      #    find the "save" instruction (which got turned into an "add")
-      CC_XKEEPFRAME_OPTIONS  += -Wc,-Qrm-s
-      CXX_XKEEPFRAME_OPTIONS += -Qoption cg -Qrm-s
-      # Don't allow tail call code optimization. Started in SC5.0.
-      #    We don't like code of this form:
-      #	save
-      #	<code>
-      #	call foo
-      #	   restore
-      #   because we can't tell if the method will have a stack frame
-      #   and register windows or not.
-      CC_XKEEPFRAME_OPTIONS  += -Wc,-Qiselect-T0
-      CXX_XKEEPFRAME_OPTIONS += -Qoption cg -Qiselect-T0
-    endif
-  
-  endif
-
-  # Extra options used with HIGHEST
-  #
-  # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
-  #          done with care, there are some assumptions below that need to
-  #          be understood about the use of pointers, and IEEE behavior.
-  #
-  # Use non-standard floating point mode (not IEEE 754)
-  CC_HIGHEST_EXTRAS += -fns
-  # Do some simplification of floating point arithmetic (not IEEE 754)
-  CC_HIGHEST_EXTRAS += -fsimple
-  # Use single precision floating point with 'float'
-  CC_HIGHEST_EXTRAS += -fsingle
-  # Assume memory references via basic pointer types do not alias
-  #   (Source with excessing pointer casting and data access with mixed 
-  #    pointer types are not recommended)
-  CC_HIGHEST_EXTRAS += -xalias_level=basic
-  # Use intrinsic or inline versions for math/std functions
-  #   (If you expect perfect errno behavior, do not use this)
-  CC_HIGHEST_EXTRAS += -xbuiltin=%all
-  # Loop data dependency optimizations (need -xO3 or higher)
-  CC_HIGHEST_EXTRAS += -xdepend
-  # Pointer parameters to functions do not overlap
-  #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
-  #    If you pass in multiple pointers to the same data, do not use this)
-  CC_HIGHEST_EXTRAS += -xrestrict
-  # Inline some library routines
-  #   (If you expect perfect errno behavior, do not use this)
-  CC_HIGHEST_EXTRAS += -xlibmil
-  # Use optimized math routines
-  #   (If you expect perfect errno behavior, do not use this)
-  #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
-  #  CC_HIGHEST_EXTRAS += -xlibmopt
-  ifeq ($(ARCH_FAMILY), sparc)
-    # Assume at most 8byte alignment, raise SIGBUS on error
-    ### Presents an ABI issue with customer JNI libs?
-    ####CC_HIGHEST_EXTRAS  += -xmemalign=8s
-    # Automatic prefetch instructions, explicit prefetch macros
-    CC_HIGHEST_EXTRAS += -xprefetch=auto,explicit
-    # Pick ultra as the chip to optimize to
-    CC_HIGHEST_EXTRAS += -xchip=ultra
-  endif
-  ifeq ($(ARCH), i586)
-    # Pick pentium as the chip to optimize to
-    CC_HIGHEST_EXTRAS += -xchip=pentium
-  endif
-  ifdef LIBRARY
-    # The Solaris CBE (Common Build Environment) requires that the use
-    # of appl registers be disabled when compiling a public library (or
-    # a library that's loaded by a public library) on sparc.
-    CFLAGS_REQUIRED_sparc    += -xregs=no%appl
-    CFLAGS_REQUIRED_sparcv9  += -xregs=no%appl
-  endif
-  CC_NEWER_THAN_56 := \
-    $(shell $(EXPR) $(CC_MAJORVER) \> 5 \| \
-         \( $(CC_MAJORVER) = 5 \& $(CC_MINORVER) \> 6 \) )
-  ifeq ($(CC_NEWER_THAN_56),1)
-    #     Presents an ABI issue with customer JNI libs? We must be able to
-    #     to handle 4byte aligned objects? (rare occurance, but possible?)
-    CFLAGS_REQUIRED_sparc += -xmemalign=4s
-  endif
-  # Just incase someone trys to use the SOS9 compilers
-  ifeq ($(CC_VER), 5.6)
-    # We MUST allow data alignment of 4 for sparc (sparcv9 is ok at 8s)
-    CFLAGS_REQUIRED_sparc += -xmemalign=4s
-  endif
-  # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
-  #   (See Rules.gmk) The SS11 -xpch=auto* options appear to be broken.
-  AUTOMATIC_PCH_OPTION =
-  
-  # Add in keep frame options
-  CC_OPT/LOWER    += $(CC_XKEEPFRAME_OPTIONS)
-  CC_OPT/HIGHER   += $(CC_XKEEPFRAME_OPTIONS)
-  CC_OPT/HIGHEST  += $(CC_XKEEPFRAME_OPTIONS)
-  CXX_OPT/LOWER   += $(CXX_XKEEPFRAME_OPTIONS)
-  CXX_OPT/HIGHER  += $(CXX_XKEEPFRAME_OPTIONS)
-  CXX_OPT/HIGHEST += $(CXX_XKEEPFRAME_OPTIONS)
- 
-  # Add in highest optimization settings
-  CC_OPT/HIGHEST  += $(CC_HIGHEST_EXTRAS)
-  CXX_OPT/HIGHEST += $(CC_HIGHEST_EXTRAS)
-  
-endif
-
-# Default optimization settings based on level.
-CC_OPT  = $(CC_OPT/$(OPTIMIZATION_LEVEL))
-CXX_OPT = $(CXX_OPT/$(OPTIMIZATION_LEVEL))
-
-# Flags required all the time
-CFLAGS_REQUIRED = $(CFLAGS_REQUIRED_$(ARCH))
-
-#
-# Path and option to link against the VM, if you have to.  Note that
-# there are libraries that link against only -ljava, but they do get
-# -L to the -ljvm, this is because -ljava depends on -ljvm, whereas
-# the library itself should not.
-#
-VM_NAME         = server
-JVMLIB          = -L$(LIBDIR)/$(LIBARCH)/server -L$(LIBDIR)/$(LIBARCH)/client -ljvm
-JAVALIB         = -ljava $(JVMLIB)
-
-# Part of INCREMENTAL_BUILD mechanism.
-#   Compiler emits things like:  path/file.o: file.h
-#   We want something like: relative_path/file.o relative_path/file.d: file.h
-#   In addition on Solaris, any include file starting with / is deleted,
-#   this gets rid of things like /usr/include files, which never change.
-CC_DEPEND	 = -xM1
-CC_DEPEND_FILTER = $(SED) -e '/:[ 	]*[/]/d' -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g' | $(SORT) -u
-
-# Location of openwin libraries (do we really need this anymore?)
-OPENWIN_HOME    = /usr/openwin
-OPENWIN_LIB     = $(OPENWIN_HOME)/lib$(ISA_DIR)
-
-# Runtime graphics library search paths...
-OPENWIN_RUNTIME_LIB = /usr/openwin/lib$(ISA_DIR)
-AWT_RUNPATH = -R/usr/dt/lib$(ISA_DIR) -R$(OPENWIN_RUNTIME_LIB)
-
-# C++ Runtime library (libCrun.so), use instead of -lCrun.
-#    Originally used instead of -lCrun to guarantee use of the system
-#    .so version and not the .a or .so that came with the compilers.
-#    With the newer compilers this could probably change back to -lCrun but
-#    in general this is ok to continue to do.
-LIBCXX = /usr/lib$(ISA_DIR)/libCrun.so.1
-
-# JDK now requires Solaris 10, so pick up libm.so.2
-LIBM = /usr/lib$(ISA_DIR)/libm.so.2
-
-# Socket library
-LIBSOCKET = -lsocket
-
-# Network Services library
-LIBNSL = -lnsl
-
-# service configuration facility library
-LIBSCF = -lscf
-
-# Dynamic Loading library
-LIBDL = -ldl
-
-# GLOBAL_KPIC: If set means all libraries are PIC, position independent code
-#    EXCEPT for select compiles
-#    If a .o file is compiled non-PIC then it should be forced
-#	   into the RW data segment with a mapfile option. This is done
-#    with object files which generated from .s files.
-#    The -ztext enforces that no relocations remain in the text segment
-#    so that it remains purely read-only for optimum system performance.
-#    Some libraries may use a smaller size (13bit -Kpic) on sparc instead of 
-#    (32 bit -KPIC) and will override GLOBAL_KPIC appropriately.
-#
-PIC_CODE_LARGE   = -KPIC
-PIC_CODE_SMALL   = -Kpic
-ifndef TCOV_BUILD
-    GLOBAL_KPIC      = $(PIC_CODE_LARGE)
-    CXXFLAGS_COMMON += $(GLOBAL_KPIC)
-    CFLAGS_COMMON   += $(GLOBAL_KPIC)
-    LDFLAGS_COMMON  += -ztext
-endif # TCOV_BUILD
-
-# If your platform has DPS, it will have Type1 fonts too, in which case
-# it is best to enable DPS support until such time as 2D's rasteriser
-# can fully handle Type1 fonts in all cases. Default is "yes".
-# HAVE_DPS should only be "no" if the platform has no DPS headers or libs
-# DPS (Displayable PostScript) is available on Solaris machines
-
-HAVE_DPS = yes
-
-#
-# Japanese manpages
-#
-JA_SOURCE_ENCODING = eucJP
-JA_TARGET_ENCODINGS = eucJP UTF-8 PCK
-
-# Settings for the JDI - Serviceability Agent binding.
-HOTSPOT_SALIB_PATH   = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH)
-SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX)
-SA_DEBUGINFO_NAME = $(LIB_PREFIX)saproc.debuginfo
-INCLUDE_SA=true
-
--- a/jdk/makefiles/common/Defs-windows.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,418 +0,0 @@
-#
-# Copyright (c) 1999, 2011, 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.
-#
-
-#
-# Makefile to specify compiler flags for programs and libraries
-# targeted to Windows builds.  Should not contain any rules.
-#
-# WARNING: This file is shared with other workspaces. 
-#          So when it includes other files, it must use JDK_TOPDIR.
-#
-
-# Get shared JDK settings
-include $(JDK_MAKE_SHARED_DIR)/Defs.gmk
-
-# CC compiler object code output directive flag value
-CC_OBJECT_OUTPUT_FLAG = -Fo
-
-# The suffix applied to the library name for FDLIBM
-FDDLIBM_SUFFIX = lib
-# The suffix applied to scripts (.bat for windows, nothing for unix)
-SCRIPT_SUFFIX = .bat
-
-# LIB_LOCATION, which for windows identifies where .exe files go, may be
-# set by each GNUmakefile. The default is BINDIR.
-ifndef LIB_LOCATION
-  LIB_LOCATION = $(BINDIR)
-endif # LIB_LOCATION
-
-ifndef PLATFORM_SRC
-  PLATFORM_SRC  = $(BUILDDIR)/../src/windows
-endif # PLATFORM_SRC
-
-# Platform specific closed sources
-ifndef OPENJDK
-  ifndef CLOSED_PLATFORM_SRC
-    CLOSED_PLATFORM_SRC  = $(BUILDDIR)/../src/closed/windows
-  endif
-endif
-
-# for backwards compatability, the old "win32" is used here instead of 
-# the more proper "windows"
-PLATFORM_INCLUDE_NAME = win32
-PLATFORM_INCLUDE      = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
-
-# The following DLL's are considered MS runtime libraries and should
-#     not to be REBASEd, see deploy/make/common/Release.gmk.
-#     msvcr*.dll: Microsoft runtimes
-ifeq ($(COMPILER_VERSION), VS2010)
-  MSVCRNN_DLL = msvcr100.dll
-  MSVCPNN_DLL = msvcp100.dll
-endif
-
-EXTRA_LFLAGS += /LIBPATH:$(DXSDK_LIB_PATH)
-
-# C Compiler flag definitions
-
-#
-# Default optimization
-#
-
-ifndef OPTIMIZATION_LEVEL
-  ifeq ($(PRODUCT), java)
-    OPTIMIZATION_LEVEL = HIGHER
-  else
-    OPTIMIZATION_LEVEL = LOWER
-  endif
-endif
-ifndef FASTDEBUG_OPTIMIZATION_LEVEL
-  FASTDEBUG_OPTIMIZATION_LEVEL = LOWER
-endif
-
-ifeq ($(CC_VERSION),msvc)
-  # Visual Studio compiler option definitions:
-  #   -O1      Favors reduced size over speed (-Og     -Os -Oy -Ob2 -Gs -GF -Gy)
-  #   -O2      Favors speed over reduced size (-Og -Oi -Ot -Oy -Ob2 -Gs -GF -Gy)
-  #   -Ob2     More aggressive inlining
-  #   -Og      Global optimizations
-  #   -Oi      Replace some functions with intrinsic or special forms
-  #   -fp:precise (should be the default)
-  #            Improve floating point calculations (disables some optimizations)
-  #   -Os      Favor small code
-  #   -Ot      Favor faster code
-  #   -Oy      Frame pointer omission
-  #   -G6      Used to be -GB?
-  #   -GF      Pool strings in read-only memory
-  #   -Gf      Pool strings in read-write memory (the default)
-  #   -Gs      Controls stack probess
-  #   -GS      Adds buffer overflow checks on stacks (the default)
-  #   -EHsc    Enables exception handling 
-  #   -Gy      Function level linking only
-  #
-
-  CC_OPT/NONE    = -Od
-  CC_OPT/LOWER   = -O2
-  CC_OPT/HIGHER  = -O3
-  CC_OPT/HIGHEST = -O3
-  
-  ifeq ($(COMPILER_VERSION), VS2010)
-    # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
-    AUTOMATIC_PCH_OPTION =
-    GX_OPTION = -EHsc
-    GZ_OPTION = -RTC1
-    ifeq ($(ARCH_DATA_MODEL), 32)
-      CC_OPT/HIGHEST = -O2
-      CC_OPT/HIGHER  = -O1
-      CC_OPT/LOWER   = -O1
-    else
-      CC_OPT/HIGHEST = -O2
-      CC_OPT/HIGHER  = -O1
-      CC_OPT/LOWER   = -O1
-    endif
-  endif
-
-else # CC_VERSION
-  # GCC not supported, but left for historical reference...
-  CC_OPT/NONE     =
-  CC_OPT/LOWER    = -O2
-  CC_OPT/HIGHER   = -O2
-  CC_OPT/HIGHEST  = -O3
-
-endif
-
-CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL))
-
-# Select the runtime support library carefully, need to be consistent
-#
-# Visual Studio Runtime compiler option definitions:
-#   -MD        Use dynamic multi-threaded runtime library
-#   -MDd       Use debug version (don't use, doesn't mix with -MD DLL's)
-#   -MT        Use static multi-threaded runtime library (-ML is going away)
-#   -MTd       Use static debug version (better than -MDd, no runtime issues)
-#   -D_DEBUG   Change use of malloc/free/etc to use special debug ones (-MTd)
-#
-#      NOTE: We also will use /D _STATIC_CPPLIB  so we don't need msvcpnn.dll
-#
-# If MS_RUNTIME_STATIC is requested we may have a problem, it is no longer
-#     supported by VS2010
-ifneq ($(MS_RUNTIME_STATIC),true)
-  MS_RUNTIME_OPTION=-MD
-endif
-# The _DEBUG macro option (changes things like malloc to use debug version)
-MS_RUNTIME_DEBUG_OPTION=
-MS_RC_DEBUG_OPTION=
-# Externally set environment variable can force any build to use the debug vers
-ifeq ($(MFC_DEBUG), true)
-  ifeq ($(MS_RUNTIME_STATIC),true)
-    MS_RUNTIME_OPTION=-MTd
-  else
-    # This MS debugging flag forces a dependence on the debug
-    #     version of the runtime library (MSVCR*D.DLL), as does -MDd.
-    #     We cannot re-distribute this debug runtime.
-    MS_RUNTIME_OPTION=-MDd
-  endif
-  MS_RUNTIME_DEBUG_OPTION= -D_DEBUG
-  MS_RC_DEBUG_OPTION= -d _DEBUG
-endif
-
-# Always add _STATIC_CPPLIB definition
-STATIC_CPPLIB_OPTION = /D _STATIC_CPPLIB
-
-# Silence the warning about using _STATIC_CPPLIB
-ifneq ($(SHOW_ALL_WARNINGS),true)
-  # Needed with VS2010 to turn off the deprecated warning.
-  STATIC_CPPLIB_OPTION += /D _DISABLE_DEPRECATE_STATIC_CPPLIB
-endif
-
-MS_RUNTIME_OPTION += $(STATIC_CPPLIB_OPTION)
-
-ifeq ($(CC_VERSION),msvc)
-  # Visual Studio compiler option definitions:
-  #   -Zi      Cause *.pdb file to be created, full debug information
-  #   -Z7      Full debug inside the .obj, no .pdb
-  #   -Zd      Basic debug, no local variables? In the .obj
-  #   -Zl      Don't add runtime library name to obj file?
-  #   -Od      Turns off optimization and speeds compilation
-  #   -YX -Fp/.../foobar.pch   Use precompiled headers (try someday?)
-  #   -nologo  Don't print out startup message
-  #   /D _STATIC_CPPLIB
-  #            Use static link for the C++ runtime (so msvcpnn.dll not needed)
-  #   
-  CFLAGS_COMMON  += -Zi -nologo
-  CFLAGS_OPT      = $(CC_OPT)
-  CFLAGS_DBG      = -Od $(MS_RUNTIME_DEBUG_OPTION)
-
-  CFLAGS_VS2010 += -Zc:wchar_t-
-
-  # All builds get the same runtime setting
-  CFLAGS_COMMON += $(MS_RUNTIME_OPTION) $(CFLAGS_$(COMPILER_VERSION))
-
-  LDEBUG = /debug
-  
-  ifeq ($(VTUNE_SUPPORT), true)
-    OTHER_CFLAGS = -Z7 -Ox 
-    LDEBUG += /pdb:NONE
-  endif
-  
-  # VS2010, always need safe exception handlers, not needed on 64bit
-  ifeq ($(ARCH_DATA_MODEL), 32)
-    LFLAGS_VS2010 +=  -SAFESEH
-  endif
-
-  # LFLAGS are the flags given to $(LINK) and used to build the actual DLL file
-  BASELFLAGS = -nologo /opt:REF /incremental:no
-
-  LFLAGS = $(BASELFLAGS) $(LDEBUG) $(EXTRA_LFLAGS) $(LFLAGS_$(COMPILER_VERSION))
-  LDDFLAGS += $(LFLAGS_$(COMPILER_VERSION))
-  
-endif
-
-#
-# Preprocessor macro definitions
-#
-CPPFLAGS_COMMON = -DWIN32 -DIAL -D_LITTLE_ENDIAN
-ifeq ($(ARCH), amd64)
-  CPPFLAGS_COMMON += -D_AMD64_ -Damd64
-else
-  CPPFLAGS_COMMON += -D_X86_ -Dx86 
-endif
-CPPFLAGS_COMMON += -DWIN32_LEAN_AND_MEAN
-
-#
-# Output options (use specific filenames to avoid parallel compile errors)
-#
-CFLAGS_COMMON += -Fd$(OBJDIR)/$(basename $(@F)).pdb -Fm$(OBJDIR)/$(basename $(@F)).map
-
-#
-# Use -wdNNNN to disable warning NNNN.
-#   C4800 is a warning about bool performance casts (can't make go away)
-#
-COMPILER_WARNINGS_TO_IGNORE = 4800
-CFLAGS_COMMON += $(COMPILER_WARNINGS_TO_IGNORE:%=-wd%)
-
-#
-# Treat compiler warnings as errors, if requested
-#
-CFLAGS_COMMON += -W$(COMPILER_WARNING_LEVEL)
-ifeq ($(COMPILER_WARNINGS_FATAL),true)
-  CFLAGS_COMMON += -WX
-endif
-
-# Turn off some warnings by default, enable them all if asked.
-ifneq ($(SHOW_ALL_WARNINGS),true)
-  # The -D _CRT_SECURE_NO_DEPRECATE turns off security/deprecated warnings on
-  #    the standard C library functions like strcpy.
-  CFLAGS_COMMON += -D _CRT_SECURE_NO_DEPRECATE
-  # The -D _CRT_NONSTDC_NO_DEPRECATE turns off deprecation warnings about using
-  #    non-standard C POSIX functions.
-  CFLAGS_COMMON += -D _CRT_NONSTDC_NO_DEPRECATE
-endif
-
-CPPFLAGS_OPT    = -DNDEBUG
-CPPFLAGS_DBG    = -DDEBUG -DLOGGING
-
-CXXFLAGS_COMMON = $(CFLAGS_COMMON)
-CXXFLAGS_OPT    = $(CFLAGS_OPT)
-CXXFLAGS_DBG    = $(CFLAGS_DBG)
-
-ifneq ($(LIBRARY),fdlibm)
-  EXTRA_LIBS += advapi32.lib
-endif
-
-#
-# Path and option to link against the VM, if you have to. 
-#
-JVMLIB = $(LIBDIR)/jvm.lib
-JAVALIB = $(LIBDIR)/java.lib
-
-ifeq ($(CC_VERSION), msvc)
-  CC_DEPEND        = -FD
-  CC_DEPEND_FILTER = 
-else # CC_VERSION
-# not supported, but left for historical reference...
-  CC_DEPEND        = -MM
-  CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)&!g'
-endif # CC_VERSION
-
-LIBRARY_SUFFIX = dll
-LIB_SUFFIX     = lib
-
-# Settings for the JDI - Serviceability Agent binding.
-HOTSPOT_SALIB_PATH   = $(HOTSPOT_IMPORT_PATH)/jre/bin
-SALIB_NAME = $(LIB_PREFIX)sawindbg.$(LIBRARY_SUFFIX)
-SAMAP_NAME = $(LIB_PREFIX)sawindbg.map
-SAPDB_NAME = $(LIB_PREFIX)sawindbg.pdb
-
-ifeq ($(ARCH), ia64)
-  # SA will never be supported here.
-  INCLUDE_SA = false
-else
-  INCLUDE_SA = true
-endif
-
-# Settings for the VERSIONINFO tap on windows. 
-VERSIONINFO_RESOURCE = $(BUILDDIR)/../src/windows/resource/version.rc
-
-ifneq ($(JDK_BUILD_NUMBER),)
- COOKED_BUILD_NUMBER = $(shell $(ECHO) $(JDK_BUILD_NUMBER) | $(SED) -e 's/^b//' -e 's/^0//')
-else
- COOKED_BUILD_NUMBER = 0
-endif
-
-# If the update version contains non-numeric characters, we need
-# to massage it into a numeric format. 
-# We use the following formula:
-# JDK_UPDATE_VER = JDK_UPDATE_VERSION * 10 + EXCEPTION_VERSION
-#
-# Here are some examples:
-#     1.5.0    b01  ->  5,0,0,1
-#     1.5.0_10 b01  ->  5,0,100,1
-#     1.4.2 b01     ->  4,2,0,1
-#     1.4.2_02 b01  ->  4,2,20,1
-#     1.4.2_02a b01 ->  4,2,21,1
-#     1.4.2_02b b01 ->  4,2,22,1
-ifdef JDK_UPDATE_VERSION
-  VTMP := $(shell $(ECHO) $(JDK_UPDATE_VERSION) | $(TR) "abcde" "12345")
-  CAB_CHAR1 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 1, 1);}')
-  CAB_CHAR2 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 2, 1);}')
-  CAB_CHAR3 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 3, 1);}')
-  JDK_UPDATE_META_TAG := U$(MARKETING_NUMBER)
-  ifeq ($(CAB_CHAR3),)
-    CAB_CHAR3 := 0
-  endif
-  ifeq ($(CAB_CHAR1), 0)
-    JDK_UPDATE_VER := $(CAB_CHAR2)$(CAB_CHAR3)
-  else
-    JDK_UPDATE_VER := $(CAB_CHAR1)$(CAB_CHAR2)$(CAB_CHAR3)
-  endif
-else
-  JDK_UPDATE_VER := 0
-endif
-
-#RC_FLAGS = /l 0x409 /r
-
-#ifeq ($(VARIANT), OPT)
-#  RC_FLAGS += -d NDEBUG 
-#else
-#  RC_FLAGS += $(MS_RC_DEBUG_OPTION)
-#endif 
-
-# Values for the RC variables defined in RC_FLAGS
-#JDK_RC_BUILD_ID = $(FULL_VERSION)
-#JDK_RC_COMPANY = $(COMPANY_NAME)
-#JDK_RC_COMPONENT = $(PRODUCT_NAME) $(JDK_RC_PLATFORM_NAME) binary
-#JDK_RC_VER = \
-#    $(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VER).$(COOKED_BUILD_NUMBER)
-#JDK_RC_COPYRIGHT = Copyright \xA9 $(COPYRIGHT_YEAR)
-#JDK_RC_NAME = \
-#    $(PRODUCT_NAME) $(JDK_RC_PLATFORM_NAME) $(JDK_MINOR_VERSION) $(JDK_UPDATE_META_TAG)
-#JDK_RC_FVER = \
-#    $(JDK_MINOR_VERSION),$(JDK_MICRO_VERSION),$(JDK_UPDATE_VER),$(COOKED_BUILD_NUMBER)
-
-# JDK name required here
-#RC_FLAGS += -d "JDK_BUILD_ID=$(JDK_RC_BUILD_ID)" \
-#            -d "JDK_COMPANY=$(JDK_RC_COMPANY)" \
-#            -d "JDK_COMPONENT=$(JDK_RC_COMPONENT)" \
-#            -d "JDK_VER=$(JDK_RC_VER)" \
-#            -d "JDK_COPYRIGHT=$(JDK_RC_COPYRIGHT)" \
-#            -d "JDK_NAME=$(JDK_RC_NAME)" \
-#            -d "JDK_FVER=$(JDK_RC_FVER)"
-
-# Enable 7-Zip LZMA file (de)compression for Java Kernel if it is available
-ifeq ($(ARCH_DATA_MODEL), 32)
-  ifneq ($(KERNEL), off)
-    # This is a hack to use until  7-Zip (and UPX) bundles can be put
-    # under /java/devtools.
-    ifndef DEPLOY_TOPDIR
-      DEPLOY_TOPDIR=$(JDK_TOPDIR)/../deploy
-    endif
-    # Uncomment this block to cause build failure if above assumption false
-    #DCHK = $(shell if [ ! -d $(DEPLOY_TOPDIR) ] ; then \
-    #  $(ECHO) deploy_not_a_peer_of_j2se ; \
-    #fi )
-    #ifeq ($(DCHK), deploy_not_a_peer_of_j2se)
-    #  If a build failure points to control coming here it means
-    #  it means deploy is not in the same directory
-    #  as j2se. Java Kernel can't tolerate that for the time being.
-    #endif
-    EC_TMP = $(shell if [ -d $(DEPLOY_TOPDIR)/make/lzma ] ; then \
-      $(ECHO) true ; \
-    else \
-      $(ECHO) false ; \
-    fi )
-    ifeq ($(EC_TMP), true)
-      EXTRA_COMP_INSTALL_PATH = lib\\\\deploy\\\\lzma.dll
-      # Crazy but true: deploy/make/plugin/jinstall/Makefile.jkernel does
-      # not include deploy/make/common/Defs-windows.gmk, either directly
-      # or indirectly. But it does include this file, so redundantly declare
-      # these variables that are in deploy/make/common/Defs-windows.gmk for
-      # the sake of the Java Kernel part of the deploy build. Whew!
-      EXTRA_COMP_LIB_NAME = lzma.dll
-      EXTRA_COMP_PATH = $(OUTPUTDIR)/tmp/deploy/lzma/win32/obj
-      EXTRA_COMP_CMD_PATH = $(EXTRA_COMP_PATH)/lzma.exe
-      EXTRA_COMP_LIB_PATH = $(EXTRA_COMP_PATH)/$(EXTRA_COMP_LIB_NAME)
-    endif
-  endif
-endif
--- a/jdk/makefiles/common/Defs.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,577 +0,0 @@
-#
-# Copyright (c) 1995, 2011, 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.
-#
-
-#
-# Common variables used by all the Java makefiles.  This file should
-# not contain rules.
-#
-
-# WARNING: This file is shared with other workspaces.
-#          So when it includes other files, it must use JDK_TOPDIR.
-#
-
-# Check for strange explicit settings (change to empty or true)
-ifdef OPENJDK
-  ifneq ($(OPENJDK),true)
-    x:=$(error "OPENJDK (if defined) can only be set to true")
-  endif
-endif
-
-#
-# On Solaris, the 'make' utility from Sun will not work with these makefiles.
-#    This little rule is only understood by Sun's make, and is harmless
-#    when seen by the GNU make tool. If using Sun's make, this causes the
-#    make command to fail.
-#
-SUN_MAKE_TEST:sh = echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33
-
-include $(SPEC)
-include $(JDK_MAKE_SHARED_DIR)/Platform.gmk
-
-# Historically PLATFORM_SRC used to be src/$(PLATFORM), but we switched it to
-# src/solaris so if you want to build on Linux you didn't need a src/linux
-# directory.  In an ideal world it would be called src/genunix but we are not
-# there yet.
-#
-ifndef SHARE_SRC
-  SHARE_SRC    = $(BUILDDIR)/../src/share
-endif
-
-# Files that cannot be included in the OpenJDK distribution are
-# collected under a parent directory which contains just those files.
-ifndef CLOSED_SRC
-  CLOSED_SRC  = $(BUILDDIR)/../src/closed
-endif
-
-# If CLOSE_SRC_INCLUDED isn't set to true, check if there's any
-# closed directory.
-ifneq ($(CLOSED_SRC_INCLUDED), true)
-  CLOSED_SRC_INCLUDED := $(shell \
-    if [ -d $(CLOSED_SRC) ] ; then \
-      echo true; \
-    else \
-      echo false; \
-    fi)
-endif
-
-# Set OPENJDK based on CLOSED_SRC_INCLUDED
-ifeq ($(CLOSED_SRC_INCLUDED), false)
-  OPENJDK = true
-endif
-
-# Define where closed directories are
-ifdef OPENJDK
-  CLOSED_SRC =
-  CLOSED_SHARE_SRC =
-else
-  ifndef CLOSED_SHARE_SRC
-    CLOSED_SHARE_SRC    = $(CLOSED_SRC)/share
-  endif
-endif
-
-#
-# Get platform definitions
-#
-
-include $(JDK_TOPDIR)/makefiles/common/Defs-$(PLATFORM).gmk
-
-#
-# SE-Embedded support, if enabled
-#
-
-include $(JDK_TOPDIR)/makefiles/common/Defs-embedded.gmk
-
-#
-# Cross-compilation Settings
-#
-ifdef CROSS_COMPILE_ARCH
-  # Can't run the tools we just built
-  USE_ONLY_BOOTDIR_TOOLS = true
-
-  # When cross-compiling CC generates code for the target, but
-  # some parts of the build generate C code that has to be compiled
-  # and executed on the build host - HOST_CC is the 'local' compiler.
-  # For linux the default is /usr/bin/gcc; other platforms need to
-  # set it explicitly
-  ifeq ($(PLATFORM), linux)
-    ifndef HOST_CC
-      HOST_CC = $(USRBIN_PATH)gcc
-    endif
-  endif
-else
-  # Must set HOST_CC if not already set
-  ifndef HOST_CC
-    HOST_CC = $(CC)
-  endif
-endif
-
-# Reset the VM name for client-only builds
-ifeq ($(JVM_VARIANT),client)
-  VM_NAME = client
-endif
-
-#
-# Freetype logic is applicable to OpenJDK only
-#
-ifdef OPENJDK
-
-ifeq ($(PLATFORM), windows)
-  DEVTOOLS_FT_DIR=$(JDK_DEVTOOLS_DIR)/win32/freetype-$(ARCH)
-endif
-ifeq ($(PLATFORM), linux)
-  DEVTOOLS_FT_DIR=$(JDK_DEVTOOLS_DIR)/$(PLATFORM)/freetype-$(ARCH)
-endif
-ifeq ($(PLATFORM), solaris)
-  # historically for Solaris we have slightly different devtools 
-  # naming conventions
-  DEVTOOLS_FT_DIR=$(JDK_DEVTOOLS_DIR)/$(ARCH_FAMILY)/freetype-$(ARCH)
-endif
-
-DEVTOOLS_FT_DIR_EXISTS = $(shell \
-  if [ -f $(DEVTOOLS_FT_DIR)/include/ft2build.h ] ; then \
-    echo true; \
-  else \
-    echo false; \
-  fi)
-
-  ifdef ALT_FREETYPE_LIB_PATH
-    FREETYPE_LIB_PATH = $(ALT_FREETYPE_LIB_PATH)
-    ifeq ($(PLATFORM), macosx)
-      USING_SYSTEM_FT_LIB=true
-    endif
-  else
-    ifeq ($(DEVTOOLS_FT_DIR_EXISTS), true)
-      FREETYPE_LIB_PATH = $(DEVTOOLS_FT_DIR)/lib
-    else
-      ifeq ($(PLATFORM), macosx)
-        FREETYPE_LIB_PATH = /usr/X11R6/lib
-      else
-        FREETYPE_LIB_PATH = /usr/lib
-      endif
-      USING_SYSTEM_FT_LIB=true
-    endif
-  endif 
-
-  ifdef ALT_FREETYPE_HEADERS_PATH
-    FREETYPE_HEADERS_PATH = $(ALT_FREETYPE_HEADERS_PATH)
-  else
-    ifeq ($(DEVTOOLS_FT_DIR_EXISTS), true)
-      FREETYPE_HEADERS_PATH = $(DEVTOOLS_FT_DIR)/include
-    else
-      ifeq ($(PLATFORM), macosx)
-        FREETYPE_HEADERS_PATH = /usr/X11R6/include
-      else
-        FREETYPE_HEADERS_PATH = /usr/include
-      endif
-    endif
-  endif
-endif
-
-#
-# zlib version
-#
-ZLIB_VERSION = 1.2.5
-
-
-#
-# Localizations for the different parts of the product beyond English
-#
-
-JRE_LOCALES   = de es fr it ja ko pt_BR sv zh_CN zh_TW zh_HK
-PLUGIN_LOCALES = de es fr it ja ko pt_BR sv zh_CN zh_TW zh_HK
-JDK_LOCALES  = ja zh_CN
-
-#
-# A list of locales we support but don't have resource files.
-# This is defined to optimize the search of resource bundles.
-#
-JRE_NONEXIST_LOCALES = en en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR sv_SE zh
-
-#
-# For now, most libraries except libjava and libjvm itself link against libjvm
-# and libjava, the latter for its exported common utilities. libjava only
-# links against libjvm. Programs' makefiles take their own responsibility for
-# adding other libs.
-#
-# The makefiles for these packages do not link against libjvm and libjava.
-# This list will eventually go away and each Programs' makefiles
-# will have to explicitly declare that they want to link to libjava/libjvm
-#
-NO_JAVALIB_PKGS = \
-		sun.security.mscapi \
-		sun.security.krb5 \
-		sun.security.pkcs11 \
-		sun.security.jgss \
-		sun.security.jgss.wrapper \
-		sun.security.ec \
-		sun.security.smartcardio \
-		com.sun.security.auth.module
-
-ifdef PACKAGE
-# put JAVALIB first, but do not lose any platform specific values....
-  ifeq (,$(findstring $(PACKAGE),$(NO_JAVALIB_PKGS)))
-    LDLIBS_COMMON = $(JAVALIB)
-  endif
-endif # PACKAGE
-
-#
-# Libraries that must appear ahead of libc.so on the link command line
-#
-ifdef PROGRAM
-
-  ifeq ($(PLATFORM), solaris)
-    LDLIBS_COMMON = -lthread -ldl
-  endif
-
-  ifeq ($(PLATFORM), linux)
-    LDLIBS_COMMON = -ldl
-  endif
-
-  ifeq ($(PLATFORM), macosx)
-    LDLIBS_COMMON = -pthread
-  endif
-
-endif # PROGRAM
-
-LDLIBS_COMMON += $(EXTRA_LIBS)
-
-# for generated binaries
-BINDIR              = $(OUTPUTDIR)/bin$(ISA_DIR)
-# for generated libraries
-LIBDIR              = $(OUTPUTDIR)/lib
-ABS_LIBDIR          = $(ABS_OUTPUTDIR)/lib
-# Optional place to save the windows .lib files
-LIBFILES_DIR        = $(OUTPUTDIR)/libfiles
-# for ext jre files
-EXTDIR              = $(LIBDIR)/ext
-# for generated include files
-INCLUDEDIR          = $(OUTPUTDIR)/include
-# for generated class files
-CLASSBINDIR         = $(OUTPUTDIR)/classes
-DEMOCLASSDIR        = $(OUTPUTDIR)/democlasses
-# for generated tool class files
-BUILDTOOLCLASSDIR   = $(OUTPUTDIR)/btclasses
-# for build tool jar files
-BUILDTOOLJARDIR     = $(OUTPUTDIR)/btjars
-ABS_BUILDTOOLJARDIR = $(ABS_OUTPUTDIR)/btjars
-# for generated tool class files
-BUILDTOOLBINDIR     = $(OUTPUTDIR)/btbins
-# for generated java source files
-GENSRCDIR           = $(OUTPUTDIR)/gensrc
-# for generated C source files (not javah)
-GENNATIVESRCDIR     = $(OUTPUTDIR)/gennativesrc
-# for imported source files
-IMPORTSRCDIR        = $(OUTPUTDIR)/impsrc
-# for imported documents
-IMPORTDOCDIR        = $(OUTPUTDIR)/impdoc
-# for generated demo
-DEMODIR             = $(OUTPUTDIR)/demo
-NEWDEMODIR	    = $(OUTPUTDIR)/newdemo
-# for sample code
-SAMPLEDIR           = $(OUTPUTDIR)/sample
-# for generated documentation
-DOCSDIR             = $(OUTPUTDIR)/docs$(DOCSDIRSUFFIX)
-DOCSDIRSUFFIX       =
-
-# The MESSAGE, WARNING and ERROR files are used to store sanityck and 
-# warnings and errors. 
-ifndef ERROR_FILE
-  ERROR_FILE   = $(OUTPUTDIR)/sanityCheckErrors.txt
-endif
-ifndef WARNING_FILE
-  WARNING_FILE = $(OUTPUTDIR)/sanityCheckWarnings.txt
-endif
-ifndef MESSAGE_FILE
-  MESSAGE_FILE = $(OUTPUTDIR)/sanityCheckMessages.txt
-endif
-
-#where the demo source can be found
-DEMOSRCDIR          = $(SHARE_SRC)/demo
-
-#where the sample source can be found
-SAMPLESRCDIR          = $(SHARE_SRC)/sample
-
-# An attempt is made to generate unique enough directories for the
-# generated files to not have name collisisons. Most build units
-# defines PRODUCT (except Release.gmk), but then they may or may 
-# not define PACKAGE, PROGRAM, and LIBRARY. This code attempts to
-# generate a unique OBJDIR/CLASSHDRDIR for each build unit based
-# on which of those values are set within each build unit.
-
-UNIQUE_LOCATION_STRING = tmp
-
-ifneq ($(PRODUCT),)
-  UNIQUE_LOCATION_STRING += /$(PRODUCT)
-endif
-
-ifneq ($(PACKAGE),)
-  UNIQUE_LOCATION_STRING += /$(PACKAGE)
-endif
-
-ifneq ($(PROGRAM),)
-  UNIQUE_LOCATION_STRING += /$(PROGRAM)
-endif
-
-ifneq ($(LIBRARY),)
-  ifneq ($(LIBRARY_OUTPUT),)
-    UNIQUE_LOCATION_STRING += /$(LIBRARY_OUTPUT)
-  else
-    UNIQUE_LOCATION_STRING += /$(LIBRARY)
-  endif
-endif
-
-# the use of += above makes a space separated list which we need to 
-# remove for filespecs.
-#
-NULLSTRING :=
-ONESPACE := $(NULLSTRING) # space before this comment is required.
-UNIQUE_PATH = $(subst $(ONESPACE),,$(UNIQUE_LOCATION_STRING))
-
-# TEMPDIR is a unique general purpose directory
-# need to use 'override' because GNU Make on Linux exports the wrong
-# value.
-TEMPDIR      ?= $(OUTPUTDIR)/$(UNIQUE_PATH)
-ABS_TEMPDIR  ?= $(ABS_OUTPUTDIR)/$(UNIQUE_PATH)
-
-# This must be created right away for pattern rules in Sanity.gmk to work.
-dummy1:=$(shell $(MKDIR) -p $(TEMPDIR))
-dummy2:=$(shell $(MKDIR) -p $(TEMP_DISK))
-
-# OBJDIRNAME is the name of the directory where the object code is to
-#   be placed. It's name depends on whether the data model architecture 
-#   is 32-bit or not.
-ifneq ($(ARCH_DATA_MODEL), 32)
-  OBJDIRNAME  = obj$(ARCH_DATA_MODEL)$(OBJDIRNAME_SUFFIX)
-else
-  OBJDIRNAME  = obj$(OBJDIRNAME_SUFFIX)
-endif
-OBJDIR      = $(TEMPDIR)/$(OBJDIRNAME)
-
-# CLASSHDRDIR is where the generated C Class Header files go.
-CLASSHDRDIR = $(TEMPDIR)/CClassHeaders
-
-#
-# CLASSDESTDIR can be used to specify the directory where generated classes
-# are to be placed. The default is CLASSBINDIR.
-#
-ifndef CLASSDESTDIR
-CLASSDESTDIR = $(CLASSBINDIR)
-endif
-
-INCLUDES = -I. -I$(CLASSHDRDIR) \
-	$(patsubst %,-I%,$(subst $(CLASSPATH_SEPARATOR), ,$(VPATH.h))) $(OTHER_INCLUDES)
-OTHER_CPPFLAGS += $(INCLUDES)
-
-#
-# vpaths.  These are the default locations searched for source files.
-# GNUmakefiles of individual areas often override the default settings.
-# There are no longer default vpath entries for C and assembler files
-# so we can ensure that libraries don't get their hands on JVM files.
-#
-# We define an intermediate variable for Java files because
-# we use its value later to help define $SOURCEPATH
-
-ifeq ($(PLATFORM), macosx)
-  VPATH0.java = $(subst $(ONESPACE),:,$(GENSRCDIR) $(call JavaSrcDirList,,classes))
-else
-  VPATH0.java = $(GENSRCDIR)$(CLASSPATH_SEPARATOR)$(PLATFORM_SRC)/classes$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/classes
-endif
-
-ifdef OPENJDK
-  VPATH.java = $(VPATH0.java)
-else
-  #
-  # If filenames are duplicated between open/closed workspaces, prefer
-  # the closed files.
-  #
-  # Source ordering is important: some targets depend on closed files
-  # replacing open ones, and thus the closed file sources must be found
-  # before the open ones.
-  #
-  # Don't reorder without consulting the teams that depend on this behavior.
-  #
-  VPATH.java = $(CLOSED_PLATFORM_SRC)/classes$(CLASSPATH_SEPARATOR)$(CLOSED_SHARE_SRC)/classes$(CLASSPATH_SEPARATOR)$(VPATH0.java)
-endif
-vpath %.java $(VPATH.java)
-vpath %.class $(CLASSBINDIR)
-vpath %.$(OBJECT_SUFFIX) $(OBJDIR)
-
-#
-# VPATH.h is used elsewhere to generate include flags.  By default, 
-# anyone has access to the include files that the JVM area exports,
-# namely jni.h, jvm.h, and jni_utils.h, plus their platform-specific
-# relatives.
-#
-VPATH0.h =   $(PLATFORM_SRC)/javavm/export$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/javavm/export
-ifdef OPENJDK
-  VPATH.h = $(VPATH0.h)
-else
-  VPATH.h = $(CLOSED_SHARE_SRC)/javavm/export$(CLASSPATH_SEPARATOR)$(VPATH0.h)
-endif
-vpath %.h   $(VPATH.h)
-
-#
-# Used in two ways: helps link against libjava.so. Also if overridden
-# determines where your shared library is installed.
-#
-ifndef LIB_LOCATION
-  LIB_LOCATION    =  $(LIBDIR)/$(LIBARCH)
-endif
-
-#
-# Java header and stub variables
-#
-CLASSHDRS     = $(patsubst %,$(CLASSHDRDIR)/%.h,$(subst .,_,$(CLASSES.export)))
-CLASSSTUBOBJS = classstubs.$(OBJECT_SUFFIX)
-STUBPREAMBLE  = $(INCLUDEDIR)/StubPreamble.h
-
-#
-# Classpath seen by javac (different from the one seen by the VM
-# running javac), and useful variables.
-#
-SOURCEPATH	= $(VPATH.java)
-PKG		= $(shell $(EXPR) $(PACKAGE) : '\([a-z]*\)')
-PKGDIR		= $(subst .,/,$(PACKAGE))
-
-#
-# The java/javac/jdk variables (JAVAC_CMD, JAVA_CMD, etc.)
-#
-include $(JDK_MAKE_SHARED_DIR)/Defs-java.gmk
-
-UNIQUE_PATH_PATTERN = $(subst /,.,$(UNIQUE_PATH))
-
-# Run MAKE $@ for a launcher:
-#   $(call make-launcher, name, mainclass, java-args, main-args)
-define make-launcher
-$(CD) $(BUILDDIR)/launchers && \
-$(MAKE) -f Makefile.launcher \
-        PROGRAM=$(strip $1) \
-        MAIN_CLASS=$(strip $2) \
-        MAIN_JAVA_ARGS="$(strip $3)" \
-        MAIN_ARGS="$(strip $4)"
-endef
-
-#
-# Convenient macros
-#
-
-# Prepare $@ target, remove old one and making sure directory exists
-define prep-target
-mkdir -p $(@D)
-rm -f $@
-endef
-
-# Simple install of $< file to $@
-define install-file
-$(prep-target)
-$(CP) $< $@
-endef
-
-define chmod-file
-$(CHMOD) $1 $@
-endef
-
-define install-sym-link
-$(LN) -s $1 $@
-endef
-
-define install-manifest-file
-$(install-file)
-endef
-
-# Cleanup rule for after debug java run (hotspot.log file is left around)
-#   (This could be an old leftover file in a read-only area, use the @- prefix)
-HOTSPOT_LOG_NAME = hotspot.log
-define java-vm-cleanup
-if [ -w $(HOTSPOT_LOG_NAME) ] ; then rm -f $(HOTSPOT_LOG_NAME); fi
-endef
-
-# Current directory
-CURRENT_DIRECTORY := $(shell $(PWD))
-
-#
-# Create BYFILE OPT and DBG settings, if CFLAGS_OPT/foobar.o is set then it is
-#    used for this file, otherwise the default settings are used.
-#
-CFLAGS_$(VARIANT)/BYFILE    = $(CFLAGS_$(VARIANT)/$(@F)) \
-                              $(CFLAGS_$(VARIANT)$(CFLAGS_$(VARIANT)/$(@F)))
-CXXFLAGS_$(VARIANT)/BYFILE  = $(CXXFLAGS_$(VARIANT)/$(@F)) \
-                              $(CXXFLAGS_$(VARIANT)$(CXXFLAGS_$(VARIANT)/$(@F)))
-
-#
-# Tool flags
-#
-# EXTRA_CFLAGS are used to define cross-compilation options
-#
-ASFLAGS         = $(ASFLAGS_$(VARIANT)) $(ASFLAGS_COMMON) $(OTHER_ASFLAGS)
-CFLAGS          = $(CFLAGS_$(VARIANT)/BYFILE)   $(CFLAGS_COMMON) $(OTHER_CFLAGS) $(EXTRA_CFLAGS)
-CXXFLAGS        = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS) $(EXTRA_CFLAGS)
-CPPFLAGS        = $(CPPFLAGS_$(VARIANT)) $(CPPFLAGS_COMMON) $(OTHER_CPPFLAGS) \
-		  $(DEFINES) $(OPTIONS:%=-D%) 
-LDFLAGS         = $(LDFLAGS_$(VARIANT)) $(LDFLAGS_COMMON) $(OTHER_LDFLAGS)
-LDLIBS          = $(OTHER_LDLIBS) $(LDLIBS_$(VARIANT)) $(LDLIBS_COMMON)
-LINTFLAGS       = $(LINTFLAGS_$(VARIANT)) $(LINTFLAGS_COMMON) \
-		  $(OTHER_LINTFLAGS)
-
-VERSION_DEFINES = -DRELEASE='"$(RELEASE)"'
-
-ifdef INSANE
-  export INSANE
-endif
-
-ifdef ALT_COPYRIGHT_YEAR
-  COPYRIGHT_YEAR = $(ALT_COPYRIGHT_YEAR)
-else
-  COPYRIGHT_YEAR := $(shell $(DATE) '+%Y')
-endif
-
-ifndef OPENJDK
-include $(JDK_TOPDIR)/make/closed/common/Defs.gmk
-endif
-
-# Install of imported file (JDK_IMPORT_PATH, or some other external location)
-define install-importonly-file
-@$(ECHO) "ASSEMBLY_IMPORT: $@"
-$(prep-target)
-$(CP) $< $@
-@if [ "$(PLATFORM)" = "linux" -a "$(@F)" = "libjvm.so" ] ; then     \
-  if [ -x /usr/sbin/selinuxenabled ] ; then                         \
-    /usr/sbin/selinuxenabled;                                       \
-    if [ $$? = 0 ] ; then                                           \
-      $(ECHO) "/usr/bin/chcon -t textrel_shlib_t $@";               \
-      /usr/bin/chcon -t textrel_shlib_t $@;                         \
-      if [ $$? != 0 ]; then                                         \
-        echo "ERROR: Cannot chcon $@";                              \
-      fi;                                                           \
-    fi;                                                             \
-  fi;                                                               \
-fi
-endef
-
-define install-import-file
-$(install-importonly-file)
-endef
-
-.PHONY: all build clean clobber
--- a/jdk/makefiles/common/Demo.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,415 +0,0 @@
-#
-# Copyright (c) 2004, 2011, 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.
-#
-
-COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
-COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
-LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) 
-LINK.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) 
-
-# JDK Demo building jar file.
-  
-# Some names are defined with LIBRARY inside the Defs.gmk file
-LIBRARY=$(DEMONAME)
-OBJDIR=$(TEMPDIR)/$(DEMONAME)
-
-# Input:
-#    DEMONAME           - name of the demo
-#    DEMO_ROOT          - path to root of all demo files
-#    DEMO_DESTDIR       - path to final demo destination directory
-#
-# Optional Input:
-#    DEMO_SRCDIR        - path to source if different from DEMO_ROOT
-#    DEMO_PSRCDIR       - path to additional platform specific source
-#    DEMO_PKGDIR        - sub directory of sources we want
-#    DEMO_TOPFILES      - names of top-level files relative to DEMO_ROOT
-#    DEMO_MAINCLASS     - name of the main class for the jar manifest
-#    DEMO_NATIVECLASS   - name of the class with native methods
-#    DEMO_DESCRIPTOR    - name of service file for jar (relative to DEMO_SRCDIR)
-#    DEMO_EXTRA_SRCDIR  - path to directory that holds extra sources to add
-#    DEMO_EXTRA_FILES   - extra sources relative to DEMO_EXTRA_SRCDIR
-#    DEMO_OBJECTS       - extra native object files needed
-#    DEMO_MANIFEST_ATTR - extra line to add to the jar manifest file
-
-# Assume the source directory is the root directory if not set
-ifndef DEMO_SRCDIR
-  DEMO_SRCDIR = $(DEMO_ROOT)
-endif
-ifndef DEMO_PKGDIR
-  DEMO_PKGDIR = .
-endif
-
-# Some demos have special needs
-ifneq ($(DEMONAME),agent_util)
-  DEMO_NEEDS_AGENT_UTIL    = $(findstring agent_util,$(DEMO_OBJECTS))
-endif
-ifneq ($(DEMONAME),java_crw_demo)
-  DEMO_NEEDS_JAVA_CRW_DEMO = $(findstring java_crw_demo,$(DEMO_OBJECTS))
-endif
-ifeq ($(DEMONAME),hprof)
-  DEMO_NEEDS_NPT           = true
-endif
-
-# Place to hold the build area (kind of a temp area)
-DEMO_BUILD_AREA     = $(DEMOCLASSDIR)/$(PRODUCT)/$(DEMONAME)
-
-# Destination "src" directory
-DEMO_BUILD_SRCDIR     = $(DEMO_BUILD_AREA)/src
-
-ifndef DEMO_SKIP_SRCZIP
-  DEMO_BUILD_SRCZIP     = $(DEMO_BUILD_AREA)/src.zip
-  DEMO_SOURCE_ZIP       = $(DEMO_DESTDIR)/src.zip
-endif
-
-# Place to hold the jar image we are creating
-DEMO_JAR_IMAGE      = $(DEMO_BUILD_AREA)/jar_image
-
-# The jar manifest file we will create and use
-DEMO_MANIFEST       = $(DEMO_BUILD_AREA)/manifest.mf
-
-# The list of source files or options we will supply to javac
-DEMO_JAVAC_INPUT    = $(DEMO_BUILD_AREA)/javac_input.txt
-
-# Any name of javah file
-DEMO_JAVAH_FILE = $(DEMO_NATIVECLASS:%=$(DEMO_BUILD_SRCDIR)/%.h)
-
-# Get complete list of files for this demo
-ifdef DEMO_PSRCDIR
-  DEMO_ALL_FILES2  := $(shell ( $(CD) $(DEMO_PSRCDIR) \
-    && $(FIND) $(DEMO_PKGDIR) $(SCM_DIRS_prune) -o -type f -print ) \
-    | $(SED) 's@^\./@@' )
-  DEMO_ALL_FILES   += $(DEMO_ALL_FILES2)
-endif
-ifdef DEMO_EXTRA_SRCDIR
-  DEMO_ALL_FILES   += $(DEMO_EXTRA_FILES)
-endif
-DEMO_ALL_FILES1    := $(shell ( $(CD) $(DEMO_SRCDIR) \
-  && $(FIND) $(DEMO_PKGDIR) $(SCM_DIRS_prune) -o -type f -print ) \
-  | $(SED) 's@^\./@@' )
-DEMO_ALL_FILES      += $(DEMO_ALL_FILES1)
-
-# Just the java sources
-DEMO_JAVA_SOURCES = $(filter %.java,$(DEMO_ALL_FILES))
-
-# Just the C and C++ sources
-DEMO_C_SRC_FILES   = $(filter %.c,$(DEMO_ALL_FILES))
-DEMO_CPP_SRC_FILES = $(filter %.cpp,$(DEMO_ALL_FILES))
-
-# All the native source files
-DEMO_ALL_NATIVE_SOURCES  = $(DEMO_C_SRC_FILES)
-DEMO_ALL_NATIVE_SOURCES += $(DEMO_CPP_SRC_FILES)
-DEMO_ALL_NATIVE_SOURCES += $(filter %.h,$(DEMO_ALL_FILES))
-DEMO_ALL_NATIVE_SOURCES += $(filter %.hpp,$(DEMO_ALL_FILES))
-
-# If we have java sources, then define the jar file we will create
-ifndef DEMO_JAR_NAME
-  DEMO_JAR_NAME = $(DEMONAME).jar
-endif
-ifneq ($(strip $(DEMO_JAVA_SOURCES)),)
-  DEMO_JAR            = $(DEMO_DESTDIR)/$(DEMO_JAR_NAME)
-endif
-
-# If we have native sources, define the native library we will create
-ifneq ($(strip $(DEMO_ALL_NATIVE_SOURCES)),)
-  # Path to native library we will create
-  DEMO_LIBRARY = \
-      $(DEMO_DESTDIR)/lib$(ISA_DIR)/$(LIB_PREFIX)$(DEMONAME).$(LIBRARY_SUFFIX)
-  # C and C++ compiler flags we need to add to standard flags
-  DEMO_CPPFLAGS     += -I$(DEMO_BUILD_SRCDIR)
-  # If the npt library is used we need to find the npt.h file
-  ifneq ($(DEMO_NEEDS_NPT),)
-    # The npt library is delivered as part of the JRE
-    DEMO_CPPFLAGS   += -I$(SHARE_SRC)/npt -I$(PLATFORM_SRC)/npt
-  endif
-  # Is the shared agent_util code needed
-  ifneq ($(DEMO_NEEDS_AGENT_UTIL),)
-    DEMO_FULL_SOURCES  += $(DEMO_BUILD_SRCDIR)/agent_util.c
-    DEMO_FULL_SOURCES  += $(DEMO_BUILD_SRCDIR)/agent_util.h
-  endif
-  # Is the shared java_crw_demo code needed
-  ifneq ($(DEMO_NEEDS_JAVA_CRW_DEMO),)
-    DEMO_FULL_SOURCES  += $(DEMO_BUILD_SRCDIR)/java_crw_demo.c
-    DEMO_FULL_SOURCES  += $(DEMO_BUILD_SRCDIR)/java_crw_demo.h
-  endif
-  # All the native object files we need to build the library
-  DEMO_OBJECTS += $(DEMO_C_SRC_FILES:%.c=%.$(OBJECT_SUFFIX)) \
-                  $(DEMO_CPP_SRC_FILES:%.cpp=%.$(OBJECT_SUFFIX))
-  # Linking is special depending on whether we had C++ code or on windows
-  DEMO_NEEDS_CPP = $(strip $(DEMO_CPP_SRC_FILES))
-  CPPFLAGS      += $(DEMO_CPPFLAGS)
-  ifeq ($(PLATFORM),windows)
-    # Note: This is a link with cl.exe, not link.exe, options differ quite
-    #       bit between them.
-    LINK.demo   = $(LINK.c)
-    LDLIBS.demo = $(EXTRA_LIBS) $(LFLAGS_$(COMPILER_VERSION))
-    DEMO_VERSION_INFO = $(OBJDIR)/$(LIBRARY).res
-    LDLIBS.demo += $(DEMO_VERSION_INFO)
-  else
-    ifneq ($(DEMO_NEEDS_CPP),)
-      LINK.demo   = $(LINK.cpp)
-      LDLIBS.demo = $(LIBCXX)
-      ifeq ($(PLATFORM),solaris)
-        LDLIBS.demo += -lc
-      endif
-    else
-      LINK.demo   = $(LINK.c)
-      LDLIBS.demo = $(LDLIBS)
-    endif
-  endif
-endif
-
-# Files that are considered resources (need to be in the jar file)
-DEMO_RESOURCES        += $(filter-out %.java,$(DEMO_ALL_FILES))
-
-# All destination files (top level readme files and all sources)
-#   Note: We exclude the topfiles from the src tree.
-DEMO_DEST_TOPFILES     = $(DEMO_TOPFILES:%=$(DEMO_DESTDIR)/%)
-DEMO_FILTERED_SOURCES  = $(filter-out $(DEMO_TOPFILES),$(DEMO_ALL_FILES))
-DEMO_FULL_SOURCES     += $(DEMO_FILTERED_SOURCES:%=$(DEMO_BUILD_SRCDIR)/%)
-
-# Default rule
-all: build demo_info
-
-# Used to populate the destination directories
-$(DEMO_DESTDIR)/%: $(DEMO_ROOT)/%
-	$(install-file)
-ifneq ($(DEMO_SRCDIR),$(DEMO_ROOT))
-$(DEMO_DESTDIR)/%: $(DEMO_SRCDIR)/%
-	$(install-file)
-endif
-$(DEMO_BUILD_SRCDIR)/%: $(DEMO_SRCDIR)/%
-	$(install-file)
-ifdef DEMO_PSRCDIR
-$(DEMO_BUILD_SRCDIR)/%: $(DEMO_PSRCDIR)/%
-	$(install-file)
-endif
-ifdef DEMO_EXTRA_SRCDIR
-$(DEMO_BUILD_SRCDIR)/%: $(DEMO_EXTRA_SRCDIR)/%
-	$(install-file)
-endif
-ifneq ($(DEMO_NEEDS_AGENT_UTIL),)
-$(DEMO_BUILD_SRCDIR)/%: $(DEMO_SRCDIR)/../agent_util/%
-	$(install-file)
-endif
-ifneq ($(DEMO_NEEDS_JAVA_CRW_DEMO),)
-$(DEMO_BUILD_SRCDIR)/%: $(DEMO_SRCDIR)/../java_crw_demo/%
-	$(install-file)
-endif
-
-# Jar manifest file
-MAINMANIFEST  = $(JDK_TOPDIR)/make/tools/manifest.mf
-$(DEMO_MANIFEST): $(MAINMANIFEST)
-	@$(prep-target)
-	$(SED) -e "s#@@RELEASE@@#$(RELEASE)#"           \
-               -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
-               $(MAINMANIFEST) >> $@
-	$(ECHO) "Main-Class: $(DEMO_MAINCLASS)" >> $@
-ifdef DEMO_MANIFEST_ATTR
-	$(ECHO) "$(DEMO_MANIFEST_ATTR)" >> $@
-endif
-
-# Populating the jar image directory
-$(DEMO_JAR_IMAGE)/%: $(DEMO_SRCDIR)/%
-	$(install-file)
-ifdef DEMO_PSRCDIR
-$(DEMO_JAR_IMAGE)/%: $(DEMO_PSRCDIR)/%
-	$(install-file)
-endif
-ifdef DEMO_EXTRA_SRCDIR
-$(DEMO_JAR_IMAGE)/%: $(DEMO_EXTRA_SRCDIR)/%
-	$(install-file)
-endif
-ifdef DEMO_DESCRIPTOR
-$(DEMO_JAR_IMAGE)/META-INF/services/$(DEMO_DESCRIPTOR): \
-    $(DEMO_SRCDIR)/$(DEMO_DESCRIPTOR)
-	$(install-file)
-endif
-
-# If we are creating a jar file (we have java code)
-ifdef DEMO_JAR
-
-# Input file for javac
-$(DEMO_JAVAC_INPUT): $(DEMO_JAVA_SOURCES:%=$(DEMO_BUILD_SRCDIR)/%)
-	@$(prep-target)
-	@for i in $(DEMO_JAVA_SOURCES) ; do \
-	  $(ECHO) "$(DEMO_BUILD_SRCDIR)/$$i" >> $@ ; \
-	done
-
-# Jar file creation
-$(DEMO_JAR): \
-    $(DEMO_JAVAC_INPUT) \
-    $(DEMO_MANIFEST) \
-    $(DEMO_DESCRIPTOR:%=$(DEMO_JAR_IMAGE)/META-INF/services/%) \
-    $(DEMO_RESOURCES:%=$(DEMO_JAR_IMAGE)/%)
-	@$(prep-target)
-	$(MKDIR) -p $(DEMO_JAR_IMAGE)
-	$(JAVAC_CMD) -d $(DEMO_JAR_IMAGE) -sourcepath $(DEMO_BUILD_SRCDIR) \
-	    @$(DEMO_JAVAC_INPUT)
-  ifeq ($(DEMO_INCL_SRC),true)
-	$(CP) $(DEMO_JAVA_SOURCES:%=$(DEMO_BUILD_SRCDIR)/%) $(DEMO_JAR_IMAGE)
-  endif
-  ifeq ($(DEMO_ONLY_SRC),true)
-	$(RM) -r $(DEMO_JAR_IMAGE)
-	$(MKDIR) -p $(DEMO_JAR_IMAGE)
-	$(CP) -r $(DEMO_BUILD_SRCDIR)/* $(DEMO_JAR_IMAGE)
-    ifneq ($(DEMO_TOPFILES),)
-	$(CP) $(DEMO_ROOT)/$(DEMO_TOPFILES) $(DEMO_JAR_IMAGE)
-    endif
-  endif
-	$(BOOT_JAR_CMD) -cfm $@ $(DEMO_MANIFEST) \
-	     -C $(DEMO_JAR_IMAGE) . \
-	     $(BOOT_JAR_JFLAGS)
-	@$(java-vm-cleanup)
-
-endif
-
-ifndef DEMO_SKIP_SRCZIP
-  # Create a src.zip file
-  $(DEMO_BUILD_SRCZIP): $(DEMO_FULL_SOURCES)
-	@$(prep-target)
-	$(CD) $(DEMO_BUILD_AREA)/src && $(ZIPEXE) -q -r ../$(@F) .
-
-  # Install the destination src.zip file and create the src tree
-  $(DEMO_SOURCE_ZIP): $(DEMO_BUILD_SRCZIP)
-	$(install-file)
-endif
-
-ifeq ($(PLATFORM),windows)
-# JDK name required here
-RC_FLAGS += /D "JDK_FNAME=$(LIBRARY).dll" \
-            /D "JDK_INTERNAL_NAME=$(LIBRARY)" \
-            /D "JDK_FTYPE=0x2L"
-endif
-
-# Native library building
-ifdef DEMO_LIBRARY
-
-  # Full paths to object files
-  DEMO_FULL_OBJECTS = $(DEMO_OBJECTS:%=$(OBJDIR)/%)
-  VPATH=
-
-# Native compile rules
-$(OBJDIR)/%.$(OBJECT_SUFFIX): $(DEMO_BUILD_SRCDIR)/%.c
-	@$(prep-target)
-	$(COMPILE.c) $(CC_OBJECT_OUTPUT_FLAG)$@ $<
-  ifneq ($(DEMO_NEEDS_CPP),)
-$(OBJDIR)/%.$(OBJECT_SUFFIX): $(DEMO_BUILD_SRCDIR)/%.cpp
-	@$(prep-target)
-	$(COMPILE.cpp) $(CC_OBJECT_OUTPUT_FLAG)$@ $<
-  endif
-
-  # Actual creation of the native shared library (C++ and C are different)
-$(DEMO_LIBRARY): $(DEMO_FULL_OBJECTS)
-	@$(prep-target)
-  ifeq ($(PLATFORM),windows)
-	$(RC) $(RC_FLAGS) $(CC_OBJECT_OUTPUT_FLAG)$(DEMO_VERSION_INFO) $(VERSIONINFO_RESOURCE)
-	$(LINK.demo) $(SHARED_LIBRARY_FLAG) -Fe$@ \
-	    $(DEMO_FULL_OBJECTS) $(LDLIBS.demo)
-  else
-	$(LINK.demo) $(SHARED_LIBRARY_FLAG) -o $@ \
-	    $(DEMO_FULL_OBJECTS) $(LDLIBS.demo)
-  endif
-	@$(call binary_file_verification,$@)
-
-  # Generation of any javah include file, make sure objects are dependent on it
-  ifdef DEMO_NATIVECLASS
-$(DEMO_JAVAH_FILE): $(DEMO_JAR)
-	@$(prep-target)
-	$(JAVAH_CMD) -d $(DEMO_BUILD_SRCDIR) -classpath $(DEMO_JAR) \
-	    $(DEMO_NATIVECLASS)
-	@$(java-vm-cleanup)
-$(DEMO_FULL_OBJECTS): $(DEMO_JAVAH_FILE)
-  endif
-
-endif
-
-# Build involves populating the destination "src" tree, building the jar and
-#     native library, and creating a source bundle
-
-sources:  $(DEMO_FULL_SOURCES)
-	@$(ECHO) "Created $@"
-
-objects: 
-	@$(ECHO) "Created $@"
-
-# Why the nested make here? It only works this way, don't know why.
-bundles: $(DEMO_BUILD_SRCZIP)
-	$(RM) -r $(DEMO_DESTDIR)
-	$(MKDIR) -p $(DEMO_DESTDIR)
-	$(MAKE) $(DEMO_LIBRARY) $(DEMO_JAR) $(DEMO_SOURCE_ZIP) $(DEMO_DEST_TOPFILES)
-# Applets are special, no jar file, no src.zip, everything expanded.
-ifdef DEMO_IS_APPLET
-	@$(ECHO) "Expanding jar file into demos area at $(DEMO_DESTDIR)"
-	( $(CD) $(DEMO_DESTDIR) && \
-	  $(BOOT_JAR_CMD) -xfv $(DEMO_JAR_NAME) \
-	     $(BOOT_JAR_JFLAGS) && \
-	  $(RM) -r META-INF $(DEMO_JAR_NAME) && \
-	  $(java-vm-cleanup) )
-	@( $(CD) $(DEMO_DESTDIR) && $(java-vm-cleanup) )
-	@$(ECHO) "Expanding source into demos area at $(DEMO_DESTDIR)"
-	( $(CD) $(DEMO_DESTDIR) && $(UNZIP) -o src.zip && $(RM) src.zip )
-endif
-
-build: sources bundles
-
-# Printing out a demo information line
-define printDemoSetting
-if [ "$2" != "" ] ; then $(PRINTF) "%-20s %s\n" "$1:" "$2"; fi
-endef
-
-# Print out the demo information
-demo_info:
-	@$(ECHO) "========================================================="
-	@$(call printDemoSetting,DEMONAME,$(DEMONAME))
-	@$(call printDemoSetting,DEMO_ROOT,$(DEMO_ROOT))
-	@$(call printDemoSetting,DEMO_SRCDIR,$(DEMO_SRCDIR))
-	@$(call printDemoSetting,DEMO_DESTDIR,$(DEMO_DESTDIR))
-	@$(call printDemoSetting,DEMO_JAR,$(DEMO_JAR))
-	@$(call printDemoSetting,DEMO_MANIFEST_ATTR,$(DEMO_MANIFEST_ATTR))
-	@$(call printDemoSetting,DEMO_PSRCDIR,$(DEMO_PSRCDIR))
-	@$(call printDemoSetting,DEMO_EXTRA_SRCDIR,$(DEMO_EXTRA_SRCDIR))
-	@$(call printDemoSetting,DEMO_EXTRA_FILES,$(DEMO_EXTRA_FILES))
-	@$(call printDemoSetting,DEMO_TOPFILES,$(DEMO_TOPFILES))
-	@$(call printDemoSetting,DEMO_MAINCLASS,$(DEMO_MAINCLASS))
-	@$(call printDemoSetting,DEMO_DESCRIPTOR,$(DEMO_DESCRIPTOR))
-	@$(call printDemoSetting,DEMO_NATIVECLASS,$(DEMO_NATIVECLASS))
-	@$(call printDemoSetting,DEMO_LIBRARY,$(DEMO_LIBRARY))
-	@$(call printDemoSetting,DEMO_OBJECTS,$(DEMO_OBJECTS))
-	@$(call printDemoSetting,DEMO_SOURCE_ZIP,$(DEMO_SOURCE_ZIP))
-	@$(ECHO) "========================================================="
-
-# Clean rule
-clean clobber:
-	$(RM) -r $(DEMO_BUILD_AREA)
-	$(RM) -r $(DEMO_DESTDIR)
-
-# This should not be needed, but some versions of GNU make have a bug that
-#   sometimes deleted these files  for some strange  and unknown reason 
-#   (GNU make version 3.78.1 has the problem, GNU make version 3.80 doesn't?)
-.PRECIOUS: $(DEMO_FULL_SOURCES) $(DEMO_BUILD_SRCZIP) $(DEMO_SOURCE_ZIP)
-
-# List phony targets
-.PHONY: all build clean clobber demo_info \
-	sources bundles
-
--- a/jdk/makefiles/common/Library.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,326 +0,0 @@
-#
-# Copyright (c) 1995, 2011, 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.
-#
-
-#
-# Generic makefile for building shared libraries.
-#
-
-# WARNING: This file is shared with other workspaces.
-#          So when it includes other files, it must use JDK_TOPDIR.
-#
-
-include $(JDK_TOPDIR)/makefiles/common/Classes.gmk
-
-#
-# It is important to define these *after* including Classes.gmk
-# in order to override the values defined inthat makefile.
-#
-
-ifeq ($(LIBRARY), fdlibm)
-ifeq ($(PLATFORM),windows)
-ACTUAL_LIBRARY_NAME = $(LIB_PREFIX)$(LIBRARY).$(FDDLIBM_SUFFIX)
-ACTUAL_LIBRARY_DIR = $(OBJDIR)
-else # PLATFORM
-ACTUAL_LIBRARY_NAME = $(LIB_PREFIX)$(LIBRARY).$(ARCH).$(FDDLIBM_SUFFIX)
-ACTUAL_LIBRARY_DIR = $(OBJDIR)
-endif #PLATFORM
-else # LIBRARY
-ACTUAL_LIBRARY_NAME = $(LIB_PREFIX)$(LIBRARY).$(LIBRARY_SUFFIX)
-ACTUAL_LIBRARY_DIR = $(LIB_LOCATION)
-endif
-ACTUAL_LIBRARY = $(ACTUAL_LIBRARY_DIR)/$(ACTUAL_LIBRARY_NAME)
-
-library:: $(ACTUAL_LIBRARY)
-
-FILES_o   = $(patsubst %.c,   %.$(OBJECT_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_c))))
-FILES_o  += $(patsubst %.s,   %.$(OBJECT_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_s))))
-FILES_o  += $(patsubst %.cpp, %.$(OBJECT_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_cpp))))
-
-ifeq ($(PLATFORM), macosx)
-FILES_o  += $(patsubst %.m,   %.$(OBJECT_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_objc))))
-FILES_o  += $(patsubst %.mm,  %.$(OBJECT_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_objcpp))))
-
-INCREMENTAL_BUILD=false
-
-endif # PLATFORM
-
-ifeq ($(INCREMENTAL_BUILD),true)
-FILES_d   = $(patsubst %.c,   %.$(DEPEND_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_c))))
-FILES_d  += $(patsubst %.cpp, %.$(DEPEND_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_cpp))))
-endif # INCREMENTAL_BUILD
-
-ifeq ($(PLATFORM),solaris)
-# List of all lint files, one for each .c file (only for C)
-FILES_ln   = $(patsubst %.c,   %.$(LINT_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_c))))
-endif
-
-LINK.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) 
-LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) 
-
-#
-# C++ libraries must be linked with CC.
-#
-ifdef CPLUSPLUSLIBRARY
-LINKER=$(LINK.cc)
-else
-LINKER=$(LINK.c)
-endif
-
-$(ACTUAL_LIBRARY):: $(INIT) $(TEMPDIR) $(LIBDIR) $(BINDIR) $(EXTDIR) classheaders
-	@$(ECHO) Building lib:$(ACTUAL_LIBRARY) 
-#
-# COMPILE_APPROACH: Different approaches to compile up the native object
-#   files as quickly as possible.
-#   The setting of parallel works best on Unix, batch on Windows.
-#
-
-COMPILE_FILES_o = $(OBJDIR)/.files_compiled
-$(COMPILE_FILES_o): $(FILES_d) $(FILES_o)
-	@$(ECHO) "$<" >> $@
-clean::
-	$(RM) $(COMPILE_FILES_o)
-
-#
-# COMPILE_APPROACH=parallel: Will trigger compilations (just compilations) to
-#   happen in parallel. Greatly decreases Unix build time, even on single CPU
-#   machines, more so on multiple CPU machines. Default is 2 compiles
-#   at a time, but can be adjusted with ALT_PARALLEL_COMPILE_JOBS.
-#   Note that each .d file will also be dependent on it's .o file, see
-#   Rules.gmk.
-#   Note this does not depend on Rules.gmk to work like batch (below)
-#   and this technique doesn't seem to help Windows build time nor does
-#   it work very well, it's possible the Windows Visual Studio compilers
-#   don't work well in a parallel situation, this needs investigation.
-#
-
-ifeq ($(COMPILE_APPROACH),parallel)
-
-.PHONY: library_parallel_compile
-
-library_parallel_compile:
-	@$(ECHO) "Begin parallel compiles: $(shell $(PWD))"
-	$(MAKE) -j $(PARALLEL_COMPILE_JOBS) $(COMPILE_FILES_o)
-	@$(ECHO) "Done with parallel compiles: $(shell $(PWD))"
-
-$(ACTUAL_LIBRARY):: library_parallel_compile
-
-endif
-
-#
-# COMPILE_APPROACH=batch: Will trigger compilations (just compilations) to
-#   happen in batch mode. Greatly decreases Windows build time.
-#   See logic in Rules.gmk for how compiles happen, the $(MAKE) in
-#   library_batch_compile below triggers the actions in Rules.gmk.
-#   Note that each .d file will also be dependent on it's .o file, see
-#   Rules.gmk.
-#
-ifeq ($(COMPILE_APPROACH),batch)
-
-.PHONY: library_batch_compile
-
-library_batch_compile:
-	@$(ECHO) "Begin BATCH compiles: $(shell $(PWD))"
-	$(MAKE) $(COMPILE_FILES_o)
-	$(MAKE) batch_compile
-	@$(ECHO) "Done with BATCH compiles: $(shell $(PWD))"
-	$(MAKE) COMPILE_APPROACH=normal $(COMPILE_FILES_o)
-
-$(ACTUAL_LIBRARY):: library_batch_compile
-
-endif
-
-ifeq ($(PLATFORM), windows)
-
-#
-# Library building rules.
-#
-
-$(LIBRARY).lib:: $(OBJDIR)
-
-ifeq ($(LIBRARY), fdlibm)
-$(ACTUAL_LIBRARY):: $(OBJDIR)/$(LIBRARY).lib
-
-$(OBJDIR)/$(LIBRARY).lib:: $(OBJDIR)/$(LIBRARY).lcf
-	@$(prep-target)
-	$(AR) -NODEFAULTLIB:MSVCRT -out:$@ -nologo \
-		@$(OBJDIR)/$(LIBRARY).lcf $(OTHER_LCF) $(LDLIBS_COMMON)
-else # LIBRARY
-# build it into $(OBJDIR) so that the other generated files get put 
-# there, then copy just the DLL (and MAP file) to the requested directory.
-#
-$(ACTUAL_LIBRARY):: $(OBJDIR)/$(LIBRARY).lcf
-	@$(prep-target)
-	@$(MKDIR) -p $(OBJDIR)
-	$(LD) -dll -out:$(OBJDIR)/$(@F) \
-	  -map:$(OBJDIR)/$(LIBRARY).map \
-	  $(LFLAGS) @$(OBJDIR)/$(LIBRARY).lcf \
-	  $(OTHER_LCF) $(LDLIBS)
-	$(CP) $(OBJDIR)/$(@F) $@
-	@$(call binary_file_verification,$@)
-	$(CP) $(OBJDIR)/$(LIBRARY).map $(@D)
-	$(CP) $(OBJDIR)/$(LIBRARY).pdb $(@D)
-
-endif # LIBRARY
-
-$(OBJDIR)/$(LIBRARY).lcf: $(OBJDIR)/$(LIBRARY).res $(COMPILE_FILES_o) $(FILES_m)
-	@$(prep-target)
-	@$(MKDIR) -p $(TEMPDIR)
-	@$(ECHO) $(FILES_o) > $@ 
-ifndef LOCAL_RESOURCE_FILE
-	@$(ECHO) $(OBJDIR)/$(LIBRARY).res >> $@
-endif
-	@$(ECHO) Created $@ 
-
-# JDK name required here
-RC_FLAGS += /D "JDK_FNAME=$(LIBRARY).dll" \
-            /D "JDK_INTERNAL_NAME=$(LIBRARY)" \
-            /D "JDK_FTYPE=0x2L"
-
-$(OBJDIR)/$(LIBRARY).res: $(VERSIONINFO_RESOURCE)
-ifndef LOCAL_RESOURCE_FILE
-	@$(prep-target)
-	$(RC) $(RC_FLAGS) $(CC_OBJECT_OUTPUT_FLAG)$(@) $(VERSIONINFO_RESOURCE)
-endif
-
-#
-# Install a .lib file if required.
-#
-ifeq ($(INSTALL_DOT_LIB), true)
-$(ACTUAL_LIBRARY):: $(LIBDIR)/$(LIBRARY).lib
-
-clean:: 
-	-$(RM) $(LIBDIR)/$(LIBRARY).lib
-
-$(LIBDIR)/$(LIBRARY).lib:: $(OBJDIR)/$(LIBRARY).lib
-	$(install-file)
-
-$(LIBDIR)/$(LIBRARY).dll:: $(OBJDIR)/$(LIBRARY).dll
-	$(install-file)
-
-endif # INSTALL_DOT_LIB
-
-else # PLATFORM
-
-#
-# On Solaris, use mcs to write the version into the comment section of
-# the shared library.  On other platforms set this to false at the
-# make command line.
-#
-
-ifneq ($(PLATFORM), macosx)
-  ARFLAGS = -r
-endif
-
-$(ACTUAL_LIBRARY):: $(COMPILE_FILES_o) $(FILES_m) $(FILES_reorder)
-	@$(prep-target)
-	@$(ECHO) "STATS: LIBRARY=$(LIBRARY), PRODUCT=$(PRODUCT), OPTIMIZATION_LEVEL=$(OPTIMIZATION_LEVEL)"
-	@$(ECHO) "Rebuilding $@ because of $?"
-ifeq ($(LIBRARY), fdlibm)
-	$(AR) $(ARFLAGS) $@ $(FILES_o)
-else # LIBRARY
-	$(LINKER) $(SHARED_LIBRARY_FLAG) -o $@ $(FILES_o) $(LDLIBS)
-	@$(call binary_file_verification,$@)
-ifeq ($(WRITE_LIBVERSION),true)
-	$(MCS) -d -a "$(FULL_VERSION)" $@
-endif # WRITE_LIBVERSION
-endif # LIBRARY
-
-endif # PLATFORM
-
-#
-# Cross check all linted files against each other
-#
-ifeq ($(PLATFORM),solaris)
-lint.errors : $(FILES_ln)
-	$(LINT.c) $(FILES_ln) $(LDLIBS) 
-endif
-
-#
-# Class libraries with JNI native methods get a include to the package.
-#
-ifdef PACKAGE
-vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)
-vpath %.c $(SHARE_SRC)/native/$(PKGDIR)
-OTHER_INCLUDES += -I$(SHARE_SRC)/native/common -I$(PLATFORM_SRC)/native/common
-OTHER_INCLUDES += -I$(SHARE_SRC)/native/$(PKGDIR) \
-		  -I$(PLATFORM_SRC)/native/$(PKGDIR)
-endif
-
-#
-# Clean/clobber rules
-#
-clean::
-	$(RM) -r $(ACTUAL_LIBRARY)
-
-clobber:: clean
-
-#
-# INCREMENTAL_BUILD means that this workspace will be built over and over
-#   possibly incrementally. This means tracking the object file dependencies
-#   on include files so that sources get re-compiled when the include files
-#   change. When building from scratch and doing a one time build (like
-#   release engineering or nightly builds) set INCREMENTAL_BUILD=false.
-#
-
-ifeq ($(INCREMENTAL_BUILD),true)
-
-#
-# Workaround: gnumake sometimes says files is empty when it shouldn't
-#    was:  files := $(foreach file, $(wildcard $(OBJDIR)/*.$(DEPEND_SUFFIX)), $(file))
-#
-files := $(shell $(LS) $(OBJDIR)/*.$(DEPEND_SUFFIX) 2>/dev/null)
-
-#
-# Only include these files if we have any.
-#
-ifneq ($(strip $(files)),)
-
-include $(files)
-
-endif # files
-
-endif # INCREMENTAL_BUILD
-
-#
-# Default dependencies
-#
-
-all: build
-
-build: library
-
-debug:
-	$(MAKE) VARIANT=DBG build
-
-fastdebug:
-	$(MAKE) VARIANT=DBG FASTDEBUG=true build
-
-openjdk:
-	$(MAKE) OPENJDK=true build
-
-FORCE:
-
-.PHONY: all build debug fastdebug
-
--- a/jdk/makefiles/common/Mapfile-vers.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-#
-# Copyright (c) 1998, 2005, 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.
-#
-
-#
-# Makefile for linking with mapfiles.
-#
-# NOTE: Not using a mapfile will expose all your extern functions and
-#	extern data symbols as part of your interface, so unless your
-#	extern names are safe from being mistaken as names from other
-#	libraries, you better use a mapfile, or use a unique naming
-#	convention on all your extern symbols.
-#
-# The mapfile will establish versioning by defining the exported interface.
-#
-# The mapfile can also force certain .o files or elf sections into the 
-#   the different segments of the resulting library/program image.
-#
-# The macro FILES_m can contain any number of mapfiles.
-#
-
-# Always make sure 'all' is the default rule
-mapfile_default_rule: all
-
-ifeq ($(PLATFORM), solaris)
-
-ifeq ($(VARIANT), OPT)
-  # OPT build MUST have a mapfile?
-  ifndef FILES_m
-    FILES_m =        mapfile-vers
-  endif
-  
-  # If we are re-ordering functions in this solaris library, we need to make
-  # sure that -xF is added to the compile lines. This option is critical and
-  # enables the functions to be reordered.
-  ifdef FILES_reorder
-    CFLAGS_OPT   += -xF
-    CXXFLAGS_OPT += -xF
-  endif
-
-INIT += $(TEMPDIR)/mapfile-vers
-
-$(TEMPDIR)/mapfile-vers : $(FILES_m) $(FILES_reorder)
-	$(prep-target)
-	$(CAT) $(FILES_m) > $@
-  ifdef FILES_reorder
-	$(SED) -e 's=OUTPUTDIR=$(OUTPUTDIR)=' $(FILES_reorder) >> $@
-  endif
-endif # VARIANT
-
-ifndef LDNOMAP
-  LDMAPFLAGS_OPT =  -M$(TEMPDIR)/mapfile-vers
-  LDMAPFLAGS_DBG =  $(FILES_m:%=-M%)
-endif
-
-endif # PLATFORM
-
-ifeq ($(PLATFORM), linux)
-
-ifeq ($(VARIANT), OPT)
-  # OPT build MUST have a mapfile?
-  ifndef FILES_m
-    FILES_m =        mapfile-vers
-  endif
-endif # VARIANT
-
-ifndef LDNOMAP
-  LDMAPFLAGS_OPT =  $(FILES_m:%=-Xlinker -version-script=%)
-  LDMAPFLAGS_DBG =  $(FILES_m:%=-Xlinker -version-script=%)
-endif
-
-endif # PLATFORM
-  
-LDFLAGS_OPT +=  $(LDMAPFLAGS_OPT)
-LDFLAGS_DBG +=  $(LDMAPFLAGS_DBG)
-
--- a/jdk/makefiles/common/Modules.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,479 +0,0 @@
-#
-# Copyright (c) 2009, 2010, 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.
-#
-
-JDK_MODULE_IMAGE_DIR = $(ABS_OUTPUTDIR)/jdk-module-image
-JRE_MODULE_IMAGE_DIR = $(ABS_OUTPUTDIR)/jre-module-image
-
-#
-# modules   Target to build jdk and jre module image
-#
-#           There is one jar file per module containing classes only.
-#           All module jars are currently placed under jre/lib directory.
-#
-# Open issues that need further investigation:
-# 1. Classes in jre/lib/ext/dnsns.jar are currently put in jre/lib/jndi-dns
-#    module.  META-INF/services file is not installed.
-# 2. Signed jars
-#    For JDK build, signed jars are copied to the build.
-#    All jars in the module image are unsigned.
-
-MODULE_IMAGEBINDIR = bin
-
-#
-# Targets.
-#
-INITIAL_MODULE_IMAGE_JRE=initial-module-image-jre
-INITIAL_MODULE_IMAGE_JDK=initial-module-image-jdk
-ifeq ($(PLATFORM), solaris)
-  ifeq ($(ARCH_DATA_MODEL), 64)
-    INITIAL_MODULE_IMAGE_JRE=initial-module-image-jre-sol64
-    INITIAL_MODULE_IMAGE_JDK=initial-module-image-jdk-sol64
-  endif
-endif
-
-modules modules-clobber \
-initial-module-image-jre initial-module-image-jdk \
-initial-module-image-jre-sol64 initial-module-image-jdk-sol64 \
-trim-module-image-jre trim-module-image-jdk \
-process-module-image-jre process-module-image-jdk ::
-	@$(ECHO) ">>>Making "$@" @ `$(DATE)` ..."
-
-# Order is important here, trim jre after jdk image is created
-modules:: gen-modules \
-	 $(INITIAL_MODULE_IMAGE_JRE) $(INITIAL_MODULE_IMAGE_JDK) \
-	 trim-module-image-jre trim-module-image-jdk \
-	 process-module-image-jre process-module-image-jdk
-
-# Don't use these
-module-image-jre:: initial-module-image-jre trim-module-image-jre process-module-image-jre
-module-image-jdk:: initial-module-image-jdk trim-module-image-jdk process-module-image-jdk
-
-#
-# Paths to these files we need
-JDK_MODULE_LICENSES   = $(LICENSE_DOCLIST_JDK:%=$(JDK_MODULE_IMAGE_DIR)/%)
-JDK_MODULE_64_LICENSES = $(LICENSE_DOCLIST_JDK:%=$(JDK_MODULE_IMAGE_DIR)/%64)
-JDK_MODULE_DOCFILES   = $(OTHER_DOCLIST_JDK:%=$(JDK_MODULE_IMAGE_DIR)/%)
-
-JRE_MODULE_LICENSES   = $(LICENSE_DOCLIST_JRE:%=$(JRE_MODULE_IMAGE_DIR)/%)
-JRE_MODULE_64_LICENSES = $(LICENSE_DOCLIST_JRE:%=$(JRE_MODULE_IMAGE_DIR)/%64)
-JRE_MODULE_DOCFILES   = $(OTHER_DOCLIST_JRE:%=$(JRE_MODULE_IMAGE_DIR)/%)
-JRE_MODULE_DOCFILES  += $(JRE_NAMECHANGE_DOCLIST:%=$(JRE_MODULE_IMAGE_DIR)/%$(TEXT_SUFFIX))
-
-###### RULES
-
-# JDK files
-$(JDK_MODULE_IMAGE_DIR)/%: $(SHARE_JDK_DOC_SRC)/%
-	$(process-doc-file)
-# Removes LICENSE_VERSION or not
-ifdef LICENSE_VERSION
-$(JDK_MODULE_IMAGE_DIR)/%: $(SHARE_JDK_DOC_SRC)/%$(LICENSE_VERSION)
-	$(process-doc-file)
-$(JDK_MODULE_IMAGE_DIR)/%64: $(SHARE_JDK_DOC_SRC)/%$(LICENSE_VERSION)
-	$(process-doc-file)
-else
-$(JDK_MODULE_IMAGE_DIR)/%64: $(SHARE_JDK_DOC_SRC)/%
-	$(process-doc-file)
-endif
-
-# JRE files 
-$(JRE_MODULE_IMAGE_DIR)/%: $(SHARE_JRE_DOC_SRC)/%
-	$(process-doc-file)
-# Add $(TEXT_SUFFIX) suffix
-ifdef TEXT_SUFFIX
-$(JRE_MODULE_IMAGE_DIR)/%$(TEXT_SUFFIX): $(SHARE_JRE_DOC_SRC)/%
-	$(process-doc-file)
-endif
-# Removes LICENSE_VERSION or not
-ifdef LICENSE_VERSION
-$(JRE_MODULE_IMAGE_DIR)/%: $(SHARE_JRE_DOC_SRC)/%$(LICENSE_VERSION)
-	$(process-doc-file)
-$(JRE_MODULE_IMAGE_DIR)/%64: $(SHARE_JRE_DOC_SRC)/%$(LICENSE_VERSION)
-	$(process-doc-file)
-else
-$(JRE_MODULE_IMAGE_DIR)/%64: $(SHARE_JRE_DOC_SRC)/%
-	$(process-doc-file)
-endif
-
-######################################################
-# JRE Image
-######################################################
-
-MODULES_LIST = $(MODULES_TEMPDIR)/classlist/modules.list
-
-# Modules in the jre/lib/security directory
-POLICY_MODULES = US_export_policy local_policy
-
-# Modules in the modules/ext directory
-EXT_MODULES = localedata security-sunec security-sunjce
-
-# Build PKCS#11 on all platforms except 64-bit Windows.
-PKCS11 = security-sunpkcs11
-ifeq ($(ARCH_DATA_MODEL), 64)
-  ifeq ($(PLATFORM), windows)
-    PKCS11 =
-  endif
-endif
-
-EXT_MODULES += $(PKCS11)
-
-# Build Microsoft CryptoAPI provider only on (non-64-bit) Windows platform.
-ifeq ($(PLATFORM), windows)
-  ifneq ($(ARCH_DATA_MODEL), 64)
-    EXT_MODULES += security-sunmscapi
-  endif
-endif
-
-# Modules for JDK only
-JDK_MODULES = tools
-
-gen-modules:
-	$(CD) modules; $(MAKE) all
-
-initial-module-image-jre-setup:
-	$(RM) -r $(JRE_MODULE_IMAGE_DIR)
-	$(MKDIR) -p $(JRE_MODULE_IMAGE_DIR)
-
-# 64-bit solaris jre image contains only the 64-bit add-on files.
-initial-module-image-jre-sol64:: initial-module-image-jre-setup \
-			  $(JRE_MODULE_LICENSES) $(JRE_MODULE_64_LICENSES)
-	@# Use tar instead of cp to preserve the symbolic links
-	for dir in bin lib ; do \
-	  ( $(CD) $(OUTPUTDIR) && \
-		$(TAR) cf - `$(FIND) $$dir -name '$(ARCH)' -print` | \
-		($(CD) $(JRE_MODULE_IMAGE_DIR) && $(TAR) xf -) ) ; \
-	done
-	@# Remove some files from the jre area
-	for t in $(NOTJRETOOLS) ; do \
-	    $(RM) $(JRE_MODULE_IMAGE_DIR)/bin$(ISA_DIR)/$$t ; \
-	done
-	$(RM) `$(FIND) $(JRE_MODULE_IMAGE_DIR)/lib -name 'orb.idl'`
-	$(RM) `$(FIND) $(JRE_MODULE_IMAGE_DIR)/lib -name 'ir.idl'`
-
-# Construct an initial jre image (initial jdk jre) no trimming or stripping
-initial-module-image-jre:: initial-module-image-jre-setup \
-		    $(JRE_LICENSES) $(JRE_MODULE_DOCFILES) \
-		    $(BUILDMETAINDEX_JARFILE)
-	@# Copy in bin directory
-	$(CD) $(OUTPUTDIR) && $(FIND) bin -depth | $(CPIO) -pdum $(JRE_MODULE_IMAGE_DIR)
-	@# CTE plugin security change require new empty directory lib/applet
-	$(MKDIR) -p $(JRE_MODULE_IMAGE_DIR)/lib/applet
-	@# Copy files but not .jar in lib directory 
-	$(CD) $(OUTPUTDIR) && $(FIND) lib -depth | $(EGREP) -v ".jar$$" | $(CPIO) -pdum $(JRE_MODULE_IMAGE_DIR)
-	@#
-	@# copy modules to jre/lib
-	@#
-	for m in `$(NAWK) '{print $$1}' $(MODULES_LIST)` ; do \
-	    $(CP) $(MODULES_DIR)/$$m/lib/$$m.jar $(JRE_MODULE_IMAGE_DIR)/lib ; \
-	done
-	$(MKDIR) -p $(JRE_MODULE_IMAGE_DIR)/lib/ext
-	for m in $(EXT_MODULES) ; do \
-           $(MV) $(JRE_MODULE_IMAGE_DIR)/lib/$$m.jar $(JRE_MODULE_IMAGE_DIR)/lib/ext ; \
-        done
-	for m in $(POLICY_MODULES) ; do \
-           $(MV) $(JRE_MODULE_IMAGE_DIR)/lib/$$m.jar $(JRE_MODULE_IMAGE_DIR)/lib/security; \
-        done
-	@# Remove jdk modules
-	for m in $(JDK_MODULES) ; do \
-           $(RM) $(JRE_MODULE_IMAGE_DIR)/lib/$$m.jar ; \
-        done
-
-	@# Make sure all directories are read/execute for everyone
-	$(CHMOD) a+rx `$(FIND) $(JRE_MODULE_IMAGE_DIR) -type d`
-	@# Remove some files from the jre area
-	for t in $(NOTJRETOOLS) ; do \
-	    $(RM) $(JRE_MODULE_IMAGE_DIR)/bin$(ISA_DIR)/$$t ; \
-	done
-	@# Remove orb.idl and ir.idl from jre
-	$(FIND) $(JRE_MODULE_IMAGE_DIR)/lib -name 'orb.idl' -exec $(RM) \{} \;
-	$(FIND) $(JRE_MODULE_IMAGE_DIR)/lib -name 'ir.idl' -exec $(RM) \{} \;
-	@# Generate meta-index to make boot and extension class loaders lazier
-	$(CD) $(JRE_MODULE_IMAGE_DIR)/lib && \
-	    $(BOOT_JAVA_CMD) -jar $(BUILDMETAINDEX_JARFILE) \
-		-o meta-index *.jar
-	@$(CD) $(JRE_MODULE_IMAGE_DIR)/lib && $(java-vm-cleanup)
-	$(CD) $(JRE_MODULE_IMAGE_DIR)/lib/ext && \
-	    $(BOOT_JAVA_CMD) -jar $(BUILDMETAINDEX_JARFILE) \
-		-o meta-index *.jar
-	@$(CD) $(JRE_MODULE_IMAGE_DIR)/lib/ext && $(java-vm-cleanup)
-ifeq ($(PLATFORM), windows)
-	@# Remove certain *.lib files
-	$(CD) $(JRE_MODULE_IMAGE_DIR)/lib && \
-            $(RM) java.$(LIB_SUFFIX) jvm.$(LIB_SUFFIX) \
-                  hpi.$(LIB_SUFFIX) awt.$(LIB_SUFFIX) jawt.$(LIB_SUFFIX)
-  ifeq ($(ARCH_DATA_MODEL), 32)
-	@# The Java Kernel JRE image ships with a special VM.  It is not included
-	@# in the full JRE image, so remove it.  Also, is it only for 32-bit windows.
-	$(CD) $(JRE_MODULE_IMAGE_DIR)/bin && $(RM) -r kernel
-  endif
-endif # Windows
-ifneq ($(PLATFORM), windows)
-	$(call copy-man-pages,$(JRE_MODULE_IMAGE_DIR),$(JRE_MAN_PAGES))
-endif # !windows
-
-# Trim out any extra files not for the jre shipment but wanted in the jdk jre.
-#   (Note the jdk WILL want the jre image before this trimming)
-#   Removes server VM on Windows 32bit.
-#   Remove certain shared libraries that should not be in the jre image
-#      but should be in the jdk jre image.
-trim-module-image-jre::
-ifeq ($(PLATFORM), windows)
-  ifeq ($(ARCH_DATA_MODEL), 32)
-	$(RM) -r $(JRE_MODULE_IMAGE_DIR)/bin/server
-  endif
-  ifdef NOTJRE_SHARED_LIBS
-	for l in $(NOTJRE_SHARED_LIBS) ; do \
-	    $(RM) $(JRE_MODULE_IMAGE_DIR)/bin/$$l ; \
-	done ;
-  endif
-else # PLATFORM
-  ifdef NOTJRE_SHARED_LIBS
-	for l in $(NOTJRE_SHARED_LIBS) ; do \
-	    $(RM) $(JRE_MODULE_IMAGE_DIR)/lib/$(LIBARCH)/$$l ; \
-	done ;
-  endif
-endif # PLATFORM
-
-# Get list of all Elf files in the jre
-JRE_MODULE_ELF_LIST=$(MODULES_TEMPDIR)/jre-elf-files.list
-$(JRE_MODULE_ELF_LIST):
-	@$(prep-target)
-ifneq ($(PLATFORM), windows)
-	$(RM) $@
-	$(FIND) $(JRE_MODULE_IMAGE_DIR)/lib -type f -name \*.$(LIB_SUFFIX) >> $@
-	$(FILE) `$(FIND) $(JRE_MODULE_IMAGE_DIR)/bin -type f -name \*$(EXE_SUFFIX)` \
-	    | $(EGREP) 'ELF' | $(CUT) -d':' -f1 >> $@
-endif
-
-# Post process the image (strips and mcs on Elf files we are shipping)
-#   (Note the jdk WILL want the jre image before this processing)
-process-module-image-jre:: $(JRE_MODULE_ELF_LIST)
-ifneq ($(POST_STRIP_PROCESS), )
-	for f in `$(CAT) $(JRE_MODULE_ELF_LIST)`; do \
-	  $(CHMOD) u+w $${f}; \
-	  $(ECHO) $(POST_STRIP_PROCESS) $${f}; \
-	  $(POST_STRIP_PROCESS) $${f}; \
-	  $(CHMOD) go-w $${f}; \
-	done
-endif
-ifneq ($(POST_MCS_PROCESS), )
-	for f in `$(CAT) $(JRE_MODULE_ELF_LIST)`; do \
-	  $(CHMOD) u+w $${f}; \
-	  $(ECHO) $(POST_MCS_PROCESS) $${f}; \
-	  $(POST_MCS_PROCESS) $${f}; \
-	  $(CHMOD) go-w $${f}; \
-	done
-endif
-	$(RM) $(JRE_MODULE_ELF_LIST)
-
-######################################################
-# JDK Image
-######################################################
-# Note: cpio ($(CPIO)) sometimes leaves directories without rx access.
-
-initial-module-image-jdk-setup:
-	$(RM) -r $(JDK_MODULE_IMAGE_DIR)
-	$(MKDIR) -p $(JDK_MODULE_IMAGE_DIR)/jre
-	($(CD) $(JRE_MODULE_IMAGE_DIR) && $(FIND) . -depth -print \
-	      | $(CPIO) -pdum $(JDK_MODULE_IMAGE_DIR)/jre )
-	$(RM) -rf $(JDK_MODULE_IMAGE_DIR)/jre/man
-	$(CHMOD) a+rx `$(FIND) $(JDK_MODULE_IMAGE_DIR) -type d`
-
-initial-module-image-jdk64-bindemos:
-	for dir in bin demo ; do \
-	  ( $(CD) $(OUTPUTDIR) && \
-		$(TAR) cf - `$(FIND) $$dir -name '$(LIBARCH)' -print` | \
-		($(CD) $(JDK_MODULE_IMAGE_DIR) && $(TAR) xf -) ) ; \
-        done
-
-# Solaris 64 bit image is special
-initial-module-image-jdk-sol64:: initial-module-image-jdk-setup \
-			  initial-module-image-jdk64-bindemos \
-			  $(JDK_MODULE_LICENSES) $(JDK_MODULARLIZED_64_LICENSES)
-
-# DB files to add
-ifeq ($(OPENJDK),true)
-
-initial-module-image-jdk-db:
-
-else
-
-# Create the list of db *.zip files to bundle with jdk
-ABS_DB_PATH  :=$(call FullPath,$(CLOSED_SHARE_SRC)/db)
-DB_ZIP_LIST = $(shell $(LS) $(ABS_DB_PATH)/*.zip 2>/dev/null)
-
-initial-module-image-jdk-db: $(DB_ZIP_LIST)
-	$(MKDIR) -p $(JDK_MODULE_IMAGE_DIR)/db
-	for d in $(DB_ZIP_LIST); do \
-          ($(CD) $(JDK_MODULE_IMAGE_DIR)/db && $(UNZIP) -o $$d); \
-	done
-
-endif
-
-# Standard jdk image
-initial-module-image-jdk:: initial-module-image-jdk-setup \
-		    initial-module-image-jdk-db \
-		    $(JDK_MODULE_LICENSES) $(JDK_MODULE_DOCFILES)
-	$(MKDIR) $(JDK_MODULE_IMAGE_DIR)/lib
-	@#
-	@# copy jdk modules to jdk/lib
-	@#
-	$(MKDIR) -p $(JDK_MODULE_IMAGE_DIR)/lib
-	for m in $(JDK_MODULES) ; do \
-	    $(CP) $(MODULES_DIR)/$$m/lib/$$m.jar $(JDK_MODULE_IMAGE_DIR)/lib ; \
-        done
-  ifeq ($(PLATFORM), windows)
-	@#
-	@# lib/
-	@#
-	$(CP) $(LIBDIR)/$(LIB_PREFIX)jvm.$(LIB_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/lib
-	$(CP) $(LIBDIR)/$(LIB_PREFIX)jawt.$(LIB_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/lib
-	@#
-	@# bin/
-	@#
-	@# copy all EXE files and only certain DLL files from BINDIR
-	$(MKDIR) -p $(JDK_MODULE_IMAGE_DIR)/bin
-	$(CP) $(BINDIR)/*$(EXE_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/bin
-	$(CP) $(BINDIR)/jli.$(LIBRARY_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/bin
-    ifeq ($(COMPILER_VERSION), VS2010)
-	$(CP) $(BINDIR)/msvc*100.$(LIBRARY_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/bin
-    endif
-    ifeq ($(ARCH_DATA_MODEL), 32)
-      ifeq ($(COMPILER_VERSION), VS2003)
-	$(CP) $(BINDIR)/msvc*71.$(LIBRARY_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/bin
-      endif
-    endif
-  else # PLATFORM
-	@#
-	@# bin/
-	@#
-	($(CD) $(BINDIR)/.. && $(TAR) cf - \
-	    `$(FIND) bin \( -type f -o -type l \) -print `) | \
-	    ($(CD) $(JDK_MODULE_IMAGE_DIR) && $(TAR) xf -)
-  endif # PLATFORM
-	@#
-	@# lib/ct.sym
-	@#
-	$(MKDIR) -p $(OUTPUTDIR)/symbols/META-INF/sym
-	$(JAVAC_CMD) -XDprocess.packages -proc:only \
-	    -processor com.sun.tools.javac.sym.CreateSymbols \
-	    -Acom.sun.tools.javac.sym.Jar=$(RT_JAR) \
-	    -Acom.sun.tools.javac.sym.Dest=$(OUTPUTDIR)/symbols/META-INF/sym/rt.jar \
-	    $(CORE_PKGS) $(NON_CORE_PKGS) $(EXCLUDE_PROPWARN_PKGS)
-	$(BOOT_JAR_CMD) c0f $(LIBDIR)/ct.sym \
-	    -C $(OUTPUTDIR)/symbols META-INF $(BOOT_JAR_JFLAGS)
-	@$(java-vm-cleanup)
-	$(CP) $(LIBDIR)/ct.sym $(JDK_MODULE_IMAGE_DIR)/lib/ct.sym
-	@#
-	@# CORBA supported orb.idl and ir.idl should be copied to lib
-	@#
-	$(CP) $(LIBDIR)/orb.idl $(JDK_MODULE_IMAGE_DIR)/lib/orb.idl
-	$(CP) $(LIBDIR)/ir.idl $(JDK_MODULE_IMAGE_DIR)/lib/ir.idl
-  ifeq ($(PLATFORM), linux)
-	@#
-	@# on Linux copy jexec from jre/lib to /lib
-	@#
-	$(CP) $(LIBDIR)/jexec $(JDK_MODULE_IMAGE_DIR)/lib/jexec
-  endif # PLATFORM
-	@#
-	@# demo, include
-	@#
-	$(CP) -r -f $(DEMODIR) $(JDK_MODULE_IMAGE_DIR)
-	$(CP) -r -f $(SAMPLEDIR) $(JDK_MODULE_IMAGE_DIR)
-	$(CP) -r $(INCLUDEDIR) $(JDK_MODULE_IMAGE_DIR)
-	@#
-	@# Swing BeanInfo generation
-	@#
-	$(CD) javax/swing/beaninfo && $(MAKE) JDK_IMAGE_DIR=$(JDK_MODULE_IMAGE_DIR) swing-1.2-beans
-ifneq ($(PLATFORM), windows)
-	$(call copy-man-pages,$(JDK_MODULE_IMAGE_DIR),$(JDK_MAN_PAGES))
-endif # !windows
-
-# Trim out files we don't want to ship
-trim-module-image-jdk::
-	@# Remove tools that should not be part of SDK.
-	for t in $(NOTJDKTOOLS); do \
-	    $(RM) $(JDK_MODULE_IMAGE_DIR)/bin/$${t}$(EXE_SUFFIX) \
-		  $(JDK_MODULE_IMAGE_DIR)/bin/*/native_threads/$${t}$(EXE_SUFFIX); \
-	done
-
-# Get list of Elf files in the jdk
-JDK_MODULE_ELF_LIST=$(MODULES_TEMPDIR)/jdk-elf-files.list
-$(JDK_MODULE_ELF_LIST):
-	@$(prep-target)
-ifneq ($(PLATFORM), windows)
-	$(RM) $@
-	$(FIND) $(JDK_MODULE_IMAGE_DIR)/jre/lib -type f -name \*.$(LIB_SUFFIX) >> $@
-	$(FILE) `$(FIND) $(JDK_MODULE_IMAGE_DIR)/jre/bin -type f -name \*$(EXE_SUFFIX)` \
-	    | $(EGREP) 'ELF' | $(CUT) -d':' -f1 >> $@
-	file `$(FIND) $(JDK_MODULE_IMAGE_DIR)/bin -type f -name \*$(EXE_SUFFIX)` \
-	    | $(EGREP) 'ELF' | $(CUT) -d':' -f1 >> $@
-endif
-
-# Post process the image (strips and mcs on files we are shipping)
-process-module-image-jdk:: $(JDK_MODULE_ELF_LIST)
-ifneq ($(POST_STRIP_PROCESS), )
-	for f in `$(CAT) $(JDK_MODULE_ELF_LIST)`; do \
-	  $(CHMOD) u+w $${f}; \
-	  $(ECHO) $(POST_STRIP_PROCESS) $${f}; \
-	  $(POST_STRIP_PROCESS) $${f}; \
-	  $(CHMOD) go-w $${f}; \
-	done
-endif
-ifneq ($(POST_MCS_PROCESS), )
-	for f in `$(CAT) $(JDK_MODULE_ELF_LIST)`; do \
-	  $(CHMOD) u+w $${f}; \
-	  $(ECHO) $(POST_MCS_PROCESS) $${f}; \
-	  $(POST_MCS_PROCESS) $${f}; \
-	  $(CHMOD) go-w $${f}; \
-	done
-endif
-	$(RM) $(JDK_MODULE_ELF_LIST)
-
-######################################################
-# clobber
-######################################################
-modules-clobber::
-	$(RM) -r $(JDK_MODULE_IMAGE_DIR)
-	$(RM) -r $(JRE_MODULE_IMAGE_DIR)
-
-modules modules-clobber::
-	@$(ECHO) ">>>Finished making "$@" @ `$(DATE)` ..."
-	@$(java-vm-cleanup)
-
-.PHONY: modules module-image-jre module-image-jdk \
-	initial-module-image-jre initial-module-image-jdk \
-	initial-module-image-jre-sol64 initial-module-image-jdk-sol64 \
-        initial-module-image-jdk-setup \
-	initial-module-image-jdk-db \
-        initial-module-image-jdk64-bindemos \
-        initial-module-image-jre-setup \
-	trim-module-image-jre trim-module-image-jdk \
-	process-module-image-jre process-module-image-jdk \
-	install-previous-jre install-previous-jdk \
-	modules-clobber
-
-# Force rule
-FRC:
-
--- a/jdk/makefiles/common/Program.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,319 +0,0 @@
-#
-# Copyright (c) 1995, 2011, 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.
-#
-
-#
-# Generic makefile for building executables.
-#
-
-# WARNING: This file is shared with other workspaces.
-#          So when it includes other files, it must use JDK_TOPDIR.
-#
-
-#
-# If building programs, use a normal compile approach
-#
-ifeq ($(COMPILE_APPROACH),batch)
-  override COMPILE_APPROACH = normal
-endif
-
-# set the platform specific directory for macosx, also this platform shares
-# substantial family ties with its siblings (solaris and linux), thus we add
-# solaris src path to its compilation dependencies.
-ifeq ($(PLATFORM), macosx)
-  LAUNCHER_PLATFORM_SRC = $(BUILDDIR)/../src/macosx
-  LAUNCHER_SOLARIS_PLATFORM_SRC  = $(BUILDDIR)/../src/solaris
-else
-  LAUNCHER_PLATFORM_SRC = $(PLATFORM_SRC)
-endif
-
-ifndef LAUNCHER_SHARE_SRC
-  LAUNCHER_SHARE_SRC = $(SHARE_SRC)
-endif
-
-ACTUAL_PROGRAM_NAME = $(PROGRAM)$(EXE_SUFFIX)
-ACTUAL_PROGRAM_DIR  = $(BINDIR)
-ACTUAL_PROGRAM      = $(ACTUAL_PROGRAM_DIR)/$(ACTUAL_PROGRAM_NAME)
-
-# Make sure the default rule is all
-program_default_rule: all
-
-program: $(ACTUAL_PROGRAM)
-
-# Work-around for missing processor specific mapfiles
-ifndef CROSS_COMPILE_ARCH
-  # reuse the mapfiles in the launcher's directory, the same should
-  # be applicable to the tool launchers as well.
-  FILES_m = $(BUILDDIR)/java/main/java/mapfile-$(ARCH)
-  include $(BUILDDIR)/common/Mapfile-vers.gmk
-endif
-
-include $(JDK_TOPDIR)/makefiles/common/Rules.gmk
-
-ifdef NEVER_ACT_AS_SERVER_CLASS_MACHINE
-  OTHER_CPPFLAGS += -DNEVER_ACT_AS_SERVER_CLASS_MACHINE
-endif
-
-#
-# Create a dependency on libjli (Java Launcher Infrastructure)
-#
-# On UNIX, this is a relative dependency using $ORIGIN. Unfortunately, to
-# do this reliably on Linux takes a different syntax than Solaris.
-#
-# On Windows, this is done by using the same directory as the executable
-# itself, as with all the Windows libraries.
-#
-ifeq ($(PLATFORM), macosx)
-  ifneq ($(ARCH), universal)
-    LDFLAGS += -Wl,-all_load
-  endif
-  LDFLAGS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/libjli.a
-
-  ifeq ($(SYSTEM_ZLIB),true)
-    OTHER_LDLIBS += -lz
-  endif
-endif
-
-ifneq (,$(findstring $(PLATFORM), linux solaris)) # UNIX systems
-  LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli
-  OTHER_LDLIBS += -ljli
-  ifeq ($(PLATFORM), solaris)
-    ifeq ($(ARCH_DATA_MODEL), 32)
-      LDFLAGS += -R \$$ORIGIN/../lib/$(LIBARCH)/jli
-      LDFLAGS += -R \$$ORIGIN/../jre/lib/$(LIBARCH)/jli
-    else
-      LDFLAGS += -R \$$ORIGIN/../../lib/$(LIBARCH)/jli
-      LDFLAGS += -R \$$ORIGIN/../../jre/lib/$(LIBARCH)/jli
-    endif
-  endif
-  ifeq ($(PLATFORM), linux)
-    LDFLAGS += $(LDFLAG_Z_ORIGIN)
-    LDFLAGS += -Wl,--allow-shlib-undefined
-    LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../lib/$(LIBARCH)/jli
-    LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../jre/lib/$(LIBARCH)/jli
-  endif
-endif
-
-ifeq ($(PLATFORM), windows)
-  JLI_LCF = $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/jli.lcf
-  ifdef STATIC_JLI
-    LDFLAGS += -libpath:$(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static
-  else
-    LDFLAGS += -libpath:$(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)
-  endif
-  OTHER_LDLIBS += jli.lib
-endif
-
-#
-# Launcher specific files.
-#
-FILES_o = $(OBJDIR)/main.$(OBJECT_SUFFIX)
-
-$(ACTUAL_PROGRAM):: classes $(INIT) 
-
-#
-# Windows only
-#
-ifeq ($(PLATFORM), windows)
-  # JDK name required here
-  RC_FLAGS += /D "JDK_FNAME=$(PROGRAM)$(EXE_SUFFIX)" \
-              /D "JDK_INTERNAL_NAME=$(PROGRAM)" \
-              /D "JDK_FTYPE=0x1L"
-
-  $(OBJDIR)/$(PROGRAM).res: $(VERSIONINFO_RESOURCE)
-	@$(prep-target)
-  ifndef LOCAL_RESOURCE_FILE
-	$(RC) $(RC_FLAGS) $(CC_OBJECT_OUTPUT_FLAG)$(@) $(VERSIONINFO_RESOURCE)
-  endif
-
-  $(OBJDIR)/$(PROGRAM).lcf: $(OBJDIR)/$(PROGRAM).res $(FILES_o)
-	@$(prep-target)
-	@$(ECHO) $(FILES_o) > $@ 
-  ifndef LOCAL_RESOURCE_FILE
-	@$(ECHO) $(OBJDIR)/$(PROGRAM).res >> $@
-  endif
-	@$(ECHO) setargv.obj >> $@
-	@$(ECHO) Created $@ 
-
-  $(ACTUAL_PROGRAM):: $(OBJDIR)/$(PROGRAM)$(EXE_SUFFIX)
-	@$(install-file)
-
-  ifeq ($(ARCH_DATA_MODEL), 32)
-    STACK_SIZE=327680
-  else
-    # We need more Stack for Windows 64bit
-    STACK_SIZE=1048576
-  endif
-
-  IMVERSION=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VER).$(COOKED_BUILD_NUMBER)
-  $(OBJDIR)/$(PROGRAM).exe.manifest: $(JDK_TOPDIR)/src/windows/resource/java.manifest
-	@$(prep-target)
-	$(SED) 's%IMVERSION%$(IMVERSION)%g;s%PROGRAM%$(PROGRAM)%g' $< > $@
-
-  # We used a hand-crafted manifest file for all executables.
-  # It is tweaked to embed the build number and executable name.
-  # Use ";#2" for .dll and ";#1" for .exe in the MT command below:
-  $(OBJDIR)/$(PROGRAM)$(EXE_SUFFIX):: $(OBJDIR)/$(PROGRAM).lcf $(FILES_o) $(JLI_LCF) $(OBJDIR)/$(PROGRAM).exe.manifest
-	@$(prep-target)
-	@set -- $?; \
-	    $(ECHO) Rebuilding $@ because of $$1 $$2 $$3 $$4 $$5 $$6 $${7:+...};
-	$(LD) -out:$@ /STACK:$(STACK_SIZE) \
-	    -map:$(OBJDIR)/$(PROGRAM).map $(LFLAGS) $(LDFLAGS) \
-	    @$(OBJDIR)/$(PROGRAM).lcf $(LDLIBS)
-  ifdef MT
-	$(MT) /manifest $(OBJDIR)/$(PROGRAM).exe.manifest /outputresource:$@;#1
-  endif
-	@$(call binary_file_verification,$@)
-else
-  #
-  # Note that we have to link -lthread even when USE_PTHREADS is true.
-  # This is becuase checkForCorrectLibthread() croaks otherwise.
-  #
-  LIBTHREAD = -lthread
-  ifeq ($(USE_PTHREADS),true)
-    THREADLIBS = -lpthread $(LIBTHREAD)
-  else
-    THREADLIBS = $(LIBTHREAD)
-  endif
-
-  ifeq ($(PLATFORM), macosx)
-    THREADLIBS = -pthread
-    # Needed for linking the various launchers
-    LDFLAGS += -framework Cocoa -framework Security \
-               -framework ApplicationServices
-    OTHER_CPPFLAGS += -DPACKAGE_PATH='"$(PACKAGE_PATH)"'
-
-    # Default Info.plist file for the command line tools. This gets overridden by
-    # some of the jvmstat tools so that they have task_for_pid() privileges
-    ifndef INFO_PLIST_FILE
-      INFO_PLIST_FILE = Info-cmdline.plist
-    endif
-    LDFLAGS += -sectcreate __TEXT __info_plist $(LAUNCHER_PLATFORM_SRC)/lib/$(INFO_PLIST_FILE)
-  else 
-    INFO_PLIST_FILE=
-  endif
-
-  #
-  # This rule only applies on unix.  It supports quantify and its ilk.
-  #
-  $(ACTUAL_PROGRAM):: $(FILES_o)
-	@$(prep-target)
-	@set -- $?; \
-	$(ECHO) Rebuilding $@ because of $$1 $$2 $$3 $$4 $$5 $$6 $${7:+...};
-	@$(MKDIR) -p $(TEMPDIR)
-	$(LINK_PRE_CMD) $(CC) $(CC_OBJECT_OUTPUT_FLAG)$@ $(LDFLAGS) \
-	$(FILES_o) $(THREADLIBS) $(LDLIBS)
-  ifeq ($(findstring privileged, $(INFO_PLIST_FILE)), privileged)
-	-codesign -s openjdk_codesign $@
-  endif
-	@$(call binary_file_verification,$@)
-endif # PLATFORM
-
-clean:: 
-ifeq ($(PLATFORM), windows)
-	$(RM) $(OBJDIR)/$(PROGRAM).rc
-	$(RM) $(OBJDIR)/$(PROGRAM).ico
-	$(RM) $(OBJDIR)/$(PROGRAM).lcf
-	$(RM) $(OBJDIR)/$(PROGRAM).map
-	$(RM) $(OBJDIR)/$(PROGRAM).exp
-	$(RM) $(OBJDIR)/$(PROGRAM).lib
-	$(RM) $(OBJDIR)/$(PROGRAM)$(EXE_SUFFIX)
-	$(RM) $(OBJDIR)/$(PROGRAM).ilk
-	$(RM) *.pdb
-endif
-
-
-clobber:: 
-	$(RM) $(ACTUAL_PROGRAM)
-
-#
-# Now include make dependencies (created during compilation, see Rules.gmk)
-#
-ifeq ($(INCREMENTAL_BUILD),true)
-  # Workaround: gnumake sometimes says files is empty when it shouldn't
-  #    was:  files := $(foreach file, $(wildcard */$(ARCH)/*.$(DEPEND_SUFFIX)), $(file))
-  files := $(shell $(LS) $(OBJDIR)/*.$(DEPEND_SUFFIX) 2>/dev/null)
-  ifneq ($(strip $(files)),)
-    include $(files)
-  endif
-endif
-
-ifdef JAVA_ARGS
-  OTHER_CPPFLAGS += -DJAVA_ARGS='$(JAVA_ARGS)'
-  OTHER_CPPFLAGS += -DLAUNCHER_NAME='"$(LAUNCHER_NAME)"'
-endif
-
-ifeq ($(PLATFORM), windows)
-  ifdef RELEASE
-    OTHER_CPPFLAGS += -DVERSION='"$(RELEASE)"'
-  endif
-endif
-
-
-ifneq ($(PLATFORM), windows)
-  HAVE_GETHRTIME=true
-endif
-
-ifeq ($(HAVE_GETHRTIME),true)
-  OTHER_CPPFLAGS += -DHAVE_GETHRTIME
-endif
-
-OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC)/bin -I$(LAUNCHER_PLATFORM_SRC)/bin
-ifeq ($(PLATFORM), macosx)
-  OTHER_INCLUDES += -I$(LAUNCHER_SOLARIS_PLATFORM_SRC)/bin
-  ifneq ($(SYSTEM_ZLIB), true)
-    OTHER_INCLUDES += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
-  endif
-else
-  OTHER_INCLUDES += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
-endif
-
-OTHER_CPPFLAGS  += -DPROGNAME='"$(PROGRAM)"'
-VERSION_DEFINES += -DFULL_VERSION='"$(FULL_VERSION)"'
-
-VERSION_DEFINES += -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
-                   -DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"'
-
-
-
-$(OBJDIR)/main.$(OBJECT_SUFFIX): $(LAUNCHER_SHARE_SRC)/bin/main.c
-	@$(prep-target)
-	$(COMPILE.c) $(CC_OBJECT_OUTPUT_FLAG)$(OBJDIR)/main.$(OBJECT_SUFFIX) \
-		$(VERSION_DEFINES) $<
-
-#
-# Default dependencies
-#
-
-all: build
-
-build: program
-
-debug:
-	$(MAKE) VARIANT=DBG build
-
-fastdebug:
-	$(MAKE) VARIANT=DBG FASTDEBUG=true build
-
-.PHONY: all build program clean clobber debug fastdebug
--- a/jdk/makefiles/common/Release-embedded.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,230 +0,0 @@
-#
-# Copyright (c) 2011, 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.
-#
-
-#
-# SE-Embedded Reduced JRE targets
-#
-ifdef JAVASE_EMBEDDED
-
-reduced-image-jre reduced-headless-image-jre ::
-	@$(ECHO) ">>>Making "$@" @ `$(DATE)` ..."
-
-# Add the reduced-jre images as pre-reqs. These will be processed last
-images:: reduced-image-jre reduced-headless-image-jre
-
-
-######################################################
-# Create the headless rt.jar
-######################################################
-
-NOT_HEADLESS_RT_JAR_LIST = $(ABS_TEMPDIR)/not_hl_rt_jar.list
-HEADLESS_RT_JAR_FILELIST=$(JARFILELISTS_TEMPDIR)/hl_rt_jar_list
-TOTAL_HEADLESS_JAR_FILELIST=$(REORDER_TEMPDIR)/hl_file_list
-HEADLESS_CLASSLIST=$(ABS_TEMPDIR)/headless_classlist
-
-# Add the jar file directories that we don't want in the
-# headless JRE.  If you want to remove most classes in a
-# directory, put the directory in the NOT_HEADLESS_RT_JAR_LIST
-# and put the individual classes you want to keep in the 
-# HEADLESS_CLASSLIST file. 
-$(NOT_HEADLESS_RT_JAR_LIST): $(NOT_RT_JAR_LIST)
-	$(RM) $(HEADLESS_CLASSLIST)
-	$(RM) $(NOT_HEADLESS_RT_JAR_LIST)
-	$(CP) $(NOT_RT_JAR_LIST) $(NOT_HEADLESS_RT_JAR_LIST)
-# List all the packages to be excluded
-	$(ECHO) "sun/awt/motif/" >> $@
-	$(ECHO) "sun/awt/X11/" >> $@
-	$(ECHO) "sun/applet/" >> $@
-	$(ECHO) "sun/java2d/opengl/" >> $@
-	$(ECHO) "com/sun/java/swing/plaf/" >> $@
-# List all the individual classes to be included
-	$(ECHO) "sun/awt/motif/MFontConfiguration.class" >$(HEADLESS_CLASSLIST)
-	$(ECHO) "sun/applet/AppContextCreator.class" >>$(HEADLESS_CLASSLIST)
-	$(ECHO) "sun/applet/AppletAudioClip.class" >>$(HEADLESS_CLASSLIST)
-	$(ECHO) "sun/java2d/opengl/GLXSurfaceData.class" >>$(HEADLESS_CLASSLIST)
-	$(ECHO) "sun/java2d/opengl/GLXSurfaceData"\$$"GLXOffScreenSurfaceData.class" >>$(HEADLESS_CLASSLIST)
-	$(ECHO) "sun/java2d/opengl/GLXVolatileSurfaceManager.class" >>$(HEADLESS_CLASSLIST)
-	$(ECHO) "sun/java2d/opengl/OGLSurfaceData.class" >>$(HEADLESS_CLASSLIST)
-
-
-$(TOTAL_HEADLESS_JAR_FILELIST): $(JARREORDER_JARFILE) $(NOT_HEADLESS_RT_JAR_LIST)
-	$(prep-target)
-	$(RM) $@.temp
-	$(CD) $(CLASSBINDIR) ; \
-		$(BOOT_JAVA_CMD) -jar $(JARREORDER_JARFILE) \
-		-o  $@.temp - $(NOT_HEADLESS_RT_JAR_LIST)  .
-# Add on the explicitly included class files from the otherwise excluded packages
-	$(CAT) $(HEADLESS_CLASSLIST) >> $@.temp
-	$(MV) $@.temp $@
-	@$(CD) $(CLASSBINDIR); $(java-vm-cleanup)
-
-# Create the headless rt.jar file list & non-class files list
-MakeHeadlessJarFileList: $(TOTAL_HEADLESS_JAR_FILELIST) $(JARSPLIT_JARFILE)
-	@$(RM) $(HEADLESS_RT_JAR_FILELIST) $(RES_JAR_FILELIST)
-	$(BOOT_JAVA_CMD) -jar $(JARSPLIT_JARFILE) $(TOTAL_HEADLESS_JAR_FILELIST) \
-		-o  $(HEADLESS_RT_JAR_FILELIST) $(RES_JAR_FILELIST)
-	@$(java-vm-cleanup)
-
-# Create headless rt.jar
-HL_RT_JAR=$(ABS_TEMPDIR)/rt-hl-orig.jar
-$(HL_RT_JAR): MakeHeadlessJarFileList $(RT_JAR_MANIFEST_FILE)
-	$(prep-target)
-	$(CD) $(CLASSBINDIR) ; \
-		$(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(RT_JAR_MANIFEST_FILE) $@ @$(HEADLESS_RT_JAR_FILELIST) \
-		 $(JAR_JFLAGS)
-	@$(CD) $(CLASSBINDIR); $(java-vm-cleanup)
-
-
-#
-# Produce a reduced Headful JRE for Embedded Devices
-#
-# The deployment binaries are added during the deployment build process
-#
-
-# Binaries that don't get included in reduced jre image bin directory
-NOT_REDUCEDJRE_BIN = \
- java_vm \
- kinit \
- klist \
- ktab \
- orbd \
- policytool \
- rmid \
- rmiregistry \
- servertool \
- tnameserv \
- pack200 \
- unpack200
-
-# jars/resources/libs that don't get included in reduced jre image lib directory
-NOT_REDUCEDJRE_LIB = \
- charsets.jar \
- ext/dnsns.jar \
- ext/localedata.jar \
- $(LIBARCH)/client/classes.jsa \
- $(LIBARCH)/libjavaplugin_jni.so \
- $(LIBARCH)/libjavaplugin_nscp_gcc29.so \
- $(LIBARCH)/libjavaplugin_nscp.so \
- $(LIBARCH)/libjavaplugin_oji.so
-
-# JRE docs that don't get included in reduced jre image top directory
-NOT_REDUCEDJRE_DOC = \
- Welcome.html
-
-reduced-image-jre::
-	@$(ECHO) Starting to Produce Reduced JRE
-	@#
-	@# First make a copy of the full JRE
-	@#
-	$(RM) -r $(JRE_REDUCED_IMAGE_DIR)
-	$(MKDIR) -p $(JRE_REDUCED_IMAGE_DIR)
-	$(CD) $(JRE_IMAGE_DIR); \
-	    $(TAR) cf - . | ($(CD) $(JRE_REDUCED_IMAGE_DIR); $(TAR) xf - ); 
-
-	@#
-	@# Remove all of the files that are not needed for the
-	@# reduced JRE
-	@#
-	for l in $(NOT_REDUCEDJRE_BIN) ; do \
-	    $(RM) $(JRE_REDUCED_IMAGE_DIR)/bin/$$l ; \
-	done
-	for l in $(NOT_REDUCEDJRE_LIB) ; do \
-	    $(RM) $(JRE_REDUCED_IMAGE_DIR)/lib/$$l ; \
-	done
-	for l in $(NOT_REDUCEDJRE_DOC) ; do \
-	    $(RM) $(JRE_REDUCED_IMAGE_DIR)/$$l ; \
-	done
-
-	@# Remove misc. other files
-	$(RM) -r $(JRE_REDUCED_IMAGE_DIR)/man
-	$(RM) -f $(JRE_REDUCED_IMAGE_DIR)/CHANGES
-
-	@$(ECHO) Done Creating Reduced JRE
-
-#
-# Produce a reduced Headless JRE
-#
-reduced-headless-image-jre:: $(RT_JAR) $(RESOURCES_JAR) $(BUILD_META_INDEX) $(HL_RT_JAR)
-	@$(ECHO) Starting to Produce Reduced Headless JRE
-	@#
-	@# First make a copy of the reduced JRE we just built
-	@#
-	$(RM) -r $(JRE_REDUCED_HEADLESS_IMAGE_DIR)
-	$(MKDIR) -p $(JRE_REDUCED_HEADLESS_IMAGE_DIR)
-	$(CD) $(JRE_REDUCED_IMAGE_DIR); \
-	    $(TAR) cf - . | ($(CD) $(JRE_REDUCED_HEADLESS_IMAGE_DIR); $(TAR) xf - ); 
-
-	@# Replace the full rt.jar with the headless rt.jar
-	$(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/rt.jar
-	$(CP) $(HL_RT_JAR) $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/rt.jar
-
-	@#
-	@# Remove all of the files that are not needed for the
-	@# reduced Headless JRE
-	@#
-	$(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/$(LIBARCH)/gtkhelper
-	$(RM)  $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/$(LIBARCH)/libjsoundalsa.so
-	$(RM) -r $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/audio
-	$(RM) -fr $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/applet
-	$(RM)  $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/$(LIBARCH)/awt_robot
-	$(RM)  $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/$(LIBARCH)/libawt_xawt.so
-	$(RM) -r $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/$(LIBARCH)/libsplashscreen.so
-	@# Remove oblique fonts and reduce font support to LucidaSansRegular only
-	$(RM) -fr $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/oblique-fonts
-	$(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/LucidaBrightDemiBold.ttf
-	$(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/LucidaBrightDemiItalic.ttf
-	$(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/LucidaBrightItalic.ttf
-	$(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/LucidaBrightRegular.ttf
-	$(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/LucidaSansDemiBold.ttf
-	$(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/LucidaTypewriterBold.ttf
-	$(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/LucidaTypewriterRegular.ttf
-
-ifeq ($(PLATFORM), linux)
-# put out minimal fonts.dir file for the remaining font
-	$(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/fonts.dir
-	$(ECHO) 6>$(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/fonts.dir
-	$(ECHO) "LucidaSansRegular.ttf -b&h-lucidasans-medium-r-normal-sans-0-0-0-0-p-0-iso8859-1">>$(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/fonts.dir
-	$(ECHO) "LucidaSansRegular.ttf -b&h-lucidasans-medium-r-normal-sans-0-0-0-0-p-0-iso8859-2">>$(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/fonts.dir
-	$(ECHO) "LucidaSansRegular.ttf -b&h-lucidasans-medium-r-normal-sans-0-0-0-0-p-0-iso8859-4">>$(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/fonts.dir
-	$(ECHO) "LucidaSansRegular.ttf -b&h-lucidasans-medium-r-normal-sans-0-0-0-0-p-0-iso8859-5">>$(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/fonts.dir
-	$(ECHO) "LucidaSansRegular.ttf -b&h-lucidasans-medium-r-normal-sans-0-0-0-0-p-0-iso8859-7">>$(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/fonts.dir
-	$(ECHO) "LucidaSansRegular.ttf -b&h-lucidasans-medium-r-normal-sans-0-0-0-0-p-0-iso8859-9">>$(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/fonts.dir
-
-endif # Linux
-
-	@#
-	@# all done with JRE reduced headless image
-	@#
-
-	@$(ECHO) Done Creating Reduced Headless JRE
-
-images-clobber::
-	$(RM) -r $(JRE_REDUCED_IMAGE_DIR)
-	$(RM) -r $(JRE_REDUCED_HEADLESS_IMAGE_DIR)
-
-.PHONY: reduced-image-jre reduced-headless-image-jre 
-
-endif # JAVASE_EMBEDDED
-
--- a/jdk/makefiles/common/Release-macosx.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-#
-# Copyright (c) 2011, 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.
-#
-
-MANBASEDIRS=$(JDK_TOPDIR)/src/bsd/doc $(IMPORTDOCDIR)
-MAN1SUBDIR = man
-JA_DIRNAME=ja_JP.UTF-8
-
-# Defines the release targets for Mac OS X build products
-
-JDK_BUNDLE_DIR = $(ABS_OUTPUTDIR)/j2sdk-bundle/jdk$(JDK_VERSION).jdk/Contents
-JRE_BUNDLE_DIR = $(ABS_OUTPUTDIR)/j2re-bundle/jre$(JDK_VERSION).jre/Contents
-
-MACOSX_SRC	 = $(JDK_TOPDIR)/src/macosx
-
-BUNDLE_ID ?= net.java.openjdk
-BUNDLE_ID_JRE ?= $(BUNDLE_ID).jre
-BUNDLE_ID_JDK ?= $(BUNDLE_ID).jdk
-
-BUNDLE_NAME ?= OpenJDK $(JDK_MINOR_VERSION)
-BUNDLE_NAME_JRE ?= $(BUNDLE_NAME)
-BUNDLE_NAME_JDK ?= $(BUNDLE_NAME)
-
-BUNDLE_INFO ?= OpenJDK ($(JDK_VERSION))
-BUNDLE_INFO_JRE ?= $(BUNDLE_INFO)
-BUNDLE_INFO_JDK ?= $(BUNDLE_INFO)
-
-BUNDLE_PLATFORM_VERSION ?= $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION)
-BUNDLE_VERSION ?= $(JDK_VERSION)
-BUNDLE_VENDOR ?= UNDEFINED
-
-jre-bundle-setup:
-	$(RM) -r $(JRE_BUNDLE_DIR)
-
-jdk-bundle-setup:
-	$(RM) -r $(JDK_BUNDLE_DIR)
-
-jre-bundle-files:
-	$(MKDIR) -p $(JRE_BUNDLE_DIR)/MacOS
-	ln -s ../Home/lib/jli/libjli.dylib $(JRE_BUNDLE_DIR)/MacOS/
-	$(CP) -r $(JRE_IMAGE_DIR) $(JRE_BUNDLE_DIR)/Home
-	$(SED) -e "s/@@ID@@/$(BUNDLE_ID_JRE)/g" -e "s/@@NAME@@/$(BUNDLE_NAME_JRE)/g" -e "s/@@INFO@@/$(BUNDLE_INFO_JRE)/g" -e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" -e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" -e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" < $(MACOSX_SRC)/bundle/JRE-Info.plist > $(JRE_BUNDLE_DIR)/Info.plist
-	/usr/bin/SetFile -a B $(JRE_BUNDLE_DIR)/../
-
-jdk-bundle-files:
-	$(MKDIR) -p $(JDK_BUNDLE_DIR)/MacOS
-	ln -s ../Home/jre/lib/jli/libjli.dylib $(JDK_BUNDLE_DIR)/MacOS/
-	$(CP) -r $(JDK_IMAGE_DIR) $(JDK_BUNDLE_DIR)/Home
-	$(SED) -e "s/@@ID@@/$(BUNDLE_ID_JDK)/g" -e "s/@@NAME@@/$(BUNDLE_NAME_JDK)/g" -e "s/@@INFO@@/$(BUNDLE_INFO_JDK)/g" -e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" -e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" -e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" < $(MACOSX_SRC)/bundle/JDK-Info.plist > $(JDK_BUNDLE_DIR)/Info.plist
-	/usr/bin/SetFile -a B $(JDK_BUNDLE_DIR)/../
-
-EXTRA_IMAGE_TARGETS += jre-bundle-setup jdk-bundle-setup jre-bundle-files jdk-bundle-files
-
-.PHONY: $(EXTRA_JRE_TARGETS) $(EXTRA_IMAGE_TARGETS)
--- a/jdk/makefiles/common/Release.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1401 +0,0 @@
-#
-# Copyright (c) 1997, 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.
-#
-
-include $(JDK_TOPDIR)/makefiles/docs/CORE_PKGS.gmk
-include $(JDK_TOPDIR)/makefiles/docs/NON_CORE_PKGS.gmk
-include $(JDK_TOPDIR)/makefiles/Tools.gmk
-
-# What jdk version are we building
-THIS_JDK_VERSION := $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
-
-#
-# Perform release engineering tasks.
-#
-# images    An image is what the product looks like when it is
-#           installed.
-#
-
-IMAGE_BINDIR = bin
-
-# The compiler should not issue a "Proprietary" warning when compiling
-# classes in the com.sun.java.swing.plaf packages, since we've always
-# allowed, and even advocated, extending them (see bug 6476749).
-#
-# This approach is NOT to be used as a general purpose way to avoid such
-# compiler warnings for non-core packages. The correct way is to document
-# the packages in NON_CORE_PKGS.gmk, and include them in the NON_CORE_PKGS
-# definition.
-#
-# Swing has taken this approach only as a temporary measure to avoid
-# the compiler warnings until we can properly document these packages.
-# This is covered under 6491853.
-EXCLUDE_PROPWARN_PKGS = com.sun.java.swing.plaf.windows  \
-                        com.sun.java.swing.plaf.motif    \
-                        com.sun.java.swing.plaf.gtk
-
-#
-# Include the exported private packages in ct.sym.
-# This is an interim solution until the ct.sym is replaced
-# with a new module system (being discussed for JDK 8).
-#
-EXPORTED_PRIVATE_PKGS = com.sun.servicetag \
-                        com.oracle.net \
-                        com.oracle.nio
-
-# 64-bit solaris has a few special cases. We define the variable
-# SOLARIS64 for use in this Makefile to easily test those cases
-ifeq ($(PLATFORM), solaris)
-  ifeq ($(ARCH_DATA_MODEL), 64)
-    SOLARIS64 = true
-    IMAGE_BINDIR = bin/$(ARCH)
-  endif
-endif
-
-JTG_DOCS            = $(JDK_TOPDIR)/src/solaris/doc
-
-ifeq ($(PLATFORM), macosx)
-  include $(JDK_TOPDIR)/make/common/Release-$(PLATFORM).gmk
-endif
-
-# The base names of all the license and document files for the jdk and jre
-#   (These files get placed in the jdk and jre install images)
-ifdef OPENJDK
-  # Where to find these files
-  SHARE_JDK_DOC_SRC = $(JDK_TOPDIR)
-  SHARE_JRE_DOC_SRC = $(JDK_TOPDIR)
-  # Same files for jdk and jre, no name changes
-  IMAGE_DOCLIST_JDK = LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README
-  IMAGE_DOCLIST_JDK_DEMOS_AND_SAMPLES =
-  IMAGE_DOCLIST_JRE = LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README
-else
-  # make/closed/common/Defs.gmk for closed location of SHARE_JDK_DOC_SRC
-
-  IMAGE_DOCLIST_JDK = COPYRIGHT README.html  LICENSE THIRDPARTYLICENSEREADME.txt
-  IMAGE_DOCLIST_JDK_DEMOS_AND_SAMPLES = demo/DEMOS_LICENSE sample/SAMPLES_LICENSE
-  IMAGE_DOCLIST_JRE = COPYRIGHT Welcome.html LICENSE THIRDPARTYLICENSEREADME.txt
-  ifeq ($(PLATFORM), windows)
-    IMAGE_DOCLIST_JRE += README.txt
-  else
-    IMAGE_DOCLIST_JRE += README
-  endif
-endif
-
-# Paths to these files we need
-JDK_DOCFILES   = $(IMAGE_DOCLIST_JDK:%=$(JDK_IMAGE_DIR)/%)
-JRE_DOCFILES   = $(IMAGE_DOCLIST_JRE:%=$(JRE_IMAGE_DIR)/%)
-JDK_DEMOS_AND_SAMPLES_DOCFILES = $(IMAGE_DOCLIST_JDK_DEMOS_AND_SAMPLES:%=$(JDK_IMAGE_DIR)/%)
-
-# absolute directory names: note, these must exist prior to build
-# time - they are created in the main Makefile.
-JRE_IMAGE_BINDIR   = $(JRE_IMAGE_DIR)/bin
-
-MAINMANIFEST  = $(JDK_TOPDIR)/make/tools/manifest.mf
-BEANMANIFEST  = $(JDK_TOPDIR)/make/javax/swing/beaninfo/manifest
-
-#
-# Man pages
-#
-
-JRE_MAN_PAGES =         \
-	java.1		\
-	keytool.1	\
-	orbd.1          \
-	pack200.1	\
-	policytool.1    \
-	rmid.1		\
-	rmiregistry.1	\
-	servertool.1    \
-	tnameserv.1     \
-	unpack200.1
-
-ifndef OPENJDK
-  JRE_MAN_PAGES += javaws.1
-endif
-
-JDK_MAN_PAGES =            \
-	$(JRE_MAN_PAGES)   \
-	appletviewer.1     \
-	extcheck.1         \
-	idlj.1             \
-	jar.1              \
-	jarsigner.1        \
-	javac.1            \
-	javadoc.1          \
-	javah.1            \
-	javap.1            \
-	jconsole.1         \
-	jdb.1              \
-	jhat.1             \
-        jinfo.1            \
-        jmap.1             \
-        jps.1              \
-	jrunscript.1       \
-        jsadebugd.1        \
-        jstack.1           \
-        jstat.1            \
-        jstatd.1           \
-	native2ascii.1     \
-	rmic.1             \
-        schemagen.1        \
-	serialver.1        \
-        wsgen.1            \
-        wsimport.1         \
-        xjc.1
-
-ifeq ($(PLATFORM), solaris)
-  MANBASEDIRS=$(JDK_TOPDIR)/src/solaris/doc $(IMPORTDOCDIR)
-  MAN1SUBDIR=sun/man/man1
-endif # solaris
-
-ifeq ($(PLATFORM), linux)
-  MANBASEDIRS=$(JDK_TOPDIR)/src/linux/doc $(IMPORTDOCDIR)
-  MAN1SUBDIR=man
-  JA_DIRNAME=ja_JP.UTF-8
-endif # linux
-
-define copy-man-pages
-$(MKDIR) -p $1/man/man1
-for manbase in $(MANBASEDIRS:%=%/$(MAN1SUBDIR)) ; do \
-  for manpage in $2; do \
-    if [ -f $${manbase}/$${manpage} ] ; then \
-      $(CP) $${manbase}/$${manpage} $1/man/man1 ; \
-      for ja_encoding in $(JA_TARGET_ENCODINGS); do \
-        ja_dir="ja"; \
-        if [ "$${ja_encoding}" != "$(JA_SOURCE_ENCODING)" ]; then \
-          ja_dir="ja_JP.$${ja_encoding}"; \
-	fi; \
-        $(MKDIR) -p $1/man/$${ja_dir}/man1; \
-        $(CAT) $${manbase}/ja/$${manpage} \
-          | $(NATIVE2ASCII) -encoding $(JA_SOURCE_ENCODING) \
-          | $(SED) 's/@@VERSION@@/$(THIS_JDK_VERSION)/g' \
-          | $(NATIVE2ASCII) -reverse -encoding $${ja_encoding} \
-            > $1/man/$${ja_dir}/man1/$${manpage}; \
-      done; \
-    fi; \
-  done; \
-done
-$(java-vm-cleanup)
-if [ "$(JA_DIRNAME)" != "" ] ; then \
-  $(CD) $1/man && $(RM) ja && $(LN) -s $(JA_DIRNAME) ja; \
-fi
-endef
-
-
-# no compression unless requested
-ifndef COMPRESS_JARS
-  CREATE_JAR_OPTS = c0mf
-  CREATE_JAR_OPTS_NOMANIFEST = c0f
-else
-  CREATE_JAR_OPTS = cmf
-  CREATE_JAR_OPTS_NOMANIFEST = cf
-endif
-
-#
-# Targets.
-#
-INITIAL_IMAGE_JRE=initial-image-jre
-INITIAL_IMAGE_JDK=initial-image-jdk
-ifeq ($(PLATFORM), solaris)
-  ifeq ($(ARCH_DATA_MODEL), 64)
-    INITIAL_IMAGE_JRE=initial-image-jre-sol64
-    INITIAL_IMAGE_JDK=initial-image-jdk-sol64
-  endif
-endif
-
-images images-clobber \
-initial-image-jre initial-image-jdk \
-initial-image-jre-sol64 initial-image-jdk-sol64 \
-trim-image-jre trim-image-jdk \
-identify-image-jre identify-image-jdk \
-process-image-jre process-image-jdk \
-sec-files sec-files-win jgss-files ::
-	$(ECHO) ">>>Making "$@" @ `$(DATE)` ..."
-
-install: images
-
-# Order is important here, trim jre after jdk image is created
-ifeq ($(PLATFORM), macosx)
-
-images:: $(INITIAL_IMAGE_JRE) $(EXTRA_JRE_TARGETS) $(INITIAL_IMAGE_JDK) \
-	 trim-image-jre trim-image-jdk \
-     identify-image-jre identify-image-jdk \
-	 process-image-jre process-image-jdk sec-files sec-files-win jgss-files \
-	 $(EXTRA_IMAGE_TARGETS)
-else
-
-images:: $(INITIAL_IMAGE_JRE) $(INITIAL_IMAGE_JDK) \
-	 trim-image-jre trim-image-jdk \
-         identify-image-jre identify-image-jdk \
-	 process-image-jre process-image-jdk sec-files sec-files-win jgss-files 
-endif
-
-# Don't use these
-image-jre:: initial-image-jre trim-image-jre identify-image-jre process-image-jre
-image-jdk:: initial-image-jdk trim-image-jdk identify-image-jdk process-image-jdk
-
-#
-# Sources we ship in the SDK.
-#
-SOURCES = \
-	java/applet			\
-	java/awt			\
-	java/beans			\
-	java/io				\
-	java/lang			\
-	java/math			\
-	java/net			\
-	java/nio			\
-	java/rmi			\
-	java/security			\
-	java/sql			\
-	java/text			\
-	java/util			\
-	com/sun/corba			\
-	com/sun/image/codec/jpeg	\
-	com/sun/imageio                 \
-	com/sun/java/swing		\
-	com/sun/javadoc			\
-	com/sun/jmx			\
-	com/sun/source			\
-	com/sun/naming			\
-	com/sun/security/auth		\
-	com/sun/security/jgss		\
-	javax/accessibility		\
-	javax/annotation		\
-	javax/script			\
-	javax/imageio			\
-	javax/lang			\
-	javax/management		\
-	javax/naming			\
-	javax/print			\
-	javax/rmi			\
-	javax/security			\
-	javax/sound			\
-	javax/sql			\
-	javax/swing			\
-	javax/tools			\
-	javax/xml			\
-	com/sun/org/apache		\
-	com/sun/java_cup		\
-	com/sun/jlex	        	\
-	org/ietf			\
-	org/omg				\
-	org/w3c/dom			\
-	org/xml/sax			\
-	sunw
-#
-# Directories where sources may be found.  If a file with the same path
-# name exists in more than one of these places, the one found last on this
-# list wins.
-#
-SOURCE_DIRS = $(SHARE_SRC)/classes $(PLATFORM_SRC)/classes
-SOURCE_DIRS += $(GENSRCDIR)
-SOURCE_DIRS += $(IMPORTSRCDIR)
-SOURCE_DIRS += $(JDK_OUTPUTDIR)/gendocsrc_rmic
-ifndef OPENJDK
-  SOURCE_DIRS += $(CLOSED_SRC)/share/classes
-endif
-
-
-#
-# Specific files and directories that will be filtered out from above areas.
-#
-SOURCE_FILTERs = $(SCM_DIRs) ',*'
-SOURCE_FILES_filter = $(SOURCE_FILTERs:%=-name % -prune -o)
-
-#
-# Bug 4249883 - excluding some unnecessary packages from com.sun.tools
-#
-# Bug 5008685 - exclude jconsole from sun/tools
-#
-TOOLS = \
-	META-INF/services/com.sun.jdi.connect.Connector \
-	META-INF/services/com.sun.jdi.connect.spi.TransportService \
-	sun/tools/asm		\
-	sun/tools/jar		\
-	sun/tools/java		\
-	sun/tools/javac		\
-	sun/tools/jcmd		\
-	sun/tools/jps		\
-	sun/tools/jstat		\
-	sun/tools/jstatd	\
-	sun/tools/native2ascii	\
-	sun/tools/serialver	\
-	sun/tools/tree		\
-	sun/tools/util		\
-	sun/security/tools/JarBASE64Encoder.class \
-	sun/security/tools/JarSigner.class \
-	sun/security/tools/JarSignerParameters.class \
-	sun/security/tools/JarSignerResources.class \
-	sun/security/tools/JarSignerResources_ja.class \
-	sun/security/tools/JarSignerResources_zh_CN.class \
-	sun/security/tools/SignatureFile\$$Block.class \
-	sun/security/tools/SignatureFile.class \
-	sun/security/tools/TimestampedSigner.class \
-	sun/rmi/rmic		\
-	sun/applet		\
-	sun/jvmstat		\
-	com/sun/javadoc		\
-	com/sun/jdi		\
-	com/sun/jarsigner	\
-	com/sun/source          \
-	com/sun/tools/classfile \
-	com/sun/tools/doclets   \
-	com/sun/tools/example/debug/expr \
-	com/sun/tools/example/debug/tty  \
-	com/sun/tools/extcheck  \
-	com/sun/tools/hat       \
-	com/sun/tools/javac     \
-	com/sun/tools/javadoc   \
-	com/sun/tools/javah     \
-	com/sun/tools/javap     \
-	com/sun/tools/corba     \
-	com/sun/tools/internal/xjc       \
-	com/sun/tools/internal/ws       \
-	META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
-	META-INF/services/com.sun.tools.internal.xjc.Plugin \
-	com/sun/istack/internal/tools       \
-	com/sun/tools/internal/jxc/ap   \
-	com/sun/tools/internal/ws/wscompile/plugin/at_generated \
-        com/sun/codemodel       \
-        com/sun/tools/internal/jxc             \
-        com/sun/xml/internal/rngom       \
-        com/sun/xml/internal/xsom       \
-        org/relaxng/datatype   \
-	com/sun/xml/internal/dtdparser \
-	com/sun/tools/jdi	\
-	com/sun/tools/script/shell	\
-	META-INF/services/com.sun.tools.attach.spi.AttachProvider \
-	com/sun/tools/attach	\
-	sun/tools/attach	\
-	sun/tools/jstack        \
-	sun/tools/jinfo         \
-	sun/tools/jmap
-
-# classes that go into jfr.jar
-JFR_CLASSES_DIRS= \
-	com/oracle/jrockit/jfr \
-	oracle/jrockit/jfr
-
-# classes that go into jsse.jar
-JSSE_CLASSES_DIRS = \
-	sun/security/provider/Sun.class \
-	sun/security/rsa/SunRsaSign.class \
-	sun/security/ssl \
-	com/sun/net/ssl/internal/ssl
-
-# classes that go into dnsns.jar
-DNS_CLASSES_DIRS = \
-        sun/net/spi/nameservice/dns \
-        META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor
-
-# classes and files that go into localedata.jar
-LOCALEDATA_JAR_DIRS = \
-	sun/text/resources/*_ar* \
-	sun/text/resources/*_hi* \
-	sun/text/resources/*_iw* \
-	sun/text/resources/*_iw* \
-	sun/text/resources/*_ja* \
-	sun/text/resources/*_ko* \
-	sun/text/resources/*_th.* \
-	sun/text/resources/*_th_* \
-	sun/text/resources/*_vi* \
-	sun/text/resources/*_zh* \
-	sun/text/resources/*Data_th \
-	sun/text/resources/thai_dict \
-	sun/util/resources/*_ar* \
-	sun/util/resources/*_hi* \
-	sun/util/resources/*_iw* \
-	sun/util/resources/*_iw* \
-	sun/util/resources/*_ja* \
-	sun/util/resources/*_ko* \
-	sun/util/resources/*_th_* \
-	sun/util/resources/*_th.* \
-	sun/util/resources/*_vi* \
-	sun/util/resources/*_zh*
-
-LOCALEDATA_JAR_FILES = $(foreach i,$(LOCALEDATA_JAR_DIRS), $(wildcard $(CLASSBINDIR)/$i))
-
-# files under $(OUTPUTDIR) that need to go into sec-bin.zip for builds
-# where the corresponding sources are not available
-SEC_FILES_DIRS = \
-	classes/javax/net \
-	classes/javax/security/cert \
-	classes/com/sun/net/ssl \
-	classes/com/sun/security/cert \
-	classes/sun/net/www/protocol/https \
-	classes/sun/security/pkcs12 \
-	classes/sun/security/ssl \
-	classes/sun/security/krb5/*.class \
-	classes/sun/security/krb5/internal/*.class \
-	classes/sun/security/krb5/internal/ccache \
-	classes/sun/security/krb5/internal/crypto \
-	classes/sun/security/krb5/internal/ktab \
-	classes/sun/security/krb5/internal/rcache \
-	classes/sun/security/krb5/internal/util \
-	classes/sun/security/jgss/spi/GSSContextSpi.class
-
-# files under $(OUTPUTDIR) that need to go into sec-windows-win.zip for builds
-# where the corresponding sources are not available
-SEC_FILES_WIN_DIRS = \
-	classes/sun/security/krb5/internal/tools
-
-# files under $(BINDIR) that need to go into jgss_files.zip for builds
-# where the corresponding sources are not available
-JGSS_FILES_DIRS = \
-	bin/w2k_lsa_auth.dll \
-	bin/w2k_lsa_auth.map \
-	bin/w2k_lsa_auth.pdb
-
-# The following get removed from the SDK image.
-NOTJDKTOOLS = \
-	java_vm
-
-# The following get removed from the JRE after the bulk-copy of BINDIR...
-NOTJRETOOLS = \
-	appletviewer$(EXE_SUFFIX) \
-	extcheck$(EXE_SUFFIX) \
-	idlj$(EXE_SUFFIX) \
-	jar$(EXE_SUFFIX) \
-	jarsigner$(EXE_SUFFIX) \
-	java-rmi.cgi \
-	javac$(EXE_SUFFIX) \
-	javadoc$(EXE_SUFFIX) \
-	javah$(EXE_SUFFIX) \
-	javap$(EXE_SUFFIX) \
-	jcmd$(EXE_SUFFIX) \
-	jdb$(EXE_SUFFIX) \
-	jps$(EXE_SUFFIX) \
-	jrunscript$(EXE_SUFFIX) \
-	jstat$(EXE_SUFFIX) \
-	jstatd$(EXE_SUFFIX) \
-	jstack$(EXE_SUFFIX) \
-	packagebean$(SCRIPT_SUFFIX) \
-	rmic$(EXE_SUFFIX) \
-	serialver$(EXE_SUFFIX) \
-	unregbean$(EXE_SUFFIX) \
-	jconsole$(EXE_SUFFIX) \
-	jinfo$(EXE_SUFFIX) \
-	jmap$(EXE_SUFFIX) \
-	native2ascii$(EXE_SUFFIX) \
-	xjc$(EXE_SUFFIX) \
-	wsgen$(EXE_SUFFIX) \
-	wsimport$(EXE_SUFFIX) \
-        schemagen$(EXE_SUFFIX) \
-	jsadebugd$(EXE_SUFFIX) \
-	jhat$(EXE_SUFFIX)
-
-# The following get removed from the JRE after the bulk-copy of LIBDIR...
-NOTJRELIBS = tools.jar \
-        jconsole.jar \
-	dt.jar
-
-ifeq ($(INCLUDE_SA), true)
-  NOTJRELIBS += sa-jdi.jar
-
-  # The following get removed from the JRE after the bulk-copy of LIBDIR...
-  NOTJRE_SHARED_LIBS = $(SALIB_NAME)
-else
-  NOTJRE_SHARED_LIBS =
-endif
-
-# Attach library is JDK only
-NOTJRE_SHARED_LIBS += $(LIB_PREFIX)attach.$(LIBRARY_SUFFIX)
-
-#
-###### RULES
-
-# Processing license files from source area to image area
-#    These will be modified to have the platform specific EOL chars.
-define process-doc-file
-$(prep-target)
-$(SED) 's/$$//g' $< > $@
-$(CHMOD) 444 $@
-endef
-
-# JDK files
-$(JDK_IMAGE_DIR)/%: $(SHARE_JDK_DOC_SRC)/%
-	$(process-doc-file)
-
-$(JDK_IMAGE_DIR)/demo/DEMOS_LICENSE: $(SHARE_JDK_DOC_SRC)/DEMOS_LICENSE
-	$(process-doc-file)
-
-$(JDK_IMAGE_DIR)/sample/SAMPLES_LICENSE: $(SHARE_JDK_DOC_SRC)/SAMPLES_LICENSE
-	$(process-doc-file)
-
-# JRE files 
-$(JRE_IMAGE_DIR)/%: $(SHARE_JRE_DOC_SRC)/%
-	$(process-doc-file)
-ifeq ($(PLATFORM), windows)
-$(JRE_IMAGE_DIR)/README.txt: $(SHARE_JRE_DOC_SRC)/README
-	$(process-doc-file)
-endif
-
-
-######################################################
-# List of directories in classes directory that should NOT be in rt.jar
-######################################################
-
-NOT_RT_JAR_LIST = $(IMAGES_OUTPUTDIR)/tmp/not_rt_jar.list
-
-$(NOT_RT_JAR_LIST): FRC
-	$(prep-target)
-	$(ECHO) "#\n" >> $@
-	$(ECHO) "# List of subdirectories not in include in rt.jar" >> $@
-	$(ECHO) "# Directories must contain trailing '/'." >> $@
-	$(ECHO) "com/sun/javadoc/" >> $@
-	$(ECHO) "com/sun/jdi/" >> $@
-	$(ECHO) "com/sun/jarsigner/" >> $@
-	$(ECHO) "com/sun/source/" >> $@
-	$(ECHO) "com/sun/istack/internal/tools/" >> $@
-	$(ECHO) "META-INF/services/com.sun.jdi.connect.Connector" >> $@
-	$(ECHO) "META-INF/services/com.sun.jdi.connect.spi.TransportService" >> $@
-	$(ECHO) "META-INF/services/com.sun.tools.xjc.Plugin" >> $@
-	$(ECHO) "com/sun/tools/" >> $@
-	$(ECHO) "sun/jvmstat/" >> $@
-	$(ECHO) "sun/nio/cs/ext/" >> $@
-	$(ECHO) "sun/awt/HKSCS.class" >> $@
-	$(ECHO) "sun/awt/motif/X11GB2312\$$Decoder.class" >> $@
-	$(ECHO) "sun/awt/motif/X11GB2312\$$Encoder.class" >> $@
-	$(ECHO) "sun/awt/motif/X11GB2312.class" >> $@
-	$(ECHO) "sun/awt/motif/X11GBK\$$Encoder.class" >> $@
-	$(ECHO) "sun/awt/motif/X11GBK.class" >> $@
-	$(ECHO) "sun/awt/motif/X11KSC5601\$$Decoder.class" >> $@
-	$(ECHO) "sun/awt/motif/X11KSC5601\$$Encoder.class" >> $@
-	$(ECHO) "sun/awt/motif/X11KSC5601.class" >> $@
-	$(ECHO) "META-INF/services/java.nio.charset.spi.CharsetProvider" >> $@
-	$(ECHO) "sun/rmi/rmic/" >> $@
-	$(ECHO) "sun/tools/asm/" >> $@
-	$(ECHO) "sun/tools/java/" >> $@
-	$(ECHO) "sun/tools/javac/" >> $@
-	$(ECHO) "com/sun/tools/classfile/" >> $@
-	$(ECHO) "com/sun/tools/javap/" >> $@
-	$(ECHO) "sun/tools/jcmd/" >> $@
-	$(ECHO) "sun/tools/jconsole/" >> $@
-	$(ECHO) "sun/tools/jps/" >> $@
-	$(ECHO) "sun/tools/jstat/" >> $@
-	$(ECHO) "sun/tools/jstatd/" >> $@
-	$(ECHO) "sun/tools/native2ascii/" >> $@
-	$(ECHO) "sun/tools/serialver/" >> $@
-	$(ECHO) "sun/tools/tree/" >> $@
-	$(ECHO) "sun/tools/util/" >> $@
-	$(ECHO) "sun/security/tools/JarBASE64Encoder.class" >> $@
-	$(ECHO) "sun/security/tools/JarSigner.class" >> $@
-	$(ECHO) "sun/security/tools/JarSignerParameters.class" >> $@
-	$(ECHO) "sun/security/tools/JarSignerResources.class" >> $@
-	$(ECHO) "sun/security/tools/JarSignerResources_ja.class" >> $@
-	$(ECHO) "sun/security/tools/JarSignerResources_zh_CN.class" >> $@
-	$(ECHO) "sun/security/tools/SignatureFile\$$Block.class" >> $@
-	$(ECHO) "sun/security/tools/SignatureFile.class" >> $@
-	$(ECHO) "sun/security/tools/TimestampedSigner.class" >> $@
-	$(ECHO) "sun/security/provider/Sun.class" >> $@
-	$(ECHO) "sun/security/rsa/SunRsaSign.class" >> $@
-	$(ECHO) "sun/security/ssl/" >> $@
-	$(ECHO) "sun/security/pkcs11/" >> $@
-	$(ECHO) "sun/security/ec/ECDHKeyAgreement.class" >> $@
-	$(ECHO) "sun/security/ec/ECDSASignature.class" >> $@
-	$(ECHO) "sun/security/ec/ECKeyPairGenerator.class" >> $@
-	$(ECHO) "sun/security/ec/SunEC\$$1.class" >> $@
-	$(ECHO) "sun/security/ec/SunEC.class" >> $@
-	$(ECHO) "sun/security/ec/SunECEntries.class" >> $@
-	$(ECHO) "sun/security/ec/ECDSASignature\$$Raw.class" >> $@
-	$(ECHO) "sun/security/ec/ECDSASignature\$$SHA1.class" >> $@
-	$(ECHO) "sun/security/ec/ECDSASignature\$$SHA256.class" >> $@
-	$(ECHO) "sun/security/ec/ECDSASignature\$$SHA384.class" >> $@
-	$(ECHO) "sun/security/ec/ECDSASignature\$$SHA512.class" >> $@
-	$(ECHO) "com/sun/net/ssl/internal/ssl/" >> $@
-	$(ECHO) "javax/crypto/" >> $@
-	$(ECHO) "sun/security/internal/" >> $@
-	$(ECHO) "com/sun/crypto/provider/" >> $@
-	$(ECHO) "META-INF/services/com.sun.tools.attach.spi.AttachProvider" >> $@
-	$(ECHO) "com/sun/tools/attach/" >> $@
-	$(ECHO) "org/relaxng/datatype/" >> $@
-	$(ECHO) "com/sun/codemodel/" >> $@
-	$(ECHO) "com/sun/xml/internal/dtdparser/" >> $@
-	$(ECHO) "com/sun/xml/internal/rngom/" >> $@
-	$(ECHO) "com/sun/xml/internal/xsom/" >> $@
-	$(ECHO) "com/sun/tools/script/shell/" >> $@
-	$(ECHO) "sun/tools/attach/" >> $@
-	$(ECHO) "sun/tools/jstack/" >> $@
-	$(ECHO) "sun/tools/jinfo/" >> $@
-	$(ECHO) "sun/tools/jmap/" >> $@
-	$(ECHO) "sun/net/spi/nameservice/dns/" >> $@
-	$(ECHO) "META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor" >> $@
-	$(ECHO) "javax/swing/AbstractButtonBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/BoxBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JAppletBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JButtonBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JCheckBoxBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JCheckBoxMenuItemBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JColorChooserBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JComboBoxBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JComponentBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JDesktopPaneBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JDialogBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JEditorPaneBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JFileChooserBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JFormattedTextFieldBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JFrameBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JInternalFrameBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JLabelBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JLayeredPaneBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JListBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JMenuBarBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JMenuBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JMenuItemBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JOptionPaneBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JPanelBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JPasswordFieldBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JPopupMenuBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JProgressBarBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JRadioButtonBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JRadioButtonMenuItemBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JScrollBarBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JScrollPaneBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JSeparatorBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JSliderBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JSpinnerBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JSplitPaneBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JTabbedPaneBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JTableBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JTextAreaBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JTextFieldBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JTextPaneBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JToggleButtonBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JToolBarBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JTreeBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/JWindowBeanInfo.class" >> $@
-	$(ECHO) "javax/swing/SwingBeanInfoBase.class" >> $@
-	$(ECHO) "javax/swing/text/JTextComponentBeanInfo.class" >> $@
-	$(ECHO) "sun/swing/BeanInfoUtils.class" >> $@
-	$(ECHO) $(patsubst $(CLASSBINDIR)/%,%,$(LOCALEDATA_JAR_FILES)) | $(TR) " " "\n" >> $@
-ifndef OPENJDK
-ifndef JAVASE_EMBEDDED
-	$(ECHO) "com/oracle/jrockit/jfr/" >> $@
-	$(ECHO) "com/oracle/jrockit/jfr/client/" >> $@
-	$(ECHO) "com/oracle/jrockit/jfr/management/" >> $@
-	$(ECHO) "oracle/jrockit/jfr/" >> $@
-	$(ECHO) "oracle/jrockit/jfr/events/" >> $@
-	$(ECHO) "oracle/jrockit/jfr/openmbean/" >> $@
-	$(ECHO) "oracle/jrockit/jfr/parser/" >> $@
-	$(ECHO) "oracle/jrockit/jfr/settings/" >> $@
-	$(ECHO) "oracle/jrockit/jfr/tools/" >> $@
-	$(ECHO) "oracle/jrockit/jfr/util/" >> $@
-	$(ECHO) "oracle/jrockit/jfr/util/log/" >> $@
-	$(ECHO) "oracle/jrockit/jfr/util/os/" >> $@
-	$(ECHO) "oracle/jrockit/jfr/util/text/" >> $@
-endif
-endif
-	(cd $(JDK_OUTPUTDIR)/classes && $(FIND) . -name "_the.*") >> $@
-ifeq ($(PLATFORM), macosx)
-	$(ECHO) "com/sun/nio/sctp/" >> $@
-	$(ECHO) "sun/nio/ch/sctp/" >> $@
-	$(ECHO) "sun/jdbc/" >> $@
-	$(ECHO) "sun/nio/ch/DevPollArrayWrapper\$$Updator.class" >> $@
-	$(ECHO) "sun/nio/ch/DevPollArrayWrapper.class" >> $@
-	$(ECHO) "sun/nio/ch/DevPollSelectorImpl.class" >> $@
-	$(ECHO) "sun/nio/ch/DevPollSelectorProvider.class" >> $@
-	$(ECHO) "sun/nio/ch/EPollArrayWrapper\$$Updator.class" >> $@
-	$(ECHO) "sun/nio/ch/EPollArrayWrapper.class" >> $@
-	$(ECHO) "sun/nio/ch/EPollSelectorImpl.class" >> $@
-	$(ECHO) "sun/nio/ch/EPollSelectorProvider.class" >> $@
-endif
-
-######################################################
-# List of directories in classes directory that should NOT be in resources.jar
-######################################################
-
-NOT_RESOURCES_JAR_LIST = $(IMAGES_OUTPUTDIR)/tmp/not_resources_jar.list
-
-$(NOT_RESOURCES_JAR_LIST): FRC
-	$(prep-target)
-	$(ECHO) "#\n" >> $@
-	$(ECHO) "# List of subdirectories not in include in resources.jar" >> $@
-	$(ECHO) "# Directories must contain trailing '/'." >> $@
-	$(ECHO) "javax/swing/beaninfo/" >> $@
-
-TOTAL_JAR_EXCLUDE_LIST = $(IMAGES_OUTPUTDIR)/tmp/total_jar_exclude.list
-
-######################################################
-# Total exclude list
-######################################################
-
-$(TOTAL_JAR_EXCLUDE_LIST): $(NOT_RT_JAR_LIST) $(NOT_RESOURCES_JAR_LIST)
-	$(prep-target)
-	$(ECHO) "#\n" >> $@
-	$(ECHO) "# List of subdirectories not in include in resources.jar" >> $@	
-	$(CAT) $(NOT_RT_JAR_LIST) >>$@
-	$(CAT) $(NOT_RESOURCES_JAR_LIST) >>$@ 
-
-# File order list for rt.jar
-#     - sun.applet is included, till hotjava stops relying on it.
-#     - sun.tools.jar is included, needs cleanup.
-#
-REORDER_TEMPDIR=$(IMAGES_OUTPUTDIR)/tmp/reorder
-TOTAL_JAR_FILELIST=$(REORDER_TEMPDIR)/file_list
-
-JARFILELISTS_TEMPDIR=$(IMAGES_OUTPUTDIR)/tmp/jarfilelists
-RT_JAR_FILELIST=$(JARFILELISTS_TEMPDIR)/rt_jar_list
-RES_JAR_FILELIST=$(JARFILELISTS_TEMPDIR)/resources_jar_list
-
-$(TOTAL_JAR_FILELIST): $(BUILD_TOOLS) $(TOTAL_JAR_EXCLUDE_LIST)
-	$(prep-target)
-	$(RM) $@.temp
-	($(CD) $(CLASSBINDIR) && \
-	    $(TOOL_JARREORDER) \
-		-o  $@.temp $(ABS_LIBDIR)/classlist $(TOTAL_JAR_EXCLUDE_LIST) . )
-	$(MV) $@.temp $@
-	($(CD) $(CLASSBINDIR) && $(java-vm-cleanup))
-
-# Create the jfr.jar containing Java Flight Recorder implementation
-JFR_JAR=
-ifndef OPENJDK
-ifndef JAVASE_EMBEDDED
-JFR_JAR=$(ABS_TEMPDIR)/jfr-orig.jar
-$(JFR_JAR): $(OTHER_JAR_MANIFEST_FILE)
-	$(prep-target)
-	$(CD) $(CLASSBINDIR) && \
-	    $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(OTHER_JAR_MANIFEST_FILE) $@ \
-		$(JFR_CLASSES_DIRS) $(BOOT_JAR_JFLAGS)
-	@$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
-endif
-endif
-
-# Create the rt.jar file list & non-class files list
-
-$(RT_JAR_FILELIST) + $(RES_JAR_FILELIST): \
-    $(TOTAL_JAR_FILELIST) $(BUILD_TOOLS)
-	$(RM) $(RT_JAR_FILELIST) $(RES_JAR_FILELIST)
-	$(MKDIR) -p $(JARFILELISTS_TEMPDIR)
-	$(TOOL_JARSPLIT) \
-		$(TOTAL_JAR_FILELIST) \
-		-o  $(RT_JAR_FILELIST) $(RES_JAR_FILELIST)
-	$(java-vm-cleanup)
-
-# Create the manifest file.
-RT_JAR_MANIFEST_FILE=$(IMAGES_OUTPUTDIR)/tmp/rt_manifest.tmp
-$(RT_JAR_MANIFEST_FILE): $(MAINMANIFEST) $(BEANMANIFEST)
-	$(prep-target)
-	$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" 		\
-	       -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
-	       $(MAINMANIFEST) >> $@
-	$(ECHO) >> $@
-	$(CAT) $(BEANMANIFEST) >> $@
-
-OTHER_JAR_MANIFEST_FILE=$(IMAGES_OUTPUTDIR)/tmp/other_manifest.tmp
-$(OTHER_JAR_MANIFEST_FILE): $(MAINMANIFEST)
-	$(prep-target)
-	$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" 		\
-	       -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
-	       $(MAINMANIFEST) >> $@
-
-# Create resources.jar containing non-class files
-RESOURCES_JAR=$(IMAGES_OUTPUTDIR)/tmp/resources-orig.jar
-$(RESOURCES_JAR): $(RES_JAR_FILELIST) $(OTHER_JAR_MANIFEST_FILE)
-	$(prep-target)
-	$(CD) $(CLASSBINDIR) && \
-	    $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(OTHER_JAR_MANIFEST_FILE) $@ \
-	        @$(RES_JAR_FILELIST) $(BOOT_JAR_JFLAGS)
-	$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
-
-# Create jsse.jar containing SunJSSE implementation classes
-JSSE_JAR=$(IMAGES_OUTPUTDIR)/tmp/jsse-orig.jar
-$(JSSE_JAR): $(OTHER_JAR_MANIFEST_FILE)
-	$(prep-target)
-	$(CD) $(CLASSBINDIR) && \
-	    $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(OTHER_JAR_MANIFEST_FILE) $@ \
-		$(JSSE_CLASSES_DIRS) $(BOOT_JAR_JFLAGS)
-	@$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
-
-# Create dnsns.jar 
-# Create without manifest for now to not differ with old buildsystem.
-DNS_JAR=$(IMAGES_OUTPUTDIR)/tmp/dns-orig.jar
-$(DNS_JAR): $(OTHER_JAR_MANIFEST_FILE)
-	$(prep-target)
-	$(CD) $(CLASSBINDIR) && \
-	    $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS_NOMANIFEST) $@ \
-		$(DNS_CLASSES_DIRS) $(BOOT_JAR_JFLAGS)
-	@$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
-
-# Create localedata.jar containing localedata for non european languages
-LOCALEDATA_JAR=$(IMAGES_OUTPUTDIR)/localedata-orig.jar
-$(LOCALEDATA_JAR): $(LOCALEDATA_JAR_FILES)
-	$(prep-target)
-# Create without manifest for now to not differ with old buildsystem.
-#	$(CD) $(CLASSBINDIR) && \
-#	    $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(OTHER_JAR_MANIFEST_FILE) $@ \
-#	        $(LOCALEDATA_JAR_DIRS) $(BOOT_JAR_JFLAGS)
-	$(CD) $(CLASSBINDIR) && \
-	    $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS_NOMANIFEST) $@ \
-	        $(LOCALEDATA_JAR_DIRS) $(BOOT_JAR_JFLAGS)
-	$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
-
-# Create sec-bin.zip
-SEC_FILES_ZIP=$(IMAGES_OUTPUTDIR)/tmp/sec-bin.zip
-sec-files::
-	$(prep-target)
-	$(RM) $(SEC_FILES_ZIP)
-	$(CD) $(OUTPUTDIR) && \
-		$(ZIPEXE) -rq9 $(SEC_FILES_ZIP) $(SEC_FILES_DIRS)
-	$(java-vm-cleanup)
-
-# Create sec-windows-bin.zip
-SEC_FILES_WIN_ZIP=$(IMAGES_OUTPUTDIR)/tmp/sec-windows-bin.zip
-sec-files-win::
-ifeq ($(PLATFORM), windows)
-	$(prep-target)
-	$(RM) $(SEC_FILES_WIN_ZIP)
-	$(CD) $(OUTPUTDIR) && \
-		$(ZIPEXE) -rq9 $(SEC_FILES_WIN_ZIP) $(SEC_FILES_WIN_DIRS)
-	$(java-vm-cleanup)
-endif
-
-# Create JGSS files that contains the native Kerberos library
-JGSS_WIN32_FILES_ZIP=$(IMAGES_OUTPUTDIR)/tmp/jgss-windows-i586-bin.zip
-JGSS_WIN64_FILES_ZIP=$(IMAGES_OUTPUTDIR)/tmp/jgss-windows-x64-bin.zip
-jgss-files::
-ifeq ($(PLATFORM), windows)
-	$(prep-target)
-  ifeq ($(ARCH_DATA_MODEL), 32)
-	$(RM) $(JGSS_WIN32_FILES_ZIP)
-	$(CD) $(OUTPUTDIR) && \
-		$(ZIPEXE) -rq9 $(JGSS_WIN32_FILES_ZIP) $(JGSS_FILES_DIRS)
-  else
-	$(RM) $(JGSS_WIN64_FILES_ZIP)
-	$(CD) $(OUTPUTDIR) && \
-		$(ZIPEXE) -rq9 $(JGSS_WIN64_FILES_ZIP) $(JGSS_FILES_DIRS)
-  endif
-	$(java-vm-cleanup)
-endif
-
-# Create rt.jar
-RT_JAR=$(IMAGES_OUTPUTDIR)/tmp/rt-orig.jar
-$(RT_JAR): $(RT_JAR_FILELIST) $(RT_JAR_MANIFEST_FILE)
-	$(prep-target)
-	$(CD) $(CLASSBINDIR) && \
-	    $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(RT_JAR_MANIFEST_FILE) $@ \
-	        @$(RT_JAR_FILELIST) $(BOOT_JAR_JFLAGS)
-	$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
-
-# SE-Embedded targets if enabled
-include $(JDK_TOPDIR)/makefiles/common/Release-embedded.gmk
-
-
-######################################################
-# JRE Image
-######################################################
-
-initial-image-jre-setup:
-	$(RM) -r $(JRE_IMAGE_DIR)
-	$(MKDIR) -p $(JRE_IMAGE_DIR)
-
-# 64-bit solaris jre image contains only the 64-bit add-on files.
-initial-image-jre-sol64:: initial-image-jre-setup
-	@# Use tar instead of cp to preserve the symbolic links
-	for dir in bin lib ; do \
-	  ( $(CD) $(OUTPUTDIR) && \
-		$(TAR) cf - `$(FIND) $$dir -name '$(ARCH)' -print` | \
-		($(CD) $(JRE_IMAGE_DIR) && $(TAR) xf -) ) ; \
-	done
-	@# Remove some files from the jre area
-	for t in $(NOTJRETOOLS) ; do \
-	    $(RM) $(JRE_IMAGE_DIR)/bin$(ISA_DIR)/$$t ; \
-	done
-	for l in $(NOTJRELIBS) ; do \
-	    $(RM) $(JRE_IMAGE_DIR)/lib/$$l ; \
-	done
-	$(RM) `$(FIND) $(JRE_IMAGE_DIR)/lib -name 'orb.idl'`
-	$(RM) `$(FIND) $(JRE_IMAGE_DIR)/lib -name 'ir.idl'`
-
-# Construct an initial jre image (initial jdk jre) no trimming or stripping
-# See "initial-image-jdk-setup" for an explanation of the rm of
-# drive names like C:
-initial-image-jre:: initial-image-jre-setup \
-		    $(JRE_DOCFILES) \
-		    $(RT_JAR) $(RESOURCES_JAR) $(JSSE_JAR) $(JFR_JAR) $(DNS_JAR) $(LOCALEDATA_JAR) \
-		    $(BUILD_TOOLS)
-	@# Copy in bin directory
-	$(CD) $(OUTPUTDIR) && $(FIND) bin -depth | $(CPIO) -pdum $(JRE_IMAGE_DIR)
-	@# CTE plugin security change require new empty directory lib/applet
-	$(MKDIR) -p $(JRE_IMAGE_DIR)/lib/applet
-	@# Copy in lib directory
-	$(CD) $(OUTPUTDIR) && $(FIND) lib -depth | $(CPIO) -pdum $(JRE_IMAGE_DIR)
-  ifeq ($(USING_CYGWIN),true)
-	  $(RM) -rf $(JRE_IMAGE_DIR)/[A-Za-z]:
-	  $(RM) -rf $(OUTPUTDIR)/[A-Za-z]:
-  endif
-	@# Make sure all directories are read/execute for everyone
-	$(CHMOD) a+rx `$(FIND) $(JRE_IMAGE_DIR) -type d`
-	@# Remove some files from the jre area
-	for t in $(NOTJRETOOLS) ; do \
-	    $(RM) $(JRE_IMAGE_DIR)/bin$(ISA_DIR)/$$t ; \
-	done
-	for l in $(NOTJRELIBS) ; do \
-	    $(RM) $(JRE_IMAGE_DIR)/lib/$$l ; \
-	done
-	@# Remove orb.idl and ir.idl from jre
-	$(FIND) $(JRE_IMAGE_DIR)/lib -name 'orb.idl' -exec $(RM) \{} \;
-	$(FIND) $(JRE_IMAGE_DIR)/lib -name 'ir.idl' -exec $(RM) \{} \;
-	@# Copy in rt.jar & resources.jar file
-	$(CP) $(RT_JAR) $(JRE_IMAGE_DIR)/lib/rt.jar
-	$(CP) $(RESOURCES_JAR) $(JRE_IMAGE_DIR)/lib/resources.jar
-	$(CP) $(JSSE_JAR) $(JRE_IMAGE_DIR)/lib/jsse.jar
-ifneq ($(JFR_JAR),)
-	$(CP) $(JFR_JAR) $(JRE_IMAGE_DIR)/lib/jfr.jar
-endif
-	$(CP) $(DNS_JAR) $(JRE_IMAGE_DIR)/lib/ext/dnsns.jar
-	$(CP) $(LOCALEDATA_JAR) $(JRE_IMAGE_DIR)/lib/ext/localedata.jar
-	@# Generate meta-index to make boot and extension class loaders lazier
-	$(CD) $(JRE_IMAGE_DIR)/lib && \
-	    $(TOOL_BUILDMETAINDEX) \
-		-o meta-index *.jar
-	$(CD) $(JRE_IMAGE_DIR)/lib && $(java-vm-cleanup)
-	$(CD) $(JRE_IMAGE_DIR)/lib/ext && \
-	    $(TOOL_BUILDMETAINDEX) \
-		-o meta-index *.jar
-	$(CD) $(JRE_IMAGE_DIR)/lib/ext && $(java-vm-cleanup)
-ifeq ($(PLATFORM), macosx)
-	@#install jobjc, apple mac only
-	$(CP) $(OUTPUTDIR)/JObjC.build/JObjC.jar $(JRE_IMAGE_DIR)/lib/JObjC.jar
-endif
-ifeq ($(PLATFORM), windows)
-	@# Remove certain *.lib files
-	$(CD) $(JRE_IMAGE_DIR)/lib && \
-            $(RM) java.$(LIB_SUFFIX) jvm.$(LIB_SUFFIX) \
-                  awt.$(LIB_SUFFIX) jawt.$(LIB_SUFFIX)
-  ifeq ($(ARCH_DATA_MODEL), 32)
-	@# The Java Kernel JRE image ships with a special VM.  It is not included
-	@# in the full JRE image, so remove it.  Also, is it only for 32-bit windows.
-	$(CD) $(JRE_IMAGE_DIR)/bin && $(RM) -r kernel
-  endif
-endif # Windows
-ifneq ($(PLATFORM), windows)
-	$(call copy-man-pages,$(JRE_IMAGE_DIR),$(JRE_MAN_PAGES))
-endif # !windows
-
-# Trim out any extra files not for the jre shipment but wanted in the jdk jre.
-#   (Note the jdk WILL want the jre image before this trimming)
-#   Removes server VM on Windows 32bit.
-#   Remove certain shared libraries that should not be in the jre image
-#      but should be in the jdk jre image.
-trim-image-jre::
-	@# Clean out all _the. files.
-	$(FIND) $(JRE_IMAGE_DIR) -name "_the.*" $(FIND_DELETE)
-ifeq ($(PLATFORM), windows)
-  ifeq ($(ARCH_DATA_MODEL), 32)
-	$(RM) -r $(JRE_IMAGE_DIR)/bin/server
-  endif
-  ifdef NOTJRE_SHARED_LIBS
-	for l in $(NOTJRE_SHARED_LIBS) ; do \
-	    $(RM) $(JRE_IMAGE_DIR)/bin/$$l ; \
-	done ;
-  endif
-else # PLATFORM
-  ifdef NOTJRE_SHARED_LIBS
-	for l in $(NOTJRE_SHARED_LIBS) ; do \
-	    $(RM) $(JRE_IMAGE_DIR)/lib/$(LIBARCH)/$$l ; \
-	done ;
-  endif
-endif # PLATFORM
-
-# Get list of all binary (COFF or Elf) files in the jre
-JRE_BIN_LIST=$(TEMPDIR)/jre-bin-files.list
-$(JRE_BIN_LIST):
-	$(RM) $@
-ifeq ($(PLATFORM), windows)
-	$(FIND) $(JRE_IMAGE_DIR)/bin -type f -name \*.exe \
-	   -o -name \*.dll | $(EGREP) -v -i "$(MSVCRNN_DLL)" > $@
-else
-	$(FIND) $(JRE_IMAGE_DIR)/lib -type f -name \*.$(LIB_SUFFIX) >> $@
-	$(FILE) `$(FIND) $(JRE_IMAGE_DIR)/bin -type f -name \*$(EXE_SUFFIX)` \
-	    | $(EGREP) 'ELF' | $(CUT) -d':' -f1 >> $@
-endif
-
-# Post process the image (strips and mcs on Elf files we are shipping)
-#   (Note the jdk WILL want the jre image before this processing)
-process-image-jre:: $(JRE_BIN_LIST)
-ifneq ($(POST_STRIP_PROCESS), )
-	@for f in `$(CAT) $(JRE_BIN_LIST)`; do \
-	  $(CHMOD) u+w $${f}; \
-	  $(ECHO) $(POST_STRIP_PROCESS) $${f}; \
-	  $(POST_STRIP_PROCESS) $${f}; \
-	  $(CHMOD) go-w $${f}; \
-	done
-endif
-ifneq ($(POST_MCS_PROCESS), )
-	@for f in `$(CAT) $(JRE_BIN_LIST)`; do \
-	  $(CHMOD) u+w $${f}; \
-	  $(ECHO) $(POST_MCS_PROCESS) $${f}; \
-	  $(POST_MCS_PROCESS) $${f}; \
-	  $(CHMOD) go-w $${f}; \
-	done
-endif
-	@for f in `$(CAT) $(JRE_BIN_LIST)`; do \
-	  $(call binary_file_verification,$${f}); \
-	done
-	$(RM) $(JRE_BIN_LIST)
-
-######################################################
-# JDK Image
-######################################################
-# Note: cpio ($(CPIO)) sometimes leaves directories without rx access.
-
-# REMIND: the $(RM) calls for patterns like c:, d: following $(CPIO)
-# are because the 1.7.x versions of cygwin's cpio command drops these
-# in the working directory if the output path begins with that pattern
-# The one for the output jre subdirectory gets there because cpio sees its
-# own dropping in the input jre subdirectory. Need to remove both of these.
-# We can remove these RM's if someone figures out how to stop cpio from
-# leaving these there.
-# Note that its a real problem not because this directory can end up in the
-# bundle (I think it won't since it not in bin or lib and those are the
-# only places from which we copy everything), but because the presence
-# of this file causes cygwin's find to bomb out, thus breaking the build
-# in "install".
-initial-image-jdk-setup:
-	$(RM) -r $(JDK_IMAGE_DIR)
-	$(MKDIR) -p $(JDK_IMAGE_DIR)/jre
-	($(CD) $(JRE_IMAGE_DIR) && $(FIND) . -depth -print \
-	      | $(CPIO) -pdum $(JDK_IMAGE_DIR)/jre )
-  ifeq ($(USING_CYGWIN),true)
-	  $(RM) -rf $(JRE_IMAGE_DIR)/[A-Za-z]:
-	  $(RM) -rf $(JDK_IMAGE_DIR)/jre/[A-Za-z]:
-  endif
-	$(RM) -rf $(JDK_IMAGE_DIR)/jre/man
-	$(CHMOD) a+rx `$(FIND) $(JDK_IMAGE_DIR) -type d`
-
-initial-image-jdk64-bindemos:
-	for dir in bin demo ; do \
-	  ( $(CD) $(OUTPUTDIR) && \
-		$(TAR) cf - `$(FIND) $$dir -name '$(LIBARCH)' -print` | \
-		($(CD) $(JDK_IMAGE_DIR) && $(TAR) xf -) ) ; \
-        done
-
-# Solaris 64 bit image is special
-initial-image-jdk-sol64:: initial-image-jdk-setup \
-			  initial-image-jdk64-bindemos
-
-# DB files to add
-ifdef OPENJDK
-
-initial-image-jdk-db:
-
-else
-
-# Create the list of db *.zip files to bundle with jdk
-ABS_DB_PATH  :=$(call FullPath,$(CLOSED_SHARE_SRC)/db)
-DB_ZIP_LIST := $(shell $(LS) $(ABS_DB_PATH)/*.zip 2>/dev/null)
-# Can't have : in these file names as they are used in a rule
-# below.
-ifdef USING_CYGWIN
-    DB_ZIP_LIST:=$(shell $(CYGPATH) -a -u $(DB_ZIP_LIST))
-endif
-
-# Java DB image. Move the Java DB demo directory into the JDK's demo
-# dir and in the process, rename it to db.  Also remove index.html,
-# since it presumes docs are co-located. Also remove register.html (no
-# longer relevant).
-initial-image-jdk-db: $(DB_ZIP_LIST)
-	$(MKDIR) -p $(JDK_IMAGE_DIR)/db
-	for d in $(DB_ZIP_LIST); do \
-          ($(CD) $(JDK_IMAGE_DIR)/db && $(UNZIP) -o $$d); \
-	done
-	$(CP) $(ABS_DB_PATH)/README-JDK.html $(JDK_IMAGE_DIR)/db
-ifndef NO_DEMOS
-	$(RM) -rf $(NEWDEMODIR)/db
-	$(MV) $(JDK_IMAGE_DIR)/db/demo $(NEWDEMODIR)/db
-	$(CP) $(ABS_DB_PATH)/README-JDK-DEMOS.html $(NEWDEMODIR)/db/
-else
-	$(RM) -rf $(JDK_IMAGE_DIR)/db/demo
-endif
-	$(RM) $(JDK_IMAGE_DIR)/db/index.html $(JDK_IMAGE_DIR)/db/register.html
-endif
-
-# The launcher source files we need for src.zip
-FILES_launcher = $(wildcard $(SHARE_SRC)/bin/*) \
-                 $(wildcard $(PLATFORM_SRC)/bin/java_md*)
-
-# Standard jdk image
-initial-image-jdk:: initial-image-jdk-setup \
-		    initial-image-jdk-db \
-		    $(JDK_DOCFILES) \
-		    $(JDK_DEMOS_AND_SAMPLES_DOCFILES)
-	$(MKDIR) $(JDK_IMAGE_DIR)/lib
-	@#
-	@# Copy in the jars in lib that only belong in the JDK
-	@#
-	for l in $(NOTJRELIBS); do \
-	    if [ -r $(LIBDIR)/$$l ]; then \
-	        $(CP) $(LIBDIR)/$$l $(JDK_IMAGE_DIR)/lib; \
-	    fi; \
-	done
-  ifeq ($(PLATFORM), windows)
-	@#
-	@# lib/
-	@#
-	$(CP) $(LIBDIR)/$(LIB_PREFIX)jvm.$(LIB_SUFFIX) $(JDK_IMAGE_DIR)/lib
-	$(CP) $(LIBDIR)/$(LIB_PREFIX)jawt.$(LIB_SUFFIX) $(JDK_IMAGE_DIR)/lib
-	@#
-	@# bin/
-	@#
-	@# copy all EXE files and only certain DLL files from BINDIR
-	$(MKDIR) -p $(JDK_IMAGE_DIR)/bin
-	$(CP) $(BINDIR)/*$(EXE_SUFFIX) $(JDK_IMAGE_DIR)/bin
-	$(CP) $(BINDIR)/jli.$(LIBRARY_SUFFIX) $(JDK_IMAGE_DIR)/bin
-    ifeq ($(COMPILER_VERSION), VS2010)
-	$(CP) $(BINDIR)/msvc*100.$(LIBRARY_SUFFIX) $(JDK_IMAGE_DIR)/bin
-    endif
-  else # PLATFORM
-	@#
-	@# bin/
-	@#
-	($(CD) $(BINDIR)/.. && $(TAR) cf - \
-	    `$(FIND) bin \( -type f -o -type l \) -print `) | \
-	    ($(CD) $(JDK_IMAGE_DIR) && $(TAR) xf -)
-  endif # PLATFORM
-	@#
-	@# lib/tools.jar
-	@#
-	$(MKDIR) -p $(IMAGES_OUTPUTDIR)/lib
-	$(CD) $(CLASSBINDIR) && \
-	    $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS_NOMANIFEST) $(IMAGES_OUTPUTDIR)/lib/tools.jar \
-	        $(TOOLS) $(BOOT_JAR_JFLAGS)
-	$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
-	$(CP) $(IMAGES_OUTPUTDIR)/lib/tools.jar $(JDK_IMAGE_DIR)/lib/tools.jar
-	@#
-	@# lib/ct.sym
-	@#
-	$(MKDIR) -p $(IMAGES_OUTPUTDIR)/symbols/META-INF/sym
-	$(BOOT_JAVA_CMD) \
-		-Xbootclasspath/p:$(JAVAC_JAR) \
-		-Xbootclasspath/a:$(JDK_OUTPUTDIR)/classes \
-		-jar $(JAVAC_JAR) $(JAVACFLAGS) \
-	    -XDprocess.packages -proc:only \
-	    -processor com.sun.tools.javac.sym.CreateSymbols \
-	    -Acom.sun.tools.javac.sym.Jar=$(RT_JAR) \
-	    -Acom.sun.tools.javac.sym.Dest=$(IMAGES_OUTPUTDIR)/symbols/META-INF/sym/rt.jar \
-	    $(CORE_PKGS) $(NON_CORE_PKGS) $(EXCLUDE_PROPWARN_PKGS) $(EXPORTED_PRIVATE_PKGS)
-	$(BOOT_JAR_CMD) $(CREATE_JAR_OPTS_NOMANIFEST) $(IMAGES_OUTPUTDIR)/lib/ct.sym \
-	    -C $(IMAGES_OUTPUTDIR)/symbols META-INF $(BOOT_JAR_JFLAGS)
-	$(java-vm-cleanup)
-	$(CP) $(IMAGES_OUTPUTDIR)/lib/ct.sym $(JDK_IMAGE_DIR)/lib/ct.sym
-	@#
-	@# CORBA supported orb.idl and ir.idl should be copied to lib
-	@#
-	$(CP) $(LIBDIR)/orb.idl $(JDK_IMAGE_DIR)/lib/orb.idl
-	$(CP) $(LIBDIR)/ir.idl $(JDK_IMAGE_DIR)/lib/ir.idl
-  ifeq ($(PLATFORM), linux)
-	@#
-	@# on Linux copy jexec from jre/lib to /lib
-	@#
-	$(CP) $(LIBDIR)/jexec $(JDK_IMAGE_DIR)/lib/jexec
-  endif # PLATFORM
-	@#
-	@# src.zip
-	@#
-	$(MKDIR) -p $(JDK_IMAGE_DIR)/src
-	@#
-	@# The '*-*' pattern in the find command excludes files named with dashes,
-	@# such as the java.nio templates for generated classes
-	@#
-	@# The Linux 'tar' command cannot handle the huge command line argument
-	@# generated by the more efficient solaris/windows method of copying files.
-	@# So for Linux, make use of the -T option (like Solaris' -I option) of
-	@# obtaining the list of files from a file. MKS tar has no such option.
-
-  ifneq (,$(findstring $(PLATFORM), linux macosx))
-	for d in $(SOURCE_DIRS); do \
-	  $(RM) $(IMAGES_OUTPUTDIR)/tmp/src-files.list; \
-	  ($(CD) $$d &&  \
-	    for sd in $(SOURCES) ; do \
-              if [ -d $$sd ] ; then \
-	        $(FIND) $$sd $(SOURCE_FILES_filter) \
-		        -name '*.java' -print \
-		        >> $(IMAGES_OUTPUTDIR)/tmp/src-files.list ; \
-	      fi; \
-	    done ; \
-	  ) ; \
-	  if [ -f  $(IMAGES_OUTPUTDIR)/tmp/src-files.list ] ; then \
-	    ($(CD) $$d && $(TAR) cf - -T $(IMAGES_OUTPUTDIR)/tmp/src-files.list ) \
-	       | ($(CD) $(JDK_IMAGE_DIR)/src && $(TAR) xf -); \
-	  fi; \
-	done
-  else
-	for d in $(SOURCE_DIRS); do \
-	  $(RM) $(IMAGES_OUTPUTDIR)/tmp/src-files.list; \
-	  ($(CD) $$d && \
-	    for sd in $(SOURCES) ; do \
-              if [ -d $$sd ] ; then \
-	        $(FIND) $$sd $(SOURCE_FILES_filter) \
-		        -name '*.java' -print \
-		        >> $(IMAGES_OUTPUTDIR)/tmp/src-files.list ; \
-	      fi; \
-	    done ; \
-	  ) ; \
-	  if [ -f  $(IMAGES_OUTPUTDIR)/tmp/src-files.list ] ; then \
-	    ($(CD) $$d && $(TAR) cf - `$(CAT) $(IMAGES_OUTPUTDIR)/tmp/src-files.list`) \
-	      | ($(CD) $(JDK_IMAGE_DIR)/src && $(TAR) xf -); \
-	  fi; \
-	done
-  endif
-	$(RM) $(IMAGES_OUTPUTDIR)/tmp/src-files.list
-	$(CHMOD) -R +w $(JDK_IMAGE_DIR)/src
-	$(MKDIR) -p $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(FILES_launcher) $(JDK_IMAGE_DIR)/src/launcher
-	$(CD) $(JDK_IMAGE_DIR)/src && $(ZIPEXE) -qr ../src.zip *
-	$(RM) -r $(JDK_IMAGE_DIR)/src
-	@#
-	@# demo, include
-	@#
-ifndef NO_DEMOS
-	mkdir -p $(JDK_IMAGE_DIR)/demo
-	$(CP) -r -f $(NEWDEMODIR)/* $(JDK_IMAGE_DIR)/demo
-	$(FIND) $(JDK_IMAGE_DIR)/demo -name "_the.*" $(FIND_DELETE)
-endif
-ifndef NO_SAMPLES
-	$(CP) -r -f $(SAMPLEDIR) $(JDK_IMAGE_DIR)
-endif
-	$(CP) -r $(INCLUDEDIR) $(JDK_IMAGE_DIR)
-	@#
-	@# Swing BeanInfo generation
-	@#
-	$(CP) $(JDK_OUTPUTDIR)/lib/dt.jar $(JDK_IMAGE_DIR)/lib/dt.jar
-ifneq ($(PLATFORM), windows)
-	$(call copy-man-pages,$(JDK_IMAGE_DIR),$(JDK_MAN_PAGES))
-endif # !windows
-
-# Trim out files we don't want to ship
-trim-image-jdk::
-	@# Clean out all _the. files.
-	$(FIND) $(JDK_IMAGE_DIR) -name "_the.*" $(FIND_DELETE)
-	@# Remove tools that should not be part of SDK.
-	for t in $(NOTJDKTOOLS); do \
-	    $(RM) $(JDK_IMAGE_DIR)/bin/$${t}$(EXE_SUFFIX); \
-	done
-
-# Get list of binary (COFF or Elf) files in the jdk
-JDK_BIN_LIST=$(TEMPDIR)/jdk-bin-files.list
-$(JDK_BIN_LIST):
-ifeq ($(PLATFORM), windows)
-	$(FIND) $(JDK_IMAGE_DIR)/jre/bin -type f -name \*.exe \
-	   -o -name \*.dll | $(EGREP) -v -i "$(MSVCRNN_DLL)" > $@
-	$(FIND) $(JDK_IMAGE_DIR)/bin -type f -name \*.exe \
-	   -o -name \*.dll | $(EGREP) -v -i "$(MSVCRNN_DLL)" >> $@
-else
-	$(RM) $@
-	$(FIND) $(JDK_IMAGE_DIR)/jre/lib -type f -name \*.$(LIB_SUFFIX) >> $@
-	$(FILE) `$(FIND) $(JDK_IMAGE_DIR)/jre/bin -type f -name \*$(EXE_SUFFIX)` \
-	    | $(EGREP) 'ELF' | $(CUT) -d':' -f1 >> $@
-	$(FILE) `$(FIND) $(JDK_IMAGE_DIR)/bin -type f -name \*$(EXE_SUFFIX)` \
-	    | $(EGREP) 'ELF' | $(CUT) -d':' -f1 >> $@
-endif
-
-# Post process the image (strips and mcs on files we are shipping)
-process-image-jdk:: $(JDK_BIN_LIST)
-ifneq ($(POST_STRIP_PROCESS), )
-	@for f in `$(CAT) $(JDK_BIN_LIST)`; do \
-	  $(CHMOD) u+w $${f}; \
-	  $(ECHO) $(POST_STRIP_PROCESS) $${f}; \
-	  $(POST_STRIP_PROCESS) $${f}; \
-	  $(CHMOD) go-w $${f}; \
-	done
-endif
-ifneq ($(POST_MCS_PROCESS), )
-	@for f in `$(CAT) $(JDK_BIN_LIST)`; do \
-	  $(CHMOD) u+w $${f}; \
-	  $(ECHO) $(POST_MCS_PROCESS) $${f}; \
-	  $(POST_MCS_PROCESS) $${f}; \
-	  $(CHMOD) go-w $${f}; \
-	done
-endif
-	@for f in `$(CAT) $(JDK_BIN_LIST)`; do \
-	  $(call binary_file_verification,$${f}); \
-	done
-	$(RM) $(JDK_BIN_LIST)
-
-###################################################################
-# What did we build
-###################################################################
-
-# The jdk text info file that lives at the root of the install image.
-
-JDK_INFO_FILE = $(JDK_IMAGE_DIR)/release
-JRE_INFO_FILE = $(JRE_IMAGE_DIR)/release
-
-# Common way to emit a line into the release or info file
-define info-file-item # name value
-$(PRINTF) '%s="%s"\n' $1 $2 >> $@
-endef
-
-# Values to emit
-MINIMUM_OS_NAME    := $(REQUIRED_OS_NAME)
-MINIMUM_OS_VERSION := $(REQUIRED_OS_VERSION)
-MINIMUM_OS_ARCH    := $(ARCH)
-ALL_SOURCE_TIPS     = $(shell \
-  if [ -f $(SOURCE_TIPS) ] ; then \
-    $(CAT) $(SOURCE_TIPS) ; \
-  fi)
-
-$(JDK_INFO_FILE): FRC
-	$(prep-target)
-	$(call info-file-item, "JAVA_VERSION", "$(THIS_JDK_VERSION)")
-	$(call info-file-item, "OS_NAME",      "$(MINIMUM_OS_NAME)")
-	$(call info-file-item, "OS_VERSION",   "$(MINIMUM_OS_VERSION)")
-	$(call info-file-item, "OS_ARCH",      "$(MINIMUM_OS_ARCH)")
-	$(call info-file-item, "SOURCE",       "$(ALL_SOURCE_TIPS)")
-
-# Create release file to identify this image
-identify-image-jdk:: $(JDK_INFO_FILE)
-
-$(JRE_INFO_FILE): FRC
-	$(prep-target)
-	$(call info-file-item, "JAVA_VERSION", "$(THIS_JDK_VERSION)")
-	$(call info-file-item, "OS_NAME",      "$(MINIMUM_OS_NAME)")
-	$(call info-file-item, "OS_VERSION",   "$(MINIMUM_OS_VERSION)")
-	$(call info-file-item, "OS_ARCH",      "$(MINIMUM_OS_ARCH)")
-	$(call info-file-item, "SOURCE",       "$(ALL_SOURCE_TIPS)")
-
-# Create release file to identify this image
-identify-image-jre:: $(JRE_INFO_FILE)
-
-images images-clobber::
-	$(ECHO) ">>>Finished making "$@" @ `$(DATE)` ..."
-	$(java-vm-cleanup)
-
-.PHONY: images image-jre image-jdk \
-	initial-image-jre initial-image-jdk \
-	initial-image-jre-sol64 initial-image-jdk-sol64 \
-        initial-image-jdk-setup \
-	initial-image-jdk-db \
-        initial-image-jdk64-bindemos \
-        initial-image-jre-setup \
-	trim-image-jre trim-image-jdk \
-	process-image-jre process-image-jdk \
-	identify-image-jre identify-image-jdk \
-	images-clobber
-
-# Force rule
-FRC:
-
--- a/jdk/makefiles/common/Rules.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,357 +0,0 @@
-#
-# Copyright (c) 1995, 2008, 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.
-#
-
-#
-#
-# Rules shared by all Java makefiles.
-#
-# Used to apply to source file $<, checks code conventions, issues warnings.
-define check-conventions
-  if [ "$(CONVENTION_WATCH)" = "true" ] ; then \
-    if [ "`$(CAT) -n -v -t $< | $(EGREP) -v '\@\(\#\)' | $(EGREP) '\^[MLI]'`" != "" ] ; then \
-      $(ECHO) "WARNING: File contains tabs, ^M, or ^L characters: $<"; \
-      if [ "$(CONVENTION_DETAILS)" = "true" ] ; then \
-        $(CAT) -n -v -t $< | $(EGREP) -v '\@\(\#\)' | $(EGREP) '\^[MLI]' ; \
-      fi; \
-    fi; \
-  fi
-endef
-
-# Make sure the default rule is all
-rules_default_rule: all
-
-#
-# Directory set up.  (Needed by deploy workspace)
-# 
-$(CLASSDESTDIR) $(CLASSHDRDIR) $(OBJDIR) $(OUTPUTDIR) $(BINDIR) $(LIBDIR) $(LIBDIR)/$(LIBARCH) $(TEMPDIR) $(EXTDIR):
-	$(MKDIR) -p $@ 
-
-#
-# All source tree areas for java/properties files (a few may be closed)
-#
-ifeq ($(PLATFORM), macosx)
-  ifdef OPENJDK
-    ALL_CLASSES_SRC = $(call JavaSrcDirList,,classes)
-  else
-    ALL_CLASSES_SRC = \
-	  $(CLOSED_SHARE_SRC)/classes $(CLOSED_PLATFORM_SRC)/classes \
-	  $(call JavaSrcDirList,,classes)
-  endif
-else
-  ifdef OPENJDK
-    ALL_CLASSES_SRC = $(SHARE_SRC)/classes $(PLATFORM_SRC)/classes
-  else
-    ALL_CLASSES_SRC = \
-	  $(CLOSED_SHARE_SRC)/classes $(CLOSED_PLATFORM_SRC)/classes \
-	  $(SHARE_SRC)/classes $(PLATFORM_SRC)/classes
-  endif
-endif
-
-#
-# If AUTO_FILES_PROPERTIES_DIRS used, automatically find properties files
-#
-ifdef AUTO_FILES_PROPERTIES_DIRS
-  AUTO_FILES_PROPERTIES_FILTERS1  = $(SCM_DIRs) ',*'
-  AUTO_FILES_PROPERTIES_FILTERS1 += $(AUTO_PROPERTIES_PRUNE)
-  FILES_properties_find_filters1 = $(AUTO_FILES_PROPERTIES_FILTERS1:%=-name % -prune -o)
-  FILES_properties_auto1 := \
-     $(shell \
-        for dir in $(ALL_CLASSES_SRC) ; do \
-          if [ -d $$dir ] ; then \
-            ( $(CD) $$dir; \
-              for sdir in $(AUTO_FILES_PROPERTIES_DIRS); do \
-                if [ -d $$sdir ] ; then \
-                  $(FIND) $$sdir $(FILES_properties_find_filters1) \
-                                 -name '*.properties' -print ; \
-                fi ; \
-              done \
-            ); \
-          fi; \
-        done \
-      )
-else
-  FILES_properties_auto1 =
-endif # AUTO_FILES_PROPERTIES_DIRS
-
-# Add any automatically found properties files to the properties file list
-FILES_properties += $(FILES_properties_auto1)
-
-#
-# Get Resources help
-#
-include $(JDK_TOPDIR)/makefiles/common/internal/Resources.gmk
-
-#
-# Compiling .java files.
-#
-
-#
-# Automatically add to FILES_java if AUTO_FILES_JAVA_DIRS is defined
-#
-#    There are two basic types of sources, normal source files and the
-#    generated ones. The Normal sources will be located in:
-#         $(ALL_CLASSES_SRC)
-#    The generated sources, which might show up late to dinner, are at:
-#         $(GENSRCDIR)
-#    and since they could be generated late, we need to be careful that
-#    we look for these sources late and not use the ':=' assignment which
-#    might miss their generation.
-
-ifdef AUTO_FILES_JAVA_DIRS
-  # Filter out these files or directories
-  AUTO_FILES_JAVA_SOURCE_FILTERS1  = $(SCM_DIRs) ',*'
-  AUTO_FILES_JAVA_SOURCE_FILTERS2  = 
-  AUTO_FILES_JAVA_SOURCE_FILTERS1 += $(AUTO_JAVA_PRUNE)
-  AUTO_FILES_JAVA_SOURCE_FILTERS2 += $(AUTO_JAVA_PRUNE)
-
-  # First list is the normal sources that should always be there,
-  #   by using the ':=', which means we do this processing once.
-  FILES_java_find_filters1 = $(AUTO_FILES_JAVA_SOURCE_FILTERS1:%=-name % -prune -o)
-  FILES_java_auto1 := \
-     $(shell \
-        for dir in $(ALL_CLASSES_SRC) ; do \
-          if [ -d $$dir ] ; then \
-            ( $(CD) $$dir; \
-              for sdir in $(AUTO_FILES_JAVA_DIRS); do \
-                if [ -d $$sdir ] ; then \
-                  $(FIND) $$sdir $(FILES_java_find_filters1) \
-                                 -name '*.java' -print ; \
-                fi ; \
-              done \
-            ); \
-          fi; \
-        done \
-      )
-  # Second list is the generated sources that should be rare, but will likely
-  #   show up late and we need to look for them at the last minute, so we
-  #   cannot use the ':=' assigment here. But if this gets expanded multiple
-  #   times, the if tests should make them relatively cheap.
-  FILES_java_find_filters2 = $(AUTO_FILES_JAVA_SOURCE_FILTERS2:%=-name % -prune -o)
-  FILES_java_auto2 = \
-     $(shell \
-        for dir in $(GENSRCDIR); do \
-          if [ -d $$dir ] ; then \
-            ( $(CD) $$dir; \
-              for sdir in $(AUTO_FILES_JAVA_DIRS); do \
-                if [ -d $$sdir ] ; then \
-                  $(FIND) $$sdir $(FILES_java_find_filters2) \
-                                 -name '*.java' -print ; \
-                fi ; \
-              done \
-            ); \
-          fi; \
-        done \
-      )
-else
-  FILES_java_auto1 =
-  FILES_java_auto2 =
-endif
-
-# Add all found java sources to FILES_java macro (if AUTO_FILES_JAVA_DIRS used)
-FILES_java += $(FILES_java_auto1) $(FILES_java_auto2)
-
-# File that will hold java source names that need compiling
-JAVA_SOURCE_LIST=$(TEMPDIR)/.classes.list
-
-# Add a java source to the list
-define add-java-file
-$(ECHO) "$?" >> $(JAVA_SOURCE_LIST)
-$(check-conventions)
-endef
-
-ifdef DEMOS
-$(CLASSDESTDIR)/%.class: $(SOURCEPATH)/%.java
-	$(add-java-file)
-#Redirect zh_HK java files to tmp directory which created from zh_TW
-#$(CLASSDESTDIR)/%_zh_HK.class: $(JDK_L10N_TMP_OUTPUTDIR)/%_zh_HK.java
-#	$(add-java-file)
-else
-
-#
-# Rules for closed files
-#
-# If filenames are duplicated between open/closed workspaces, prefer
-# the closed files.
-#
-# Rule ordering in this Makefile is important: some targets depend
-# on closed files replacing open ones, and thus the closed file rules
-# must be found before the open ones.
-#
-# Don't reorder without consulting teams that depend on this behavior.
-#
-ifndef OPENJDK
-$(CLASSDESTDIR)/%.class: $(CLOSED_PLATFORM_SRC)/classes/%.java
-	$(add-java-file)
-$(CLASSDESTDIR)/%.class: $(CLOSED_SHARE_SRC)/classes/%.java
-	$(add-java-file)
-endif
-
-$(CLASSDESTDIR)/%.class: $(GENSRCDIR)/%.java
-	$(add-java-file)
-
-ifeq ($(PLATFORM), macosx)
-$(CLASSDESTDIR)/%.class: $(JDK_TOPDIR)/src/macosx/classes/%.java
-	$(add-java-file)
-endif
-$(CLASSDESTDIR)/%.class: $(PLATFORM_SRC)/classes/%.java
-	$(add-java-file)
-
-$(CLASSDESTDIR)/%.class: $(SHARE_SRC)/classes/%.java
-	$(add-java-file)
-
-#Redirect zh_HK java files to tmp directory which created from zh_TW
-$(CLASSDESTDIR)/%_zh_HK.class: $(JDK_L10N_TMP_OUTPUTDIR)/%_zh_HK.java
-	$(add-java-file)
-endif
-
-# List of class files needed
-FILES_class = $(FILES_java:%.java=$(CLASSDESTDIR)/%.class)
-
-# Got to include exported files.
-FILES_class += $(FILES_export:%.java=$(CLASSDESTDIR)/%.class)
-
-# Construct list of java sources we need to compile
-source_list_prime:
-	mkdir -p $(TEMPDIR)
-# Note that we slip resources in so that compiled properties files get created:
-$(JAVA_SOURCE_LIST) : source_list_prime resources $(FILES_class)
-	touch $@
-
-.delete.classlist:
-	rm -f $(JAVA_SOURCE_LIST)
-
-# Make sure all newer sources are compiled (in a batch)
-classes : $(CLASSES_INIT) .delete.classlist .compile.classlist
-
-.compile.classlist : $(JAVA_SOURCE_LIST)
-	$(MKDIR) -p $(CLASSDESTDIR)
-	$(RM) $<.filtered
-	$(CAT) $< | $(NAWK) 'length>0' | $(SORT) -u > $<.filtered
-	numfiles=`$(WC) -l < $<.filtered` ; \
-	  if [ $$numfiles -ge 1 ] ; then \
-	    $(ECHO) "# Java sources to be compiled: (listed in file $<)"; \
-	    $(CAT) $<.filtered; \
-	    $(ECHO) "# Running javac: $$numfiles files; in $(CURDIR)"; \
-	    $(ECHO) $(JAVAC_CMD) -sourcepath "$(SOURCEPATH)" -d $(CLASSDESTDIR) @$<.filtered; \
-	    $(JAVAC_CMD) -sourcepath "$(SOURCEPATH)" -d $(CLASSDESTDIR) @$<.filtered && \
-	    $(ECHO) "# javac finished"; \
-	  fi
-	$(java-vm-cleanup)
-
-clobber clean::
-	rm -f $(JAVA_SOURCE_LIST)
-
-ifndef DONT_CLOBBER_CLASSES
-  ifndef PACKAGE
-    DONT_CLOBBER_CLASSES = true
-  else
-    DONT_CLOBBER_CLASSES = false
-  endif
-endif
-
-packages.clean:
-ifeq ($(DONT_CLOBBER_CLASSES),false)
-  ifdef AUTO_FILES_JAVA_DIRS
-	for sdir in $(AUTO_FILES_JAVA_DIRS); do \
-	  echo "rm -f -r $(CLASSDESTDIR)/$$sdir"; \
-	  rm -f -r $(CLASSDESTDIR)/$$sdir; \
-        done
-  else
-	rm -f -r $(CLASSDESTDIR)/$(PKGDIR)
-  endif
-endif
-
-ifdef DEMOS
-classes.clean:
-	rm -f -r $(DEMODST) $(CLASSDESTDIR)
-else
-classes.clean: packages.clean
-	rm -f $(JAVA_SOURCE_LIST)
-endif
-
-#
-# C and C++ make dependencies
-#
-include $(JDK_TOPDIR)/makefiles/common/internal/NativeCompileRules.gmk
-
-#
-# Running Javah to generate stuff into CClassHeaders.
-#
-
-ifdef FILES_export
-
-CLASSES.export  = $(subst /,.,$(FILES_export:%.java=%))
-CLASSES.export += $(subst /,.,$(FILES_export2:%.java=%))
-CLASSES.export += $(subst /,.,$(FILES_export3:%.java=%))
-CLASSES_export  = $(FILES_export:%.java=$(CLASSDESTDIR)/%.class)
-CLASSES_export += $(FILES_export2:%.java=$(CLASSDESTDIR)/%.class)
-CLASSES_export += $(FILES_export3:%.java=$(CLASSDESTDIR)/%.class)
-
-# Fix when deploy workspace makefiles don't depend on this name
-#CLASSHDR_DOTFILE=$(CLASSHDRDIR)/.classheaders
-
-CLASSHDR_DOTFILE=$(OBJDIR)/.class.headers.$(ARCH)
-
-classheaders: classes $(CLASSHDR_DOTFILE)
-
-$(CLASSHDR_DOTFILE): $(CLASSES_export)
-	$(prep-target)
-	echo "# Running javah:"
-	echo $(UNCYGDRIVE) $(JAVAH_CMD) -d $(CLASSHDRDIR)/ \
-		$(CLASSES.export) $(subst $$,\$$,$(EXPORTED_inner))
-	$(UNCYGDRIVE) $(JAVAH_CMD) -d $(CLASSHDRDIR)/ \
-		$(CLASSES.export) $(subst $$,\$$,$(EXPORTED_inner))
-	$(java-vm-cleanup)
-	touch $@
-
-classheaders.clean:
-	rm -f $(CLASSHDR_DOTFILE)
-	rm -f -r $(CLASSHDRDIR)
-
-else # FILES_export
-
-classheaders: classes
-
-classheaders.clean: 
-
-endif # FILES_export
-
-clean clobber:: classheaders.clean classes.clean .delete.classlist
-
-# 
-# Default dependencies
-#
-
-all: build
-
-build: classheaders
-
-default: all
-
-.PHONY: all build clean clobber \
-        .delete.classlist classes .compile.classlist classes.clean \
-	 classheaders classheaders.clean \
-	 batch_compile
-
--- a/jdk/makefiles/common/Subdirs.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +0,0 @@
-# Copyright (c) 2010, 2011, 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.
-#
-
-#
-# Generic makefile for building subdirectories.
-#
-# SUBDIRS variables to specify the subdirectories to build recursively.
-# Makefile has to include Subdirs.gmk AFTER all SUBDIRS variables are
-# defined.
-#
-# This file does not contain any rule.
-#
-# WARNING: This file is shared with other workspaces.
-#          So when it includes other files, it must use JDK_TOPDIR.
-
-#
-# SUBDIRS          subdirs for the base module always get built
-# SUBDIRS_<group>  subdirs for the named group
-#
-# By default, subdirs specified in the SUBDIRS and all SUBDIRS_* 
-# variables will be built.
-#
-# Variables of the currently supported groups are:
-#  SUBDIRS_desktop    
-#  SUBDIRS_management
-#  SUBDIRS_enterprise
-#  SUBDIRS_misc
-#  SUBDIRS_tools
-# 
-# Change to the above list also need to update 
-# make/common/shared/Sanity.gmk.  NOTE: this list is subject
-# to change.
-# 
-# Eventually we want to restructure the make directory
-# according to these grouping (e.g. make/desktop/...) and
-# the SUBDIRS_<group> variables would not be needed.
-# 
-
-# Iterate the subdirectories specified in $1.
-# - cd into each subdir and make them
-
-# Given a SUBDIRS* list (first argument), cd into them and make them
-#   SUBDIRS_MAKEFLAGS      Make settings for a subdir make
-#   SUBDIRS_MAKEFLAGS-$@   Make settings specific to this target
-#
-define subdirs-group-loop
-$(ECHO) "Begin Processing SUBDIRS: $($1)"
-for i in DUMMY $($1) ; do \
-  if [ "$$i" != "DUMMY" ] ; then \
-    $(MAKE) -C $$i $@ $(SUBDIRS_MAKEFLAGS) $(SUBDIRS_MAKEFLAGS-$@) \
-            FULL_VERSION=$(FULL_VERSION) RELEASE=$(RELEASE) || exit 1; \
-  fi ; \
-done
-$(ECHO) "Done Processing SUBDIRS: $($1)"
-endef
-
-# Given a OTHERSUBDIRS list, cd into them and make them (extra loop define)
-#   OTHERSUBDIRS_MAKEFLAGS      Make settings for a subdir make
-define OTHERSUBDIRS-loop
-$(ECHO) "Begin Processing OTHERSUBDIRS: $(OTHERSUBDIRS)"
-for i in DUMMY $(OTHERSUBDIRS) ; do \
-  if [ "$$i" != "DUMMY" ] ; then \
-    $(MAKE) -C $$i $@ $(OTHERSUBDIRS_MAKEFLAGS) \
-            FULL_VERSION=$(FULL_VERSION) RELEASE=$(RELEASE) || exit 1; \
-  fi ; \
-done
-$(ECHO) "Done Processing OTHERSUBDIRS: $(OTHERSUBDIRS)"
-endef
-
-#
-# Iterate the list specified in SUBDIRS_<group> only if
-# SUBDIRS_<group> is set.
-#
-ifdef SUBDIRS_desktop 
-  define subdirs-desktop-loop
-      $(call subdirs-group-loop,SUBDIRS_desktop)
-  endef
-else   
-  define subdirs-desktop-loop
-  endef
-endif   # SUBDIRS_desktop 
-
-ifdef SUBDIRS_enterprise 
-  define subdirs-enterprise-loop
-      $(call subdirs-group-loop,SUBDIRS_enterprise)
-  endef
-else   
-define subdirs-enterprise-loop
-endef
-endif   # SUBDIRS_enterprise 
-
-ifdef SUBDIRS_management 
-  define subdirs-management-loop
-      $(call subdirs-group-loop,SUBDIRS_management)
-  endef
-else   
-  define subdirs-management-loop
-  endef
-endif   # SUBDIRS_management 
-
-ifdef SUBDIRS_misc 
-  define subdirs-misc-loop
-      $(call subdirs-group-loop,SUBDIRS_misc)
-  endef
-else   
-  define subdirs-misc-loop
-  endef
-endif   # SUBDIRS_misc 
-
-ifdef SUBDIRS_tools 
-  define subdirs-tools-loop
-      $(call subdirs-group-loop,SUBDIRS_tools)
-  endef
-else   
-  define subdirs-tools-loop
-  endef
-endif   # SUBDIRS_tools 
-
-#
-# If BUILD_MODULES is not set or it's set to "all",
-# iterate all groups.
-SUBDIRS_all = $(SUBDIRS) $(SUBDIRS_desktop) $(SUBDIRS_enterprise) \
-	      $(SUBDIRS_management) $(SUBDIRS_misc) $(SUBDIRS_tools)
-
-define SUBDIRS-loop
-  $(call subdirs-group-loop,SUBDIRS_all)
-endef
--- a/jdk/makefiles/common/internal/Defs-corba.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-#
-# Copyright (c) 1997, 2007, 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.
-#
-
-# The specific packages that come from or go to rt.jar and tools.jar
-IMPORT_RT_PACKAGES +=  \
-     org/omg/CORBA \
-     org/omg/CORBA_2_3 \
-     org/omg/CosNaming \
-     org/omg/Dynamic \
-     org/omg/DynamicAny \
-     org/omg/IOP \
-     org/omg/Messaging \
-     org/omg/PortableInterceptor \
-     org/omg/PortableServer \
-     org/omg/SendingContext \
-     org/omg/stub/java/rmi \
-     javax/rmi \
-     javax/rmi/CORBA \
-     javax/activity \
-     javax/transaction \
-     com/sun/corba/se/GiopIDL \
-     com/sun/corba/se/PortableActivationIDL \
-     com/sun/corba/se/impl \
-     com/sun/corba/se/internal \
-     com/sun/corba/se/org/omg/CORBA \
-     com/sun/corba/se/pept \
-     com/sun/corba/se/spi \
-     com/sun/org/omg/CORBA \
-     com/sun/org/omg/SendingContext \
-     com/sun/tools/corba/se/logutil \
-     sun/corba \
-     sun/rmi/rmic/iiop
-
-IMPORT_TOOLS_PACKAGES += \
-     com/sun/tools/corba/se/idl \
-     sun/rmi/rmic/iiop
-
-IMPORT_CORBA_BINARIES += \
-     lib/orb.idl \
-     lib/ir.idl
-
--- a/jdk/makefiles/common/internal/Defs-jaxp.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-#
-# Copyright (c) 1997, 2007, 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.
-#
-
-# The specific packages that come from or go to rt.jar and tools.jar
-IMPORT_RT_PACKAGES += \
-     org/w3c/dom \
-     org/xml/sax \
-     javax/xml/XMLConstants.class \
-     javax/xml/datatype \
-     javax/xml/namespace \
-     javax/xml/parsers \
-     javax/xml/stream \
-     javax/xml/transform \
-     javax/xml/validation \
-     javax/xml/xpath \
-     com/sun/java_cup \
-     com/sun/org/apache/bcel \
-     com/sun/org/apache/regexp \
-     com/sun/org/apache/xalan \
-     com/sun/org/apache/xerces \
-     com/sun/org/apache/xml/internal/dtm \
-     com/sun/org/apache/xml/internal/res \
-     com/sun/org/apache/xml/internal/resolver \
-     com/sun/org/apache/xml/internal/serialize \
-     com/sun/org/apache/xml/internal/serializer \
-     com/sun/org/apache/xml/internal/utils \
-     com/sun/org/apache/xpath \
-     com/sun/xml/internal/stream
-
-IMPORT_TOOLS_PACKAGES +=
-
--- a/jdk/makefiles/common/internal/Defs-jaxws.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-#
-# Copyright (c) 1997, 2011, 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.
-#
-
-# The specific packages that come from or go to rt.jar and tools.jar
-IMPORT_RT_PACKAGES += \
-     META-INF/mailcap.default \
-     META-INF/mimetypes.default \
-     javax/activation \
-     com/sun/activation \
-     javax/xml/bind \
-     javax/xml/soap \
-     javax/xml/ws \
-     javax/jws \
-     javax/annotation \
-     com/sun/xml/internal/bind \
-     com/sun/xml/internal/fastinfoset \
-     com/sun/xml/internal/messaging \
-     com/sun/xml/internal/org/jvnet \
-     com/sun/xml/internal/txw2 \
-     com/sun/xml/internal/ws \
-     com/sun/xml/internal/stream/buffer
-
-NOT_USED_PACKAGES += \
-     com/sun/tools/internal/txw2
-
-IMPORT_TOOLS_PACKAGES += \
-     com/sun/codemodel \
-     com/sun/istack/internal/tools \
-     com/sun/xml/internal/rngom \
-     com/sun/xml/internal/xsom \
-     com/sun/xml/internal/dtdparser \
-     com/sun/tools/internal/xjc \
-     com/sun/tools/internal/ws \
-     com/sun/tools/internal/jxc \
-     org/relaxng \
-     META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
-     META-INF/services/com.sun.tools.internal.xjc.Plugin \
-     com/sun/tools/internal/jxc/ap \
-     com/sun/tools/internal/ws/wscompile/plugin/at_generated
-
-
--- a/jdk/makefiles/common/internal/Defs-langtools.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 1997, 2008, 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.
-#
-
-# The specific packages that come from or go to rt.jar and tools.jar
-
-IMPORT_RT_PACKAGES +=               \
-      javax/annotation/processing   \
-      javax/lang/model              \
-      javax/tools
-
-IMPORT_TOOLS_PACKAGES +=            \
-      com/sun/javadoc               \
-      com/sun/source                \
-      com/sun/tools/classfile       \
-      com/sun/tools/doclets         \
-      com/sun/tools/javac           \
-      com/sun/tools/javadoc         \
-      com/sun/tools/javah           \
-      com/sun/tools/javap
-
--- a/jdk/makefiles/common/internal/ImportComponents.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,173 +0,0 @@
-#
-# Copyright (c) 1997, 2008, 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.
-#
-
--include $(SPEC)
-
-# JDK jars where component classes come from as second choice
-JDK_RT_JAR    = $(JDK_IMPORT_PATH)/jre/lib/rt.jar
-JDK_TOOLS_JAR = $(JDK_IMPORT_PATH)/lib/tools.jar
-JDK_RESOURCES_JAR = $(JDK_IMPORT_PATH)/jre/lib/resources.jar
-
-# The specific packages that come from or go to rt.jar and tools.jar
-#   IF the component deliverables are not available.
-IMPORT_TOOLS_PACKAGES =
-IMPORT_RT_PACKAGES =
-
-# The following will add to IMPORT_TOOLS_PACKAGES and/or IMPORT_RT_PACKAGES
-ifndef LANGTOOLS_DIST
-  include $(BUILDDIR)/common/internal/Defs-langtools.gmk
-endif
-ifndef CORBA_DIST
-  include $(BUILDDIR)/common/internal/Defs-corba.gmk
-endif
-ifndef JAXP_DIST
-  include $(BUILDDIR)/common/internal/Defs-jaxp.gmk
-endif
-ifndef JAXWS_DIST
-  include $(BUILDDIR)/common/internal/Defs-jaxws.gmk
-endif
-
-# Clean up these lists so empty lists are empty
-IMPORT_TOOLS_PACKAGES := $(strip $(IMPORT_TOOLS_PACKAGES))
-IMPORT_RT_PACKAGES    := $(strip $(IMPORT_RT_PACKAGES))
-
-# Relative paths to import component deliverables
-CLASSES_JAR_FILE=lib/classes.jar
-SRC_ZIP_FILE=lib/src.zip
-BIN_ZIP_FILE=lib/bin.zip
-DOC_ZIP_FILE=lib/doc.zip
-
-#################################################################
-# Macros:
-
-# Importing component class files
-define import-one-classes
-if [ "$($1)" != "" ] ; then \
-  $(ECHO) "Importing classes from component $1"; \
-  $(call Unjar,$2,$($1)/$(CLASSES_JAR_FILE),); \
-fi
-endef
-
-# Importing optional component doc files (for man pages?)
-define import-one-docs
-if [ "$($1)" != "" -a -f $($1)/$(DOC_ZIP_FILE) ] ; then \
-  $(ECHO) "Importing docs from component $1"; \
-  $(call Unzipper,$2,$($1)/$(DOC_ZIP_FILE)); \
-fi
-endef
-
-# Importing optional component src files (for jdk src.zip and javadoc)
-define import-one-sources
-if [ "$($1)" != "" ] ; then \
-  $(ECHO) "Importing sources from component $1"; \
-  $(call Unzipper,$2,$($1)/$(SRC_ZIP_FILE)); \
-fi
-endef
-
-# Importing optional component bin files (for install image)
-define import-one-binaries
-if [ "$($1)" != "" -a -f $($1)/$(BIN_ZIP_FILE) ] ; then \
-  $(ECHO) "Importing binaries from component $1"; \
-  $(call Unzipper,$2,$($1)/$(BIN_ZIP_FILE)); \
-fi
-endef
-
-# Unzip zip file $2 into directory $1 (if $2 exists)
-#   Warning: $2 must be absolute path not relative
-define Unzipper
-( \
-  $(MKDIR) -p $1; \
-  ( $(CD) $1 && $(UNZIP) -o $2 > /dev/null ) \
-)
-endef
-
-# Unjar directories $3 from jar file $2 into directory $1 (if $2 exists)
-#   Warning: $2 must be absolute path not relative
-define Unjar
-( \
-  $(MKDIR) -p $1; \
-  ( $(CD) $1 && $(BOOT_JAR_CMD) xf $2 $3 $(BOOT_JAR_JFLAGS) ) && \
-  ( $(CD) $1 && $(java-vm-cleanup) ) \
-)
-endef
-
-# Import all component sources into directory $1
-define import-component-sources
-$(call import-one-sources,LANGTOOLS_DIST,$1)
-$(call import-one-sources,CORBA_DIST,$1)
-$(call import-one-sources,JAXP_DIST,$1)
-$(call import-one-sources,JAXWS_DIST,$1)
-endef
-
-# Import all component docs into directory $1 (optional)
-define import-component-docs
-$(call import-one-docs,LANGTOOLS_DIST,$1)
-$(call import-one-docs,CORBA_DIST,$1)
-$(call import-one-docs,JAXP_DIST,$1)
-$(call import-one-docs,JAXWS_DIST,$1)
-endef
-
-# Import all component bins into directory $1 (optional)
-define import-component-binaries
-$(call import-one-binaries,LANGTOOLS_DIST,$1)
-$(call import-one-binaries,CORBA_DIST,$1)
-$(call import-one-binaries,JAXP_DIST,$1)
-$(call import-one-binaries,JAXWS_DIST,$1)
-if [ "$(CORBA_DIST)" = "" ] ; then \
-  $(MKDIR) -p $(OUTPUTDIR)/lib ; \
-  ( $(CD) $(JDK_IMPORT_PATH) && $(CP) $(IMPORT_CORBA_BINARIES) $(ABS_OUTPUTDIR)/lib ) ; \
-fi 
-endef
-
-# Import all component classes into directory $1
-#   Here we special case classes coming from JDK when component not supplied
-define import-component-classes
-$(ECHO) "Import classes from $(JDK_IMPORT_PATH)"
-if [ "$(IMPORT_TOOLS_PACKAGES)" != "" ] ; then \
-  $(call Unjar,$1,$(JDK_RESOURCES_JAR),$(IMPORT_TOOLS_PACKAGES)); \
-  $(call Unjar,$1,$(JDK_TOOLS_JAR),$(IMPORT_TOOLS_PACKAGES)); \
-fi
-if [ "$(IMPORT_RT_PACKAGES)" != "" ] ; then \
-  $(call Unjar,$1,$(JDK_RESOURCES_JAR),$(IMPORT_RT_PACKAGES)); \
-  $(call Unjar,$1,$(JDK_RT_JAR),$(IMPORT_RT_PACKAGES)); \
-fi
-$(call import-one-classes,LANGTOOLS_DIST,$1)
-$(call import-one-classes,CORBA_DIST,$1)
-$(call import-one-classes,JAXP_DIST,$1)
-$(call import-one-classes,JAXWS_DIST,$1)
-endef
-
-# Clean up import files
-define import-component-sources-clean
-$(RM) -r $1
-endef
-define import-component-docs-clean
-$(RM) -r $1
-endef
-define import-component-classes-clean
-$(RM) -r $(IMPORT_TOOLS_PACKAGES:%=$1/%)
-$(RM) -r $(IMPORT_RT_PACKAGES:%=$1/%)
-endef
-
--- a/jdk/makefiles/common/internal/NativeCompileRules.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,238 +0,0 @@
-#
-# Copyright (c) 1995, 2007, 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.
-#
-
-#
-# Native C/C++ Compile Rules
-#
-
--include $(SPEC)
--include $(VARS)
-
-COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
-COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
-
-#
-# INCREMENTAL_BUILD: Record the #include file dependencies.
-#
-# NOTE: We build make include files with the suffix
-#       $(DEPEND_SUFFIX) on every compilation. These are initially 
-#       created as temp files just in case a ^C kills it in the middle.
-#	Compiler is smart enough to handle ^C and not create the .o file, or
-#	is supposed to be that smart, but the .$(DEPEND_SUFFIX) file 
-#       creation here isn't.
-#	These .$(DEPEND_SUFFIX) files are included by Library.gmk and 
-#       Program.gmk, when they exist (Search for 'make dependencies').
-#
-
-ifeq ($(INCREMENTAL_BUILD),true)
-
-$(OBJDIR)/%.$(DEPEND_SUFFIX): %.c
-	@$(prep-target)
-	@$(ECHO) "Creating $@"
-	@$(RM) $@.temp
-	@$(CC) $(CC_DEPEND) $(CPPFLAGS) $< 2> $(DEV_NULL) | \
-	    $(CC_DEPEND_FILTER) > $@.temp
-	@$(MV) $@.temp $@
-
-$(OBJDIR)/%.$(DEPEND_SUFFIX): %.cpp
-	@$(prep-target)
-	@$(ECHO) "Creating $@"
-	@$(RM) $@.temp
-	@$(CXX) $(CC_DEPEND) $(CPPFLAGS) $(CXXFLAGS) $< 2> $(DEV_NULL) | \
-	    $(CC_DEPEND_FILTER) > $@.temp
-	@$(MV) $@.temp $@
-
-endif # INCREMENTAL_BUILD
-
-#
-# C, C++, asm files.
-#
-# Normal or parallel compile rule is the same, but batch compiles require
-#  we save up the sources files that use the same compile line so that we
-#  can do one compile line.
-#
-
-ifneq ($(COMPILE_APPROACH), batch)
-
-$(OBJDIR)/%.$(OBJECT_SUFFIX): %.c
-	@$(prep-target)
-	$(COMPILE.c) $(CC_OBJECT_OUTPUT_FLAG)$@ $(CFLAGS_GPROF) $<
-	@$(check-conventions)
-
-$(OBJDIR)/%.$(OBJECT_SUFFIX): %.cpp
-	@$(prep-target)
-	$(COMPILE.cc) $(CC_OBJECT_OUTPUT_FLAG)$@ $(CFLAGS_GPROF) $<
-	@$(check-conventions)
-
-else
-  
-  #
-  # Batch compiling might be faster if the compiler was smart about recognizing
-  #   optimization opportunities available when all files are being compiled
-  #   the same way. Unfortunately this is rare.
-  #   Automatic pre-compiled headers (pch) might be a possibility so we
-  #   add any auto pch options here.
-  # So we save all the source files that have the same compile line as the
-  #   first file. A normal compile pass is made after the batch compile
-  #   to catch anything missed.
-  # If the compilers had a -o option that allowed us to direct where to
-  #   write the object files to, then we would not need to save the object
-  #   file list or move them from the make directory to the build directory.
-  #
-
-  # Source names
-  COMPILE_LIST.c         = $(OBJDIR)/.source_names_c
-  COMPILE_LIST.cpp       = $(OBJDIR)/.source_names_cpp
-
-  # Object file list
-  COMPILE_OBJ_LIST.c     = $(OBJDIR)/.obj_names_c
-  COMPILE_OBJ_LIST.cpp   = $(OBJDIR)/.obj_names_cpp
-  
-  # The compile line
-  COMPILE_BATCH.c        = $(OBJDIR)/.compile_c
-  COMPILE_BATCH.cpp      = $(OBJDIR)/.compile_cpp
-
-  # The compile line for the current target
-  THIS_COMPILE_BATCH.c   = $(COMPILE_BATCH.c)-$(@F)
-  THIS_COMPILE_BATCH.cpp = $(COMPILE_BATCH.cpp)-$(@F)
-
-$(OBJDIR)/%.$(OBJECT_SUFFIX): %.c
-	@$(prep-target)
-	@$(ECHO) "$(COMPILE.c) $(CFLAGS_GPROF)" > $(THIS_COMPILE_BATCH.c)
-	@if [ ! -s $(COMPILE_BATCH.c) ] ; then \
-	  $(CP) $(THIS_COMPILE_BATCH.c) $(COMPILE_BATCH.c) ; \
-	  $(ECHO) $< > $(COMPILE_LIST.c); \
-	  $(ECHO) $(@F) > $(COMPILE_OBJ_LIST.c); \
-	elif [ "`$(DIFF) -w -b $(THIS_COMPILE_BATCH.c) $(COMPILE_BATCH.c)`" \
-	       = "" ] ; then \
-	  $(ECHO) $< >> $(COMPILE_LIST.c); \
-	  $(ECHO) $(@F) >> $(COMPILE_OBJ_LIST.c); \
-	fi
-	@$(RM) $(THIS_COMPILE_BATCH.c)
-	@$(check-conventions)
-
-$(OBJDIR)/%.$(OBJECT_SUFFIX): %.cpp
-	@$(prep-target)
-	@$(ECHO) "$(COMPILE.cc) $(CFLAGS_GPROF)" > $(THIS_COMPILE_BATCH.cpp)
-	@if [ ! -s $(COMPILE_BATCH.cpp) ] ; then \
-	  $(CP) $(THIS_COMPILE_BATCH.cpp) $(COMPILE_BATCH.cpp) ; \
-	  $(ECHO) $< > $(COMPILE_LIST.cpp); \
-	  $(ECHO) $(@F) > $(COMPILE_OBJ_LIST.cpp); \
-	elif [ "`$(DIFF) -w -b $(THIS_COMPILE_BATCH.cpp) $(COMPILE_BATCH.cpp)`"\
-	       = "" ] ; then \
-	  $(ECHO) $< >> $(COMPILE_LIST.cpp); \
-	  $(ECHO) $(@F) >> $(COMPILE_OBJ_LIST.cpp); \
-	fi
-	@$(RM) $(THIS_COMPILE_BATCH.cpp)
-	@$(check-conventions)
-
-batch_compile: $(FILES_o)
-	@$(ECHO) "Doing batch compilations"
-	@if [ -s $(COMPILE_LIST.c) ] ; then \
-	  $(ECHO) "$(COMPILE.c) $(CFLAGS_GPROF) $(AUTOMATIC_PCH_OPTION) \
-	   `$(CAT) $(COMPILE_LIST.c)`" ; \
-	  ( $(COMPILE.c) $(CFLAGS_GPROF) $(AUTOMATIC_PCH_OPTION) \
-	    `$(CAT) $(COMPILE_LIST.c)` && \
-	    $(ECHO) "$(MV) `$(CAT) $(COMPILE_OBJ_LIST.c)` $(OBJDIR)" && \
-	    $(MV) `$(CAT) $(COMPILE_OBJ_LIST.c)` $(OBJDIR) ) || exit 1 ; \
-	fi
-	@if [ -s $(COMPILE_LIST.cpp) ] ; then \
-	  $(ECHO) "$(COMPILE.cc) $(CFLAGS_GPROF) $(AUTOMATIC_PCH_OPTION) \
-	   `$(CAT) $(COMPILE_LIST.cpp)`" ; \
-	  ( $(COMPILE.cc) $(CFLAGS_GPROF) $(AUTOMATIC_PCH_OPTION) \
-	    `$(CAT) $(COMPILE_LIST.cpp)` && \
-	    $(ECHO) "$(MV) `$(CAT) $(COMPILE_OBJ_LIST.cpp)` $(OBJDIR)" && \
-	    $(MV) `$(CAT) $(COMPILE_OBJ_LIST.cpp)` $(OBJDIR) ) || exit 1 ; \
-	fi
-	@$(RM) $(COMPILE_BATCH.c)   $(COMPILE_LIST.c)   $(COMPILE_OBJ_LIST.c)
-	@$(RM) $(COMPILE_BATCH.cpp) $(COMPILE_LIST.cpp) $(COMPILE_OBJ_LIST.cpp)
-
-endif
-
-# newer as does not handle c++ style comments
-$(OBJDIR)/%.$(OBJECT_SUFFIX): %.s
-    ifneq ($(CC_VERSION), gcc)
-	@$(prep-target)
-	$(COMPILE.s) $(CC_OBJECT_OUTPUT_FLAG)$@ $<
-    else
-	@$(prep-target)
-	$(CPP) -x assembler-with-cpp $< | $(COMPILE.s) -o $@
-    endif
-	@$(check-conventions)
-
-# Obj-C files (Mac OS X only).
-ifeq ($(PLATFORM), macosx)
-$(OBJDIR)/%.$(OBJECT_SUFFIX): %.m
-	@$(prep-target)
-	$(COMPILE.c) $(CC_OBJECT_OUTPUT_FLAG)$@ $(CFLAGS_GPROF) $<
-	@$(check-conventions)
-
-$(OBJDIR)/%.$(OBJECT_SUFFIX): %.mm
-	@$(prep-target)
-	$(COMPILE.cc) $(CC_OBJECT_OUTPUT_FLAG)$@ $(CFLAGS_GPROF) $<
-	@$(check-conventions)
-
-$(OBJDIR)/%.$(OBJECT_SUFFIX): %.c
-	@$(prep-target)
-	$(COMPILE.c) $(CC_OBJECT_OUTPUT_FLAG)$@ $(CFLAGS_GPROF) $<
-	@$(check-conventions)
-endif # PLATFORM
-
-#
-# Quick hack for making the compiler generate just the assembly file.
-#	$ gnumake obj/sparc/myfile.s
-#
-$(OBJDIR)/%.s: %.c
-	@$(prep-target)
-	$(COMPILE.c) $(CC_OBJECT_OUTPUT_FLAG)$@ -S $<
-	@$(check-conventions)
-
-# remove the intermediate files from the directories.
-#    (If VARIANT=OPT, this removes all debug and fastdebug files too)
-clobber clean::
-	$(RM) -r $(OBJDIR)
-	$(RM) -r $(OBJDIR)_*
-
-#
-# Lint support
-# (The 'lint' rule below is an older rule not using the .$(LINT_SUFFIX) files)
-#
-
-ifeq ($(PLATFORM), solaris)
-$(OBJDIR)/%.$(LINT_SUFFIX): %.c
-	@$(prep-target)
-	$(LINT.c) -dirout=$(OBJDIR) -c $<
-lint.clean:
-	$(RM) $(OBJDIR)/*.$(LINT_SUFFIX)
-# Old rule
-lint: $(FILES_c)
-        ifneq ($(FILES_c),)
-	  $(LINT.c) -Ncheck -Nlevel=3 $? $(LDLIBS) > lint.$(ARCH) 2>&1
-        endif
-endif
-
-.PHONY: batch_compile
-
-
--- a/jdk/makefiles/common/internal/Resources.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,262 +0,0 @@
-#
-# Copyright (c) 1997, 2010, 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.
-#
-
-# 
-# Generic mechanism for installing properties files, resource bundles,
-#   and other resource files.
-#
-# FILES_properties should be defined.
-# FILES_compiled_properties should be defined.
-# 
-# If COMPILED_PROPERTIES_SUPERCLASS is defined, ALL the FILES_properties
-# files will be compiled into java with this super class.
-#
-# You can add locales to LOCALE_SUFFIXES explicitly, or use the
-# LOCALE_SET_DEFINITION variable to add some pre-defined locale lists.
-# The LOCALE_SET_DEFINITION can have the value: jre, plugin, or jdk.
-#
-# Resource bundles to be installed are identified using the following variables.
-# Note that only the file name of the base bundle is given; localized versions
-# are added automatically. For Java files, use a format suitable for inclusion
-# in the FILES_java list; dito for properties, all relative paths.
-#
-#   NEW_RESOURCE_BUNDLES_JAVA        - new resource bundles implemented in
-#                                      Java, not localized
-#   RESOURCE_BUNDLES_JAVA            - resource bundles implemented in
-#                                      Java, localized
-#
-# The following variable is now used for most .properties files in the JDK. 
-# These properties files are converted into java and compiled with javac.
-# The resulting .class files are usually smaller and are always faster to load. 
-# The relative path to the properties file becomes a relative path to a
-# java source file.
-#
-#   RESOURCE_BUNDLES_COMPILED_PROPERTIES - resource bundles implemented as
-#                                          properties files, localized
-#   NEW_RESOURCE_BUNDLES_COMPILED_PROPERTIES - same as above, not localized
-#
-# For non-compiled properties files, use the following variables:
-#
-#   NEW_RESOURCE_BUNDLES_UNCOMPILED_PROPERTIES  - new resource bundles implemented as
-#                                      properties files, not localized
-#   RESOURCE_BUNDLES_UNCOMPILED_PROPERTIES      - resource bundles implemented as
-#                                      properties files, localized
-#
-# Other properties files to be installed are identified using the variable:
-#
-#   OTHER_PROPERTIES
-#
-
-include $(SPEC)
-include $(SRC_ROOT)/jdk/makefiles/Tools.gmk
-
-# Compile properties files into java source?
-ifdef COMPILED_PROPERTIES_SUPERCLASS
-  # Add all properties files to the compiled properties list (all or nothing)
-  COMPILED_PROPERTIES += $(FILES_compiled_properties) $(FILES_properties)
-else
-  COMPILED_PROPERTIES_SUPERCLASS = ListResourceBundle
-  COMPILED_PROPERTIES += $(FILES_compiled_properties)
-endif
-
-# Determine the locale suffixes needed beyond the base bundle
-
-ifeq ($(LOCALE_SET_DEFINITION), plugin)
-  LOCALE_SUFFIXES += $(PLUGIN_LOCALES)
-endif
-ifeq ($(LOCALE_SET_DEFINITION), jdk)
-  LOCALE_SUFFIXES += $(JDK_LOCALES)
-endif
-ifeq ($(LOCALE_SET_DEFINITION), jre)
-  LOCALE_SUFFIXES += $(JRE_LOCALES)
-endif
-
-# Java files get tacked onto the standard list of files to compile
-RESOURCE_BUNDLE_FILES_java += $(NEW_RESOURCE_BUNDLES_JAVA)
-RESOURCE_BUNDLE_FILES_java += $(RESOURCE_BUNDLES_JAVA) \
-    $(foreach file,$(RESOURCE_BUNDLES_JAVA), \
-       $(foreach locale,$(LOCALE_SUFFIXES), \
-	  $(basename $(file))_$(locale).java))
-
-# Add to java sources list
-FILES_java += $(RESOURCE_BUNDLE_FILES_java)
-
-# Compiled properties files are translated to .java.
-#   The .java files are generated into GENSRCDIR.
-COMPILED_PROPERTIES += $(NEW_RESOURCE_BUNDLES_COMPILED_PROPERTIES)
-COMPILED_PROPERTIES += $(RESOURCE_BUNDLES_COMPILED_PROPERTIES) \
-    $(foreach file,$(RESOURCE_BUNDLES_COMPILED_PROPERTIES),\
-      $(foreach locale,$(LOCALE_SUFFIXES),\
-	 $(basename $(file))_$(locale)$(suffix $(file))))
-
-# Add to java sources list
-FILES_java += $(COMPILED_PROPERTIES:%.properties=%.java)
-
-# Non-compiled files
-PROPERTIES_FILES += $(NEW_RESOURCE_BUNDLES_UNCOMPILED_PROPERTIES)
-PROPERTIES_FILES += $(RESOURCE_BUNDLES_UNCOMPILED_PROPERTIES) \
-    $(foreach file,$(RESOURCE_BUNDLES_UNCOMPILED_PROPERTIES), \
-       $(foreach locale,$(LOCALE_SUFFIXES), \
-	  $(basename $(file))_$(locale)$(suffix $(file))))
-# other properties
-PROPERTIES_FILES += $(OTHER_PROPERTIES)
-
-#
-# Process and strip all non-compiled properties files (in a batch mode)
-#
-STRIP_PROP_FILES = $(PROPERTIES_FILES:%=$(CLASSDESTDIR)/%)
-# To efficiently strip properties we use one run of StripProperties. 
-# This macro gathers an option for use later.
-STRIP_PROP_options=$(TEMPDIR)/strip_prop_options
-define install-properties-file
-$(install-file)
-$(call chmod-file, a+rw)
-@$(ECHO) "# Adding to strip properties list: $@"
-$(ECHO) "$@" >> $(STRIP_PROP_options)
-endef
-
-# Constructs command line options file
-$(STRIP_PROP_options): $(STRIP_PROP_FILES)
-	@$(TOUCH) $@
-strip_prop_options_clean:
-	@$(RM) $(STRIP_PROP_options)
-
-# Strip the properties files
-strip_all_props: $(BUILD_TOOLS) $(STRIP_PROP_options)
-	@if [ -s $(STRIP_PROP_options) ] ; then \
-          $(ECHO) "$(TOOL_STRIPPROPERTIES) @$(STRIP_PROP_options)" ; \
-          $(TOOL_STRIPPROPERTIES) @$(STRIP_PROP_options) ; \
-        fi
-	@$(java-vm-cleanup)
-
-#
-# Creates files in CLASSDESTDIR
-#
-
-# In some cases, we move files from package to resources subdir
-$(CLASSDESTDIR)/$(PKGDIR)/resources/%.properties: \
-	     $(SHARE_SRC)/classes/$(PKGDIR)/%.properties
-	$(install-properties-file)
-$(CLASSDESTDIR)/%.properties: $(SHARE_SRC)/classes/%.properties
-	$(install-properties-file)
-$(CLASSDESTDIR)/%.res: $(SHARE_SRC)/classes/%.res
-	$(install-file)
-$(CLASSDESTDIR)/%.dtd: $(SHARE_SRC)/classes/%.dtd
-	$(install-file)
-$(CLASSDESTDIR)/%.xml: $(SHARE_SRC)/classes/%.xml
-	$(install-file)
-$(CLASSDESTDIR)/%.prp: $(SHARE_SRC)/classes/%.prp
-	$(install-file)
-
-#
-# To efficiently compile properties into java sources we use one run
-#   of compileproperties. This macro gathers an option for use later.
-#   Note: The properties file and java source name can be different
-#         locales, e.g. zh_TW and zh_HK. The java source filename
-#         determines the name of the class.
-COMPILE_PROP_options=$(TEMPDIR)/compile_prop_options
-define add-property-java-file
-@$(prep-target)
-@$(ECHO) "# Adding to compile properties list: $? -> $@"
-$(ECHO) "-compile $? $@ $(COMPILED_PROPERTIES_SUPERCLASS)" \
-   >> $(COMPILE_PROP_options)
-endef
-
-$(GENSRCDIR)/%.java: $(PLATFORM_SRC)/classes/%.properties
-	$(add-property-java-file)
-$(GENSRCDIR)/%.java: $(SHARE_SRC)/classes/%.properties
-	$(add-property-java-file)
-$(GENSRCDIR)/%.java: $(GENSRCDIR)/%.properties
-	$(add-property-java-file)
-ifndef OPENJDK
-$(GENSRCDIR)/%.java: $(CLOSED_PLATFORM_SRC)/classes/%.properties
-	$(add-property-java-file)
-$(GENSRCDIR)/%.java: $(CLOSED_SHARE_SRC)/classes/%.properties
-	$(add-property-java-file)
-endif
-
-# Create HK java file from zh_TW (explicit resource bundles only)
-define create-hk-java-file
-@$(prep-target)
-$(CAT) $< | $(SED) -e '/class/s/_zh_TW/_zh_HK/' > $@
-endef
-
-# Explicit resource bundles
-$(GENSRCDIR)/%_zh_HK.java: $(PLATFORM_SRC)/classes/%_zh_TW.java
-	$(create-hk-java-file)
-$(GENSRCDIR)/%_zh_HK.java: $(SHARE_SRC)/classes/%_zh_TW.java
-	$(create-hk-java-file)
-
-# Compile of zh_HK properties just uses the zh_TW properties files
-$(GENSRCDIR)/%_zh_HK.java: $(PLATFORM_SRC)/classes/%_zh_TW.properties
-	$(add-property-java-file)
-$(GENSRCDIR)/%_zh_HK.java: $(SHARE_SRC)/classes/%_zh_TW.properties
-	$(add-property-java-file)
-
-# Simple delivery of zh_HK properties files just copies zh_TW properties files
-$(CLASSDESTDIR)/%_zh_HK.properties: \
-             $(PLATFORM_SRC)/classes/%_zh_TW.properties
-	$(install-properties-file)
-$(CLASSDESTDIR)/%_zh_HK.properties: \
-             $(SHARE_SRC)/classes/%_zh_TW.properties
-	$(install-properties-file)
-
-# List of java files converted from properties files needed
-COMPILE_PROP_JAVA_FILES = $(COMPILED_PROPERTIES:%.properties=$(GENSRCDIR)/%.java)
-
-# Constructs command line options file
-$(COMPILE_PROP_options): $(COMPILE_PROP_JAVA_FILES)
-	@$(TOUCH) $@
-compile_prop_options_clean:
-	@$(RM) $(COMPILE_PROP_options)
-
-# Make sure all are compiled, one compiler run
-compile_all_props: $(BUILD_TOOLS) $(COMPILE_PROP_options)
-	@if [ `$(CAT) $(COMPILE_PROP_options) | $(WC) -l` -ge 1 ] ; then \
-	  $(MKDIR) -p $(GENSRCDIR); \
-	  $(ECHO) "$(TOOL_COMPILEPROPERTIES) @$(COMPILE_PROP_options)";\
-	  $(TOOL_COMPILEPROPERTIES) @$(COMPILE_PROP_options) ; \
-	  $(java-vm-cleanup); \
-	fi
-
-# Make sure the build rule creates all the properties
-resources:
-
-ifneq ($(strip $(PROPERTIES_FILES)),)
-  resources: strip_prop_options_clean   strip_all_props
-  clobber clean:: 
-	$(RM) $(STRIP_PROP_FILES) $(STRIP_PROP_options)
-endif
-
-ifneq ($(strip $(COMPILED_PROPERTIES)),)
-  resources: compile_prop_options_clean compile_all_props
-  clobber clean:: 
-	$(RM) $(COMPILE_PROP_JAVA_FILES) $(COMPILE_PROP_options)
-endif
-
-.PHONY: resources \
-	compile_prop_options_clean compile_all_props \
-	strip_prop_options_clean   strip_all_props
-
--- a/jdk/makefiles/common/shared/Compiler-gcc.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-#
-# Copyright (c) 2005, 2010, 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.
-#
-
-#
-# GCC Compiler settings
-#
-
-ifeq ($(PLATFORM), windows)
-
-  # Settings specific to Windows, pretty stale, hasn't been used
-  CC           ?= $(COMPILER_PATH)gcc
-  CPP          ?= $(COMPILER_PATH)gcc -E
-  CXX          ?= $(COMPILER_PATH)g++
-  CCC          ?= $(COMPILER_PATH)g++
-  AR           ?= $(COMPILER_PATH)lib
-  LINK         ?= $(COMPILER_PATH)link
-  RC           ?= $(COMPILER_PATH)rc
-  LINK32       = $(LINK)
-  RSC          = $(RC)
-  # unset any GNU Make settings of MFLAGS and MAKEFLAGS which may mess up nmake
-  NMAKE          = MFLAGS= MAKEFLAGS= $(COMPILER_PATH)nmake -nologo
-  ifeq ($(ARCH_DATA_MODEL), 32)
-    CC_VER  = UNKNOWN
-  else
-    CC_VER  = UNKNOWN
-  endif
-  _LINK_VER :=$(shell $(LINK) 2>&1 | $(HEAD) -n 1)
-  LINK_VER  :=$(call GetVersion,"$(_LINK_VER)")
-
-endif
-
-ifeq ($(PLATFORM), linux)
-
-# Settings specific to Linux
-  CC             ?= $(COMPILER_PATH)gcc
-  CPP            ?= $(COMPILER_PATH)gcc -E
-# Acquire the paths to the compilers and tools
-  # statically link libstdc++ before C++ ABI is stablized on Linux
-  STATIC_CXX     = true
-  ifeq ($(STATIC_CXX),true)
-    # g++ always dynamically links libstdc++, even we use "-Wl,-Bstatic -lstdc++"
-    # We need to use gcc to statically link the C++ runtime. gcc and g++ use
-    # the same subprocess to compile C++ files, so it is OK to build using gcc.
-    CXX            ?= $(CC)
-    #$(COMPILER_PATH)gcc
-  else
-#    CXX            = $(COMPILER_PATH)g++
-  endif
-  # Option used to create a shared library
-  SHARED_LIBRARY_FLAG = -shared
-  SUN_COMP_VER := $(shell $(CC) --verbose 2>&1 )
-
-endif
-
-ifeq ($(PLATFORM), solaris)
-
-  # Settings specific to Solaris
-  CC             ?= $(COMPILER_PATH)gcc
-  CPP            ?= $(COMPILER_PATH)gcc -E
-  CXX            ?= $(COMPILER_PATH)g++
-
-  # Option used to create a shared library
-  SHARED_LIBRARY_FLAG = -G
-  
-endif
-
-# Get gcc version
-_CC_VER :=$(shell $(CC) -dumpversion 2>&1 )
-CC_VER  :=$(call GetVersion,"$(_CC_VER)")
-CC_MAJORVER  :=$(call MajorVersion,$(CC_VER))
-CC_MINORVER  :=$(call MinorVersion,$(CC_VER))
-
-# Name of compiler
-COMPILER_NAME = GCC$(call MajorVersion,$(CC_VER))
-COMPILER_VERSION = $(COMPILER_NAME)
-
--- a/jdk/makefiles/common/shared/Compiler-llvm.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-#
-# Copyright (c) 2011, 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.
-#
-
-#
-# LLVM Compiler settings
-#
-
-ifeq ($(PLATFORM), macosx)
-
-  # Settings specific to Mac OS X
-  ifeq ($(origin CC), default)
-   CC             = $(COMPILER_PATH)llvm-gcc
-  endif
-  CPP             = $(COMPILER_PATH)llvm-gcc -E
-  ifeq ($(origin CXX), default)
-   CXX            = $(COMPILER_PATH)llvm-g++
-  endif
-
-  REQUIRED_CC_VER = 4.2.1
-
-  # Option used to create a shared library
-  SHARED_LIBRARY_FLAG = -Wl,-install_name,@rpath/$(@F) -dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0
-  SUN_COMP_VER := $(shell $(CC) --verbose 2>&1 )
-
-  AR = $(CC)
-  ARFLAGS = -nostdlib -r -arch i386 -arch x86_64 -o
-
-endif
-
-# Get llvm version
-_CC_VER :=$(shell $(CC) -dumpversion 2>&1 )
-CC_VER  :=$(call GetVersion,"$(_CC_VER)")
-
-# Name of compiler
-COMPILER_NAME = LLVM-GCC$(call MajorVersion,$(CC_VER))
-COMPILER_VERSION = $(COMPILER_NAME)
-
--- a/jdk/makefiles/common/shared/Compiler-msvc.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-#
-# Copyright (c) 2005, 2011, 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.
-#
-
-#
-# MSVC Compiler settings
-#
-
-ifeq ($(PLATFORM), windows)
-  CC           ?= $(COMPILER_PATH)cl
-  CPP          ?= $(COMPILER_PATH)cl
-  CXX          ?= $(COMPILER_PATH)cl
-  CCC          ?= $(COMPILER_PATH)cl
-  AR           ?= $(COMPILER_PATH)lib
-  LINK         ?= $(COMPILER_PATH)link
-  LINK32       ?= $(LINK)
-# TODO Add dumpbin.exe to configure
-  DUMPBIN      ?= $(COMPILER_PATH)dumpbin.exe
- 
-  # Fill in unknown values
-  COMPILER_NAME=Unknown MSVC Compiler
-  COMPILER_VERSION=
-  
-  # unset any GNU Make settings of MFLAGS and MAKEFLAGS which may mess up nmake
-  NMAKE          = MFLAGS= MAKEFLAGS= $(COMPILER_PATH)nmake -nologo
-
-  # Compiler version and type (Always get word after "Version")
-  CC_VER  := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(SED) 's/.*\(Version.*\)/\1/' | $(NAWK) '{print $$2}')
-
-  LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
-  CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
-  
-  # The VS2010 compiler is the same one used on both 32bit and 64bit
-  ifeq ($(CC_MAJORVER), 16)
-    COMPILER_NAME=Microsoft Visual Studio 10 (16.00.30319.01)
-    COMPILER_VERSION=VS2010
-    ifeq ($(WINDOWSSDKDIR),)
-      WINDOWSSDKDIR := $(error WINDOWSSDKDIR cannot be empty here)
-    endif
-    ifeq ($(ARCH_DATA_MODEL), 32)
-      _OTHER_TOOLS_BIN = $(WINDOWSSDKDIR)/Bin
-    else
-      ifeq ($(ARCH), ia64)
-        _OTHER_TOOLS_BIN = $(WINDOWSSDKDIR)/Bin/ia64
-      else
-        _OTHER_TOOLS_BIN = $(WINDOWSSDKDIR)/Bin/x64
-      endif
-    endif
-    RC     = $(_OTHER_TOOLS_BIN)/RC.Exe
-    REBASE = $(_OTHER_TOOLS_BIN)/ReBase.Exe
-    MT     = $(_OTHER_TOOLS_BIN)/mt.exe
-    MTL    = $(_OTHER_TOOLS_BIN)/midl.exe
-  endif
-  
-  # These variables can never be empty
-  ifndef COMPILER_PATH
-    COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
-  endif
-  ifndef COMPILER_VERSION
-    COMPILER_VERSION := $(error COMPILER_VERSION cannot be empty here)
-  endif
-  ifneq ($(COMPILER_VERSION),VS2010)
-    COMPILER_VERSION := $(error COMPILER_VERSION must be VS2010)
-  endif
-  
-  # Shared library generation flag
-  SHARED_LIBRARY_FLAG = -LD
-  # RSC is always same as RC (Not sure who uses this RSC variable)
-  RSC = $(RC)
-
-endif
-
--- a/jdk/makefiles/common/shared/Compiler-sun.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-#
-# Copyright (c) 2005, 2010, 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.
-#
-
-#
-# Sun Studio Compiler settings
-#
-
-# Sun Studio Compiler settings specific to Solaris
-ifeq ($(PLATFORM), solaris)
-  CC             ?= $(COMPILER_PATH)cc
-  CPP            ?= $(COMPILER_PATH)cc -E
-  CXX            ?= $(COMPILER_PATH)CC
-  LINT           ?= $(COMPILER_PATH)lint
-  # Option used to create a shared library
-  SHARED_LIBRARY_FLAG = -G
-  GCC =$(GCC_COMPILER_PATH)gcc
-endif
-
-# Sun Studio Compiler settings specific to Linux
-ifeq ($(PLATFORM), linux)
-  # This has not been tested
-  CC             ?= $(COMPILER_PATH)cc
-  CPP            ?= $(COMPILER_PATH)cc -E
-  CXX            ?= $(COMPILER_PATH)CC
-  LINT           ?= $(COMPILER_PATH)lint
-  # statically link libstdc++ before C++ ABI is stablized on Linux
-  STATIC_CXX     = true
-  ifeq ($(STATIC_CXX),true)
-    # CC always dynamically links libstdc++, even we use "-Wl,-Bstatic -lstdc++"
-    # We need to use cc to statically link the C++ runtime.
-    CXX            ?= $(COMPILER_PATH)cc
-  else
-    CXX            ?= $(COMPILER_PATH)CC
-  endif
-  # Option used to create a shared library
-  SHARED_LIBRARY_FLAG = -G
-endif
-
-# Get compiler version
-_CC_VER :=$(shell $(CC) -V 2>&1 | $(HEAD) -n 1)
-CC_VER  :=$(call GetVersion,"$(_CC_VER)")
-CC_MAJORVER  :=$(call MajorVersion,$(CC_VER))
-CC_MINORVER  :=$(call MinorVersion,$(CC_VER))
-
-# Name of compilers being used
-COMPILER_VERSION-5.7  = SS10
-COMPILER_NAME-5.7     = Sun Studio 10
-COMPILER_VERSION-5.8  = SS11
-COMPILER_NAME-5.8     = Sun Studio 11
-COMPILER_VERSION-5.9  = SS12
-COMPILER_NAME-5.9     = Sun Studio 12
-COMPILER_VERSION-5.10 = SS12u1
-COMPILER_NAME-5.10    = Sun Studio 12 Update 1
-COMPILER_VERSION-5.11 = OSS12u2
-COMPILER_NAME-5.11    = Oracle Solaris Studio 12 Update 2
-COMPILER_VERSION      = $(COMPILER_VERSION-$(CC_VER))
-COMPILER_NAME         = $(COMPILER_NAME-$(CC_VER))
-
-# Arch specific settings (determines type of .o files and instruction set)
-#  Starting in SS12 (5.9), the arch options changed.
-#  The assembler /usr/ccs/bin/as wants older SS11 (5.8) style options.
-#   Note: We need to have both 32 and 64 values at all times for awt Makefiles.
-#
-XARCH_OPTION_OLD/32 =
-XARCH_OPTION_OLD/64 =
-XARCH_OPTION_NEW/32 = -m32
-XARCH_OPTION_NEW/64 = -m64
-# Lint options are slightly different
-LINT_XARCH_OPTION_OLD/32 =
-LINT_XARCH_OPTION_OLD/64 =
-LINT_XARCH_OPTION_NEW/32 = -m32
-LINT_XARCH_OPTION_NEW/64 = -m64
-ifeq ($(ARCH_FAMILY), sparc)
-  ifdef VIS_NEEDED
-    XARCH_OPTION_OLD/32 += -xarch=v8plusa
-    XARCH_OPTION_OLD/64 += -xarch=v9a
-    XARCH_OPTION_NEW/32 += -xarch=sparcvis
-    XARCH_OPTION_NEW/64 += -xarch=sparcvis
-  else
-    # Someday this should change to improve optimization on UltraSPARC
-    #    and abandon v8, even change to sparcvis or sparcvis2, this
-    #    abandons machines like the SPARCstation 10.
-    #    Indications with jdk6 is that alacrity runs do not show a
-    #    big improvement using v8plus over v8, but other benchmarks might.
-    XARCH_OPTION_OLD/32 += -xarch=v8
-    XARCH_OPTION_OLD/64 += -xarch=v9
-    # Note that this new option (SS12+) effectively means v8plus
-    XARCH_OPTION_NEW/32 += -xarch=sparc
-    XARCH_OPTION_NEW/64 += -xarch=sparc
-  endif
-  LINT_XARCH_OPTION_OLD/64 += -Xarch=v9
-endif
-ifeq ($(ARCH_FAMILY), i586)
-  XARCH_OPTION_OLD/64      += -xarch=amd64
-  LINT_XARCH_OPTION_OLD/64 += -Xarch=amd64
-endif
-# Pick the options we want based on the compiler being used. (5.9 or newer)
-CC_59_OR_NEWER := \
-  $(shell expr $(CC_MAJORVER) \> 5 \| \
-      \( $(CC_MAJORVER) = 5 \& $(CC_MINORVER) \>= 9 \) )
-ifeq ($(CC_59_OR_NEWER), 1)
-  XARCH_OPTION/32 = $(XARCH_OPTION_NEW/32)
-  XARCH_OPTION/64 = $(XARCH_OPTION_NEW/64)
-  LINT_XARCH_OPTION/32 = $(LINT_XARCH_OPTION_NEW/32)
-  LINT_XARCH_OPTION/64 = $(LINT_XARCH_OPTION_NEW/64)
-else
-  XARCH_OPTION/32 = $(XARCH_OPTION_OLD/32)
-  XARCH_OPTION/64 = $(XARCH_OPTION_OLD/64)
-  LINT_XARCH_OPTION/32 = $(LINT_XARCH_OPTION_OLD/32)
-  LINT_XARCH_OPTION/64 = $(LINT_XARCH_OPTION_OLD/64)
-endif
-XARCH_OPTION = $(XARCH_OPTION/$(ARCH_DATA_MODEL))
-LINT_XARCH_OPTION = $(LINT_XARCH_OPTION/$(ARCH_DATA_MODEL))
-# The /usr/ccs/bin/as assembler always wants the older SS11 (5.8) options.
-AS_XARCH_OPTION = $(XARCH_OPTION_OLD/$(ARCH_DATA_MODEL))
-
--- a/jdk/makefiles/common/shared/Defs-control.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-#
-# Copyright (c) 1995, 2011, 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.
-#
-
-#
-# Common variables used by all the Java makefiles.  This file should
-# not contain rules.
-#
-
-# WARNING: This file is shared with other components.
-#
-
-ifndef JDK_MAKE_SHARED_DIR
-  JDK_MAKE_SHARED_DIR = $(JDK_TOPDIR)/makefiles/common/shared
-endif
-
-ifndef HOTSPOT_TOPDIR
-  HOTSPOT_TOPDIR=$(TOPDIR)/hotspot
-endif
-ifndef LANGTOOLS_TOPDIR
-  LANGTOOLS_TOPDIR=$(TOPDIR)/langtools
-endif
-ifndef CORBA_TOPDIR
-  CORBA_TOPDIR=$(TOPDIR)/corba
-endif
-ifndef JAXP_TOPDIR
-  JAXP_TOPDIR=$(TOPDIR)/jaxp
-endif
-ifndef JAXWS_TOPDIR
-  JAXWS_TOPDIR=$(TOPDIR)/jaxws
-endif
-ifndef JDK_TOPDIR
-  JDK_TOPDIR=$(TOPDIR)/jdk
-endif
-ifndef INSTALL_TOPDIR
-  INSTALL_TOPDIR=$(TOPDIR)/install
-endif
-ifndef SPONSORS_TOPDIR
-  SPONSORS_TOPDIR=$(TOPDIR)/sponsors
-endif
-ifndef DEPLOY_TOPDIR
-  DEPLOY_TOPDIR=$(TOPDIR)/deploy
-endif
-
-# Get shared platform settings
-include $(JDK_MAKE_SHARED_DIR)/Platform.gmk
-
-# Default directory immediately above the "build" output directory (OUTPUTDIR)
-BUILD_PARENT_DIRECTORY=$(TOPDIR)
-
-# Get platform specific settings
-include $(JDK_MAKE_SHARED_DIR)/Defs.gmk
-
-SRC_BUNDLEDIR       = $(OUTPUTDIR)/source-bundles
-ABS_SRC_BUNDLEDIR   = $(ABS_OUTPUTDIR)/source-bundles
-BIN_BUNDLEDIR       = $(OUTPUTDIR)/bundles
-BIN_DEMOS_BUNDLEDIR = $(OUTPUTDIR)/demos-bundles
-ABS_BIN_BUNDLEDIR   = $(ABS_OUTPUTDIR)/bundles
-
-dummy := $(shell $(MKDIR) -p $(BIN_BUNDLEDIR))
-dummy := $(shell $(MKDIR) -p $(BIN_DEMOS_BUNDLEDIR) )
-dummy := $(shell $(MKDIR) -p $(SRC_BUNDLEDIR) )
-
-TEMP_DIR = $(OUTPUTDIR)/tmp
-ABS_TEMP_DIR = $(ABS_OUTPUTDIR)/tmp
-
-dummy := $(shell $(MKDIR) -p $(TEMP_DIR))
-
-# The language version we want for this jdk build
-SOURCE_LANGUAGE_VERSION=7
-# The class version we want for this jdk build
-TARGET_CLASS_VERSION=7
-
-# The MESSAGE, WARNING and ERROR files are used to store sanity check and 
-# source check messages, warnings and errors. 
-export ERROR_FILE   := $(ABS_OUTPUTDIR)/sanityCheckErrors.txt
-export WARNING_FILE := $(ABS_OUTPUTDIR)/sanityCheckWarnings.txt
-export MESSAGE_FILE := $(ABS_OUTPUTDIR)/sanityCheckMessages.txt
-
-# source bundle generation definitions
-BUNDLE_DATE := $(shell $(DATE) '+%d_%b_%Y' | $(TR) "[A-Z]" "[a-z]")
-ifdef ALT_BUNDLE_DATE
-  BUNDLE_DATE := $(ALT_BUNDLE_DATE)
-endif
-
-# If the update version contains non-numeric characters, we need
-# to massage it into a numeric format.  Unfortunately, the
-# Windows VERSIONINFO resource that we stick in jvm.dll cannot
-# handle non-numeric characters.  We have to do this here because
-# Hotspot (nmake) cannot handle calculations.  So we use the
-# following formula:
-# COOKED_JDK_UPDATE_VERSION = JDK_UPDATE_VERSION * 10 + EXCEPTION_VERSION
-# 
-# Here are some examples:
-#     1.5.0    b01  ->  5,0,0,1
-#     1.5.0_10 b01  ->  5,0,100,1 
-#     1.4.2 b01     ->  4,2,0,1
-#     1.4.2_02 b01  ->  4,2,20,1
-#     1.4.2_02a b01 ->  4,2,21,1
-#     1.4.2_02b b01 ->  4,2,22,1
-ifdef JDK_UPDATE_VERSION
-  VTMP := $(shell $(ECHO) $(JDK_UPDATE_VERSION) | $(TR) "abcde" "12345")
-  CHAR1 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 1, 1);}')
-  CHAR2 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 2, 1);}')
-  CHAR3 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 3, 1);}')
-  ifeq ($(CHAR3),)
-    CHAR3 := 0
-  endif
-  ifeq ($(CHAR1), 0)
-    COOKED_JDK_UPDATE_VERSION := $(CHAR2)$(CHAR3)
-  else
-    COOKED_JDK_UPDATE_VERSION := $(CHAR1)$(CHAR2)$(CHAR3)
-  endif
-endif
-
-ifneq ($(JDK_BUILD_NUMBER),)
- COOKED_BUILD_NUMBER = $(shell $(ECHO) $(JDK_BUILD_NUMBER) \
-			       | $(SED) -e 's/^b//' | $(SED) -e 's/^0//')
-else
- COOKED_BUILD_NUMBER = 0
-endif
-
--- a/jdk/makefiles/common/shared/Defs-java.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,249 +0,0 @@
-#
-# Copyright (c) 2007, 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.
-#
-
-#
-# Common java/javac/jdk variables used by all the Java makefiles.
-# This file should not contain rules.
-#
-
-# WARNING: This file is shared with other workspaces.
-#          So when it includes other files, it must use JDK_TOPDIR.
-#
-
--include $(SPEC)
-
-#
-# Memory related -J flags that all uses of java tools should use.
-#
-#JAVA_MEM_FLAGS   = -Xmx$(MAX_VM_MEMORY)m
-#ifeq ($(ARCH), ia64)
-  # Special flags for javac on ia64 to work around a VM problem with
-  #   bad code generation during inlining (what version had this problem?):
-  #   Suspect this may not be needed anymore.
-#  JAVA_MEM_FLAGS   += -Xms$(MAX_VM_MEMORY)m -XX:-Inline
-#else
-#  JAVA_MEM_FLAGS   += -Xms$(MIN_VM_MEMORY)m -XX:PermSize=32m -XX:MaxPermSize=160m
-#endif
-
-#
-# All java tools (javac, javah, and javadoc) run faster with certain java
-#    options, this macro should be used with all these tools.
-#    In particular, the client VM makes these tools run faster when
-#    it's available.
-#
-ADD_CLIENT_VM_OPTION = false
-ifeq ($(PLATFORM), solaris)
-  ADD_CLIENT_VM_OPTION = true
-else
-  ifeq ($(ARCH_DATA_MODEL), 32)
-    ADD_CLIENT_VM_OPTION = true
-  endif
-endif
-
-# Options for hotspot to turn off printing of options with fastdebug version
-#   and creating the hotspot.log file.
-#JAVA_HOTSPOT_DISABLE_PRINT_VMOPTIONS = \
-#   -XX:-PrintVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-LogVMOutput
-
-# JVM options
-ifeq ($(PLATFORM), macosx)
-  JAVA_JVM_FLAGS = $(JAVA_HOTSPOT_DISABLE_PRINT_VMOPTIONS) -Djava.awt.headless=true
-else
-  JAVA_JVM_FLAGS = $(JAVA_HOTSPOT_DISABLE_PRINT_VMOPTIONS)
-endif
-
-#ifeq ($(ADD_CLIENT_VM_OPTION), true)
-#  JAVA_JVM_FLAGS += -client
-#endif
-#ifdef USE_HOTSPOT_INTERPRETER_MODE
-#  JAVA_JVM_FLAGS += -Xint
-#endif
-
-# Various VM flags
-JAVA_TOOLS_FLAGS  = $(JAVA_JVM_FLAGS) $(JAVA_MEM_FLAGS)
-
-# The VM flags for javac
-JAVAC_JVM_FLAGS =
-
-# 64-bit builds require a larger thread stack size.
-#ifeq ($(ARCH_DATA_MODEL), 32)
-#  JAVAC_JVM_FLAGS    += -J-XX:ThreadStackSize=768
-#else
-#  JAVAC_JVM_FLAGS    += -J-XX:ThreadStackSize=1536
-#endif
-JAVAC_JVM_FLAGS    += $(JAVA_TOOLS_FLAGS:%=-J%)
-
-# The jar -J options are special, must be added at the end of the command line
-JAR_JFLAGS       = $(JAVA_TOOLS_FLAGS:%=-J%)
-
-# JAVA_TOOLS_DIR is the default location to find Java tools to run, if
-#    langtools is not available.
-#    This should be the latest promoted JDK javac.
-ifndef JAVA_TOOLS_DIR
-  JAVA_TOOLS_DIR = $(JDK_IMPORT_PATH)/bin
-endif
-
-#
-# Invoking the Java compiler.   In leaf makefiles, choose as follows:
-#  -- Use JAVAC if you want to take full control of what options get
-#     passed to javac.
-#  -- Use JAVAC_CMD if you want to take the defaults given to you.
-#
-
-ifndef DEBUG_CLASSFILES
-  ifeq ($(VARIANT), DBG)
-    DEBUG_CLASSFILES = true
-  endif
-endif
-JAVACFLAGS =
-ifeq ($(DEBUG_CLASSFILES),true)
-  JAVACFLAGS += -g
-endif
-ifeq ($(JAVAC_MAX_WARNINGS), true)
-  JAVAC_LINT_OPTIONS += -Xlint:all
-endif
-ifeq ($(JAVAC_WARNINGS_FATAL), true)
-  JAVACFLAGS  += -Werror
-endif
-
-# TODO: Workaround for CR 7063027. Remove -path eventually.
-JAVAC_LINT_OPTIONS += -Xlint:-path
-
-JAVACFLAGS += $(JAVAC_LINT_OPTIONS)
-
-#
-# Some licensees do not get the Security Source bundles.  We will
-# fall back on the prebuilt jce.jar so that we can do a best
-# attempt at building.  If sources exist, we always want to
-# build/use the most recent source instead of an older jce.jar, whether
-# built implicitly/explicitly.
-#
-ifeq ($(wildcard $(SHARE_SRC)/classes/javax/crypto/Cipher.java),)
-  JCE_PATH = $(CLASSPATH_SEPARATOR)$(LIBDIR)/jce.jar
-endif
-
-# Add the source level
-SOURCE_LANGUAGE_VERSION = 7
-LANGUAGE_VERSION = -source $(SOURCE_LANGUAGE_VERSION)
-JAVACFLAGS  += $(LANGUAGE_VERSION)
-
-# Add the class version we want
-TARGET_CLASS_VERSION = 7
-CLASS_VERSION = -target $(TARGET_CLASS_VERSION)
-JAVACFLAGS  += $(CLASS_VERSION)
-JAVACFLAGS  += -encoding ascii
-JAVACFLAGS  += "-Xbootclasspath:$(CLASSBINDIR)$(JCE_PATH)"
-JAVACFLAGS  += $(OTHER_JAVACFLAGS)
-
-# Needed for javah
-JAVAHFLAGS += -bootclasspath "$(CLASSBINDIR)$(JCE_PATH)"
-
-# Needed for javadoc to ensure it builds documentation
-# against the newly built classes
-JAVADOCFLAGS += -bootclasspath $(CLASSBINDIR)
-
-# Needed for JAVADOC and BOOT_JAVACFLAGS
-NO_PROPRIETARY_API_WARNINGS = -XDignore.symbol.file=true
-
-# Langtools
-LANGTOOLS_DIST ?= $(ALT_LANGTOOLS_DIST)
-
-ifdef LANGTOOLS_DIST
-  JAVAC_JAR   = $(LANGTOOLS_DIST)/bootstrap/lib/javac.jar
-  JAVAH_JAR   = $(LANGTOOLS_DIST)/bootstrap/lib/javah.jar
-  JAVADOC_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javadoc.jar
-  DOCLETS_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/doclets.jar
-  JAVAC_CMD   = $(BOOT_JAVA_CMD) \
-		"-Xbootclasspath/p:$(JAVAC_JAR)" \
-		-jar $(JAVAC_JAR) $(JAVACFLAGS)
-  JAVAH_CMD   = $(BOOT_JAVA_CMD) \
-		"-Xbootclasspath/p:$(JAVAH_JAR)$(CLASSPATH_SEPARATOR)$(JAVAC_JAR)"  \
-		-jar $(JAVAH_JAR) $(JAVAHFLAGS)
-  JAVADOC_CMD = $(BOOT_JAVA_CMD) \
-		"-Xbootclasspath/p:$(JAVADOC_JAR)$(CLASSPATH_SEPARATOR)$(JAVAC_JAR)$(CLASSPATH_SEPARATOR)$(DOCLETS_JAR)" \
-		-jar $(JAVADOC_JAR) $(JAVADOCFLAGS)
-else
-  # If no explicit tools, use boot tools (add VM flags in this case)
-  JAVAC_CMD     = $(UNCYGDRIVE) $(JAVA_TOOLS_DIR)/javac $(JAVAC_JVM_FLAGS) \
-		  $(JAVACFLAGS)
-  JAVAH_CMD     = $(UNCYGDRIVE) $(JAVA_TOOLS_DIR)/javah \
-		  $(JAVAHFLAGS)
-  JAVADOC_CMD   = $(UNCYGDRIVE) $(JAVA_TOOLS_DIR)/javadoc $(JAVA_TOOLS_FLAGS:%=-J%) \
-		  $(JAVADOCFLAGS)
-endif
-
-# Override of what javac to use (see deploy workspace)
-#ifdef JAVAC
-#  JAVAC_CMD     = $(JAVAC)
-#endif
-
-#
-# The bootstrap java compiler (defined as the javac in the ALT_BOOTDIR jdk).
-#   Will be used to compile java code used to build the jdk, e.g. class files
-#   created by this compiler will NOT become part of this built jdk, but just
-#   used to build this jdk, e.g. run with the java in the ALT_BOOTDIR jdk.
-#
-# The javac supplied with the LANGTOOLS_DIST should be used to build the
-#   classes that will be put into the built jdk. But note that this javac
-#   will use the ALT_BOOTDIR java runtime. Any classes created by the
-#   LANGTOOLS_DIST javac should not be run during this jdk build and indeed
-#   may not even run with the ALT_BOOTDIR jdk because they may be a newer
-#   class file version that the ALT_BOOTDIR jdk doesn't understand.
-#
-# The important observation here is that the built jdk is NOT run during
-#   the build. If the built jdk needs to be verified that it can build this
-#   same jdk, then it should be supplied to the build process as the ALT_BOOTDIR
-#   jdk, and this resulting built jdk should be compared to the first one.
-#   (They should be the same). Re-using this built jdk as the ALT_BOOTDIR
-#   jdk will be the only way and the recommeneded way to verify the built jdk
-#   can bootstrap itself.
-#
-
-# The javac options supplied to the boot javac is limited. This compiler
-#   should only be used to build the 'make/tools' sources, which are not
-#   class files that end up in the classes directory.
-BOOT_JAVACFLAGS += $(JAVAC_LINT_OPTIONS)
-ifeq ($(JAVAC_WARNINGS_FATAL), true)
-  BOOT_JAVACFLAGS  += -Werror
-endif
-
-BOOT_JAVACFLAGS  += -encoding ascii
-BOOT_JAR_JFLAGS += $(JAR_JFLAGS)
-
-BOOT_JAVACFLAGS  += $(NO_PROPRIETARY_API_WARNINGS)
-
-BOOT_JAVA_CMD      = $(UNCYGDRIVE) $(BOOTDIR)/bin/java $(JAVA_TOOLS_FLAGS)
-BOOT_JAVAC_CMD     = $(UNCYGDRIVE) $(BOOTDIR)/bin/javac $(JAVAC_JVM_FLAGS) $(BOOT_JAVACFLAGS)
-BOOT_JAR_CMD       = $(UNCYGDRIVE) $(BOOTDIR)/bin/jar
-BOOT_JARSIGNER_CMD = $(UNCYGDRIVE) $(BOOTDIR)/bin/jarsigner
-
-# Various tools we need to run (FIXUP: Are these the right ones?)
-NATIVE2ASCII    = $(UNCYGDRIVE) $(BOOTDIR)/bin/native2ascii $(JAVA_TOOLS_FLAGS:%=-J%)
-RMIC		= $(UNCYGDRIVE) $(BOOTDIR)/bin/rmic $(JAVA_TOOLS_FLAGS:%=-J%)
-IDLJ		= $(UNCYGDRIVE) $(BOOTDIR)/bin/idlj $(JAVA_TOOLS_FLAGS:%=-J%)
-
-# Should not be used
-#JAVA		= /should/not/be/used
-
--- a/jdk/makefiles/common/shared/Defs-javadoc.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-#
-# Copyright (c) 1997, 2011, 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.
-#
-
-# Copyright year for beginning of Java and some of the apis
-#   (Needed when creating the javadocs)
-FIRST_COPYRIGHT_YEAR                = 1993
-DOMAPI_FIRST_COPYRIGHT_YEAR         = 2005
-MIRROR_FIRST_COPYRIGHT_YEAR         = 2004
-DOCLETAPI_FIRST_COPYRIGHT_YEAR      = 1993
-TAGLETAPI_FIRST_COPYRIGHT_YEAR      = 1993
-JDI_FIRST_COPYRIGHT_YEAR            = 1999
-JAAS_FIRST_COPYRIGHT_YEAR           = 1998
-JGSS_FIRST_COPYRIGHT_YEAR           = 2000
-SMARTCARDIO_FIRST_COPYRIGHT_YEAR    = 2005
-HTTPSERVER_FIRST_COPYRIGHT_YEAR     = 2005
-MGMT_FIRST_COPYRIGHT_YEAR           = 2003
-ATTACH_FIRST_COPYRIGHT_YEAR         = 2005
-JCONSOLE_FIRST_COPYRIGHT_YEAR       = 2006
-SCTPAPI_FIRST_COPYRIGHT_YEAR        = 2009
-TRACING_FIRST_COPYRIGHT_YEAR        = 2008
-TREEAPI_FIRST_COPYRIGHT_YEAR        = 2005
-JNLP_FIRST_COPYRIGHT_YEAR           = 1998
-PLUGIN2_FIRST_COPYRIGHT_YEAR        = 2007
-
-# Oracle name
-FULL_COMPANY_NAME = Oracle and/or its affiliates
-
-# Copyright address
-COMPANY_ADDRESS = 500 Oracle Parkway<br>Redwood Shores, CA 94065 USA.
-
-# The trademark symbol
-TRADEMARK = &trade;
-
-# Common copyright lines used
-#   The word "Copyright" might optionally be a link to the file cpyr.html.
-#   The first year of copyright may vary or not be available.
-#   The address to the company might be optional.
-COMMA:= ,
-EMPTY:=
-SPACE:=$(EMPTY) $(EMPTY)
-COPYRIGHT_SYMBOL = &\#x00a9;
-# Macro to construct the copyright line
-#   (The GNU make 3.78.1 "if" conditional is broken, fixed in GNU make 3.81)
-define CopyrightLine # optionalurl optionalfirstyear optionaladdress
-$(if $(strip $1),<a href="$(strip $1)">Copyright</a>,Copyright) \
-$(COPYRIGHT_SYMBOL) $(if $2,$2${COMMA},) $(COPYRIGHT_YEAR),\
-$(FULL_COMPANY_NAME). $3 All rights reserved.
-endef
-
--- a/jdk/makefiles/common/shared/Defs-linux.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,213 +0,0 @@
-#
-# Copyright (c) 2005, 2011, 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.
-#
-
-#
-# Definitions for Linux.
-#
-
-# Default for COMPILER_WARNINGS_FATAL on Linux (C & C++ compiler warnings)
-ifndef COMPILER_WARNINGS_FATAL
-  COMPILER_WARNINGS_FATAL=false
-endif
-
-# Linux should use parallel compilation for best build times
-ifndef COMPILE_APPROACH
-  COMPILE_APPROACH = parallel
-endif
-
-# Indication that we are doing an incremental build.
-#    This may trigger the creation of make depend files.
-ifndef INCREMENTAL_BUILD
-  INCREMENTAL_BUILD = false
-endif
-
-# FullPath just makes sure it never ends with a / and no duplicates
-define FullPath
-$(shell cd $1 2> $(DEV_NULL) && pwd)
-endef
-
-# OptFullPath: Absolute path name of a dir that might not initially exist.
-define OptFullPath
-$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
-endef
-
-# Location on system where jdk installs might be
-USRJDKINSTANCES_PATH =/opt/java
-
-# UNIXCOMMAND_PATH: path to where the most common Unix commands are.
-#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifneq "$(origin ALT_UNIXCOMMAND_PATH)" "undefined"
-  UNIXCOMMAND_PATH :=$(call PrefixPath,$(ALT_UNIXCOMMAND_PATH))
-else
-  UNIXCOMMAND_PATH  = /bin/
-endif
-
-# USRBIN_PATH: path to where the most common Unix commands are.
-#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifneq "$(origin ALT_USRBIN_PATH)" "undefined"
-  USRBIN_PATH :=$(call PrefixPath,$(ALT_USRBIN_PATH))
-else
-  USRBIN_PATH  = /usr/bin/
-endif
-
-# UNIXCCS_PATH: path to where the Solaris ported UNIX commands can be found
-#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifneq "$(origin ALT_UNIXCCS_PATH)" "undefined"
-  UNIXCCS_PATH :=$(call PrefixPath,$(ALT_UNIXCCS_PATH))
-else
-  UNIXCCS_PATH = /usr/ccs/bin/
-endif
-
-# SLASH_JAVA: location of all network accessable files
-ifdef ALT_SLASH_JAVA
-  SLASH_JAVA  :=$(ALT_SLASH_JAVA)
-else
-  SLASH_JAVA  := $(call DirExists,/java,/java,/NOT-SET)
-endif
-
-# JDK_DEVTOOLS_DIR: common path for all the java devtools
-ifdef ALT_JDK_DEVTOOLS_DIR
-  JDK_DEVTOOLS_DIR  =$(ALT_JDK_DEVTOOLS_DIR)
-else
-  JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
-endif
-
-# COMPILER_PATH: path to where the compiler and tools are installed.
-#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifneq "$(origin ALT_COMPILER_PATH)" "undefined"
-  COMPILER_PATH :=$(call PrefixPath,$(ALT_COMPILER_PATH))
-else
-  COMPILER_PATH  =/usr/bin/
-endif
-
-# OPENWIN_HOME: path to where the X11 environment is installed.
-#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifneq ($(ALT_OPENWIN_HOME),)
-  OPENWIN_HOME :=$(call PrefixPath,$(ALT_OPENWIN_HOME))
-else
-  OPENWIN_HOME  ?=$(SYS_ROOT)/usr/X11R6/
-endif
-
-# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
-#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined"
-  DEVTOOLS_PATH :=$(call PrefixPath,$(ALT_DEVTOOLS_PATH))
-else
-  DEVTOOLS_PATH =/usr/bin/
-endif
-
-# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
-# _BOOTDIR2: Second choice
-ifndef ALT_BOOTDIR
-  _BOOTDIR1  =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
-  _BOOTDIR2  =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION)
-endif
-
-# Always build headless on Linux
-BUILD_HEADLESS = true
-LIBM=-lm
-
-# GCC29_COMPILER_PATH: is the path to where the gcc 2.9 compiler is installed
-#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifdef ALT_GCC29_COMPILER_PATH
-  GCC29_COMPILER_PATH :=$(call PrefixPath,$(ALT_GCC29_COMPILER_PATH))
-else
-  GCC29_COMPILER_PATH = $(JDK_DEVTOOLS_DIR)/$(PLATFORM)/gcc29/usr/
-endif
-
-_CUPS_HEADERS_PATH=/usr/include
-
-# Import JDK images allow for partial builds, components not built are
-#    imported (or copied from) these import areas when needed.
-
-# BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for 
-#   multiple platforms, e.g. windows-i586, solaris-sparc, linux-586, etc.
-ifdef ALT_BUILD_JDK_IMPORT_PATH
-  BUILD_JDK_IMPORT_PATH  :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
-else
-  BUILD_JDK_IMPORT_PATH   = $(PROMOTED_BUILD_BINARIES)
-endif
-
-# JDK_IMPORT_PATH: location of JDK install tree (this version) to import
-ifdef ALT_JDK_IMPORT_PATH
-  JDK_IMPORT_PATH  :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
-else
-  JDK_IMPORT_PATH   = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT)
-endif
-
-# HOTSPOT_IMPORT_PATH: location of hotspot pre-built files
-ifdef ALT_HOTSPOT_IMPORT_PATH
-  HOTSPOT_IMPORT_PATH :=$(call FullPath,$(ALT_HOTSPOT_IMPORT_PATH))
-else
-  HOTSPOT_IMPORT_PATH ?=$(JDK_IMPORT_PATH)
-endif
-
-# HOTSPOT_CLIENT_PATH: location of client jvm library file.
-ifeq ($(ARCH_DATA_MODEL), 32)
-  ifdef ALT_HOTSPOT_CLIENT_PATH
-    HOTSPOT_CLIENT_PATH :=$(call FullPath,$(ALT_HOTSPOT_CLIENT_PATH))
-  else
-    HOTSPOT_CLIENT_PATH   =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/client
-  endif
-endif
-
-# HOTSPOT_SERVER_PATH: location of server jvm library file.
-ifdef ALT_HOTSPOT_SERVER_PATH
-  HOTSPOT_SERVER_PATH :=$(call FullPath,$(ALT_HOTSPOT_SERVER_PATH))
-else
-  HOTSPOT_SERVER_PATH   =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/server
-endif
-
-# Special define for checking the binaries
-
-# Debug builds should downgrade warnings to just info
-MAPFILE_WARNING-DBG=INFO
-MAPFILE_WARNING-OPT=WARNING
-MAPFILE_WARNING-=WARNING
-MAPFILE_WARNING=$(MAPFILE_WARNING-$(VARIANT))
-
-# Macro to check it's input file for banned dependencies and verify the
-#   binary built properly. Relies on process exit code.
-ifndef CROSS_COMPILE_ARCH
-define binary_file_verification # binary_file
-( \
-  $(ECHO) "Checking for mapfile use in: $1" && \
-  if [ "`$(NM) -D -g --defined-only $1 | $(EGREP) 'SUNWprivate'`" = "" ] ; then \
-    $(ECHO) "$(MAPFILE_WARNING): File was not built with a mapfile: $1"; \
-  fi && \
-  $(ECHO) "Library loads for: $1" && \
-  $(LDD) $1 && \
-  $(ECHO) "RUNPATH for: $1" && \
-  ( $(READELF) -d $1 | $(EGREP) 'NEEDED|RUNPATH|RPATH' ) \
-)
-endef
-else
-define binary_file_verification 
-( \
-  $(ECHO) "Skipping binary file verification for cross-compile build" \
-)
-endef
-endif
-
--- a/jdk/makefiles/common/shared/Defs-macosx.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,252 +0,0 @@
-#
-# Copyright (c) 2005, 2011, 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.
-#
-
-#
-# Definitions for Bsd.
-#
-
-# Default for COMPILER_WARNINGS_FATAL on Bsd (C & C++ compiler warnings)
-ifndef COMPILER_WARNINGS_FATAL
-  COMPILER_WARNINGS_FATAL=false
-endif
-
-# Bsd should use parallel compilation for best build times
-ifndef COMPILE_APPROACH
-  COMPILE_APPROACH = parallel
-endif
-
-# Indication that we are doing an incremental build.
-#    This may trigger the creation of make depend files.
-ifndef INCREMENTAL_BUILD
-  INCREMENTAL_BUILD = false
-endif
-
-# FullPath just makes sure it never ends with a / and no duplicates
-define FullPath
-$(shell cd $1 2> $(DEV_NULL) && pwd)
-endef
-
-# OptFullPath: Absolute path name of a dir that might not initially exist.
-define OptFullPath
-$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
-endef
-
-# Location on system where jdk installs might be
-USRJDKINSTANCES_PATH = $(PACKAGE_PATH)
-
-# UNIXCOMMAND_PATH: path to where the most common Unix commands are.
-#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifneq "$(origin ALT_UNIXCOMMAND_PATH)" "undefined"
-  UNIXCOMMAND_PATH :=$(call PrefixPath,$(ALT_UNIXCOMMAND_PATH))
-else
-  UNIXCOMMAND_PATH  = /bin/
-endif
-
-# USRBIN_PATH: path to where the most common Unix commands are.
-#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifneq "$(origin ALT_USRBIN_PATH)" "undefined"
-  USRBIN_PATH :=$(call PrefixPath,$(ALT_USRBIN_PATH))
-else
-  USRBIN_PATH  = /usr/bin/
-endif
-
-# UNIXCCS_PATH: path to where the Solaris ported UNIX commands can be found
-#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifneq "$(origin ALT_UNIXCCS_PATH)" "undefined"
-  UNIXCCS_PATH :=$(call PrefixPath,$(ALT_UNIXCCS_PATH))
-else
-  UNIXCCS_PATH = /usr/ccs/bin/
-endif
-
-# SLASH_JAVA: location of all network accessable files
-ifdef ALT_SLASH_JAVA
-  SLASH_JAVA  :=$(ALT_SLASH_JAVA)
-else
-  SLASH_JAVA  := $(call DirExists,/java,/java,/NOT-SET)
-endif
-
-# JDK_DEVTOOLS_DIR: common path for all the java devtools
-ifdef ALT_JDK_DEVTOOLS_DIR
-  JDK_DEVTOOLS_DIR  =$(ALT_JDK_DEVTOOLS_DIR)
-else
-  JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
-endif
-
-# COMPILER_PATH: path to where the compiler and tools are installed.
-#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifneq "$(origin ALT_COMPILER_PATH)" "undefined"
-  COMPILER_PATH :=$(call PrefixPath,$(ALT_COMPILER_PATH))
-else
- ifeq ($(OS_VENDOR), Apple)
-  ifndef DEVELOPER_DIR
-   DEVELOPER_DIR = $(shell /usr/bin/xcode-select -print-path)/usr/bin/
-  endif
-  
-  COMPILER_PATH  := $(call DirExists,$(DEVELOPER_DIR),/usr/bin/,/NOT-SET)
- else
-  COMPILER_PATH  =/usr/bin/
- endif
-endif
-
-# OPENWIN_HOME: path to where the X11 environment is installed.
-#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifneq ($(ALT_OPENWIN_HOME),)
-  OPENWIN_HOME :=$(call PrefixPath,$(ALT_OPENWIN_HOME))
-else
-  OPENWIN_HOME  ?=$(X11_PATH)
-endif
-
-# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
-#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined"
-  DEVTOOLS_PATH :=$(call PrefixPath,$(ALT_DEVTOOLS_PATH))
-else
-  DEVTOOLS_PATH =$(PACKAGE_PATH)/bin/
-endif
-
-# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
-# _BOOTDIR2: Second choice
-ifndef ALT_BOOTDIR
-  _BOOTDIR1  =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
-  _BOOTDIR2  =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION)
-endif
-
-# Always build headless on Bsd
-BUILD_HEADLESS = true
-LIBM=-lm
-
-ifeq ($(OS_VENDOR), Apple)
-  _CUPS_HEADERS_PATH=/usr/include
-else
-  _CUPS_HEADERS_PATH=$(PACKAGE_PATH)/include
-endif
-
-# Import JDK images allow for partial builds, components not built are
-#    imported (or copied from) these import areas when needed.
-
-# BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for 
-#   multiple platforms, e.g. windows-i586, solaris-sparc, bsd-586, etc.
-ifdef ALT_BUILD_JDK_IMPORT_PATH
-  BUILD_JDK_IMPORT_PATH  :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
-else
-  BUILD_JDK_IMPORT_PATH   = $(PROMOTED_BUILD_BINARIES)
-endif
-BUILD_JDK_IMPORT_PATH:=$(call AltCheckValue,BUILD_JDK_IMPORT_PATH)
-
-# JDK_IMPORT_PATH: location of JDK install tree (this version) to import
-ifdef ALT_JDK_IMPORT_PATH
-  JDK_IMPORT_PATH  :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
-else
-  JDK_IMPORT_PATH   = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT)
-endif
-JDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH)
-
-# HOTSPOT_IMPORT_PATH: location of hotspot pre-built files
-ifdef ALT_HOTSPOT_IMPORT_PATH
-  HOTSPOT_IMPORT_PATH :=$(call FullPath,$(ALT_HOTSPOT_IMPORT_PATH))
-else
-  HOTSPOT_IMPORT_PATH ?=$(JDK_IMPORT_PATH)
-endif
-HOTSPOT_IMPORT_PATH:=$(call AltCheckValue,HOTSPOT_IMPORT_PATH)
-
-# HOTSPOT_CLIENT_PATH: location of client jvm library file.
-ifeq ($(ARCH_DATA_MODEL), 32)
-  ifdef ALT_HOTSPOT_CLIENT_PATH
-    HOTSPOT_CLIENT_PATH :=$(call FullPath,$(ALT_HOTSPOT_CLIENT_PATH))
-  else
-    HOTSPOT_CLIENT_PATH   =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/client
-  endif
-  HOTSPOT_CLIENT_PATH:=$(call AltCheckValue,HOTSPOT_CLIENT_PATH)
-endif
-
-# HOTSPOT_SERVER_PATH: location of server jvm library file.
-ifdef ALT_HOTSPOT_SERVER_PATH
-  HOTSPOT_SERVER_PATH :=$(call FullPath,$(ALT_HOTSPOT_SERVER_PATH))
-else
-  HOTSPOT_SERVER_PATH   =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/server
-endif
-HOTSPOT_SERVER_PATH:=$(call AltCheckValue,HOTSPOT_SERVER_PATH)
-
-# Special define for checking the binaries
-
-# Debug builds should downgrade warnings to just info
-MAPFILE_WARNING-DBG=INFO
-MAPFILE_WARNING-OPT=WARNING
-MAPFILE_WARNING-=WARNING
-MAPFILE_WARNING=$(MAPFILE_WARNING-$(VARIANT))
-
-# Macro to check it's input file for banned dependencies and verify the
-#   binary built properly. Relies on process exit code.
-ifndef CROSS_COMPILE_ARCH
-ifeq ($(OS_VENDOR), Apple)
-define binary_file_verification # binary_file
-( \
-  $(ECHO) "Checking for mapfile use in: $1" && \
-  if [ "`$(NM) -g $1 | $(EGREP) 'SUNWprivate'`" = "" ] ; then \
-    $(ECHO) "WARNING: File was not built with a mapfile: $1"; \
-  fi && \
-  $(ECHO) "Library loads for: $1" && \
-  $(OTOOL) -L $1 && \
-  $(ECHO) "RUNPATH for: $1" && \
-  ( $(OTOOL) -l $1 | $(EGREP) 'path ' ) \
-) || true
-endef
-else
-ifeq ($(OS_VENDOR), OpenBSD)
-define binary_file_verification # binary_file
-( \
-  $(ECHO) "Checking for mapfile use in: $1" && \
-  if [ "`$(OBJDUMP) -T $1 | $(EGREP) '[0-9a-f]* g *DF \.text.*SUNWprivate'`" = "" ] ; then \
-    $(ECHO) "$(MAPFILE_WARNING): File was not built with a mapfile: $1"; \
-  fi && \
-  $(ECHO) "Library loads for: $1" && \
-  $(LDD) $1 && \
-  $(ECHO) "RUNPATH for: $1" && \
-  ( $(READELF) -d $1 | $(EGREP) 'NEEDED|RUNPATH|RPATH' ) \
-) || true
-endef
-else
-define binary_file_verification # binary_file
-( \
-  $(ECHO) "Checking for mapfile use in: $1" && \
-  if [ "`$(NM) -D -g --defined-only $1 | $(EGREP) 'SUNWprivate'`" = "" ] ; then \
-    $(ECHO) "$(MAPFILE_WARNING): File was not built with a mapfile: $1"; \
-  fi && \
-  $(ECHO) "Library loads for: $1" && \
-  $(LDD) $1 && \
-  $(ECHO) "RUNPATH for: $1" && \
-  ( $(READELF) -d $1 | $(EGREP) 'NEEDED|RUNPATH|RPATH' ) \
-)
-endef
-endif # OS_VENDOR == OpenBSD
-endif # OS_VENDOR == Apple
-else
-define binary_file_verification 
-( \
-  $(ECHO) "Skipping binary file verification for cross-compile build" \
-)
-endef
-endif
-
--- a/jdk/makefiles/common/shared/Defs-solaris.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,239 +0,0 @@
-#
-# Copyright (c) 2005, 2011, 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.
-#
-
-#
-# Definitions for Solaris.
-#
-
-# Default for COMPILER_WARNINGS_FATAL on Solaris (C & C++ compiler warnings)
-ifndef COMPILER_WARNINGS_FATAL
-  COMPILER_WARNINGS_FATAL=false
-endif
-
-# Solaris should use parallel compilation for best build times
-ifndef COMPILE_APPROACH
-  COMPILE_APPROACH = parallel
-endif
-
-# Indication that we are doing an incremental build.
-#    This may trigger the creation of make depend files.
-ifndef INCREMENTAL_BUILD
-  INCREMENTAL_BUILD = false
-endif
-
-# FullPath just makes sure it never ends with a / and no duplicates
-define FullPath
-$(shell cd $1 2> $(DEV_NULL) && pwd)
-endef
-
-# OptFullPath: Absolute path name of a dir that might not initially exist.
-define OptFullPath
-$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
-endef
-
-# Location on system where jdk installs might be
-USRJDKINSTANCES_PATH =/usr/jdk/instances
-
-# UNIXCOMMAND_PATH: path to where the most common Unix commands are.
-#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifneq "$(origin ALT_UNIXCOMMAND_PATH)" "undefined"
-  UNIXCOMMAND_PATH :=$(call PrefixPath,$(ALT_UNIXCOMMAND_PATH))
-else
-  UNIXCOMMAND_PATH  = /usr/bin/
-endif
-
-# UNIXCCS_PATH: path to where the less common UNIX commands can be found
-#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifneq "$(origin ALT_UNIXCCS_PATH)" "undefined"
-  UNIXCCS_PATH :=$(call PrefixPath,$(ALT_UNIXCCS_PATH))
-else
-  UNIXCCS_PATH = /usr/ccs/bin/
-endif
-
-# SLASH_JAVA: location of all network accessable files
-ifdef ALT_SLASH_JAVA
-  SLASH_JAVA  :=$(ALT_SLASH_JAVA)
-else
-  SLASH_JAVA  := $(call DirExists,/java,/java,/NOT-SET)
-endif
-
-# JDK_DEVTOOLS_DIR: common path for all the java devtools
-ifdef ALT_JDK_DEVTOOLS_DIR
-  JDK_DEVTOOLS_DIR  =$(ALT_JDK_DEVTOOLS_DIR)
-else
-  JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
-endif
-
-# COMPILER_PATH: path to where the compiler and tools are installed.
-#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifneq "$(origin ALT_COMPILER_PATH)" "undefined"
-  COMPILER_PATH :=$(call PrefixPath,$(ALT_COMPILER_PATH))
-else
-  # If the place where we keep a set of Sun Studio compilers doesn't exist,
-  #  try and use /opt/SUNWspro, the default location for the SS compilers.
-  #  (DirExists checks for this path twice, an automount double check)
-  _SUNSTUDIO_SET_ROOT=$(JDK_DEVTOOLS_DIR)/$(ARCH_FAMILY)/SUNWspro
-  SUNSTUDIO_SET_ROOT:=$(call DirExists,$(_SUNSTUDIO_SET_ROOT),$(_SUNSTUDIO_SET_ROOT),)
-  ifneq ($(SUNSTUDIO_SET_ROOT),)
-    COMPILER_PATH =$(SUNSTUDIO_SET_ROOT)/$(REQUIRED_COMPILER_VERSION)/bin/
-  else
-    COMPILER_PATH =/opt/SUNWspro/bin/
-  endif
-endif
-
-# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
-#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined"
-  DEVTOOLS_PATH :=$(call PrefixPath,$(ALT_DEVTOOLS_PATH))
-else
-  ifdef ALT_JDK_DEVTOOLS_DIR
-    DEVTOOLS_PATH =$(JDK_DEVTOOLS_DIR)/$(ARCH_FAMILY)/bin/
-  else
-    ifdef OPENJDK
-      DEVTOOLS_PATH = /usr/bin/
-    else
-      DEVTOOLS_PATH =$(JDK_DEVTOOLS_DIR)/$(ARCH_FAMILY)/bin/
-    endif
-  endif
-endif
-
-# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
-# _BOOTDIR2: Second choice
-ifndef ALT_BOOTDIR
-  _BOOTDIR1  =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
-  _BOOTDIR2  =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION)
-endif
-
-# GCC_COMPILER_PATH: path to where the gcc/g++ compiler and tools are installed
-#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifneq "$(origin ALT_GCC_COMPILER_PATH)" "undefined"
-  GCC_COMPILER_PATH :=$(call PrefixPath,$(ALT_GCC_COMPILER_PATH))
-else
-  GCC_COMPILER_PATH = $(JDK_DEVTOOLS_DIR)/$(ARCH_FAMILY)/gnucc/bin/
-endif
-
-
-# Always build headless on Solaris
-BUILD_HEADLESS = true
-
-_CUPS_HEADERS_PATH=/opt/sfw/cups/include
-
-# Import JDK images allow for partial builds, components not built are
-#    imported (or copied from) these import areas when needed.
-
-# BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for 
-#   multiple platforms, e.g. windows-i586, solaris-sparc, linux-586, etc.
-ifdef ALT_BUILD_JDK_IMPORT_PATH
-  BUILD_JDK_IMPORT_PATH  :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
-else
-  BUILD_JDK_IMPORT_PATH   = $(PROMOTED_BUILD_BINARIES)
-endif
-
-# JDK_IMPORT_PATH: location of previously built JDK (this version) to import
-ifdef ALT_JDK_IMPORT_PATH
-  JDK_IMPORT_PATH  :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
-else
-  JDK_IMPORT_PATH   = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT)
-endif
-
-# HOTSPOT_IMPORT_PATH: location of hotspot pre-built files
-ifdef ALT_HOTSPOT_IMPORT_PATH
-  HOTSPOT_IMPORT_PATH :=$(call FullPath,$(ALT_HOTSPOT_IMPORT_PATH))
-else
-  HOTSPOT_IMPORT_PATH ?=$(JDK_IMPORT_PATH)
-endif
-
-# HOTSPOT_CLIENT_PATH: location of client jvm library file.
-ifeq ($(ARCH_DATA_MODEL), 32)
-  ifdef ALT_HOTSPOT_CLIENT_PATH
-    HOTSPOT_CLIENT_PATH :=$(call FullPath,$(ALT_HOTSPOT_CLIENT_PATH))
-  else
-    HOTSPOT_CLIENT_PATH   =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/client
-  endif
-endif
-
-# HOTSPOT_SERVER_PATH: location of server jvm library file.
-ifdef ALT_HOTSPOT_SERVER_PATH
-  HOTSPOT_SERVER_PATH :=$(call FullPath,$(ALT_HOTSPOT_SERVER_PATH))
-else
-  HOTSPOT_SERVER_PATH   =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/server
-endif
-
-# Special define for checking the binaries
-
-# Debug builds should downgrade warnings to just info
-MAPFILE_WARNING-DBG=INFO
-MAPFILE_WARNING-OPT=WARNING
-MAPFILE_WARNING-=WARNING
-MAPFILE_WARNING=$(MAPFILE_WARNING-$(VARIANT))
-
-# Some libraries do not have mapfiles for multiple reasons.
-#   These libraries for sparc and sparcv9 are exceptions to the mapfile rule:
-#     libjdgaSUNWafb.so
-#     libjdgaSUNWcg6.so
-#     libjdgaSUNWffb.so
-#     libjdgaSUNWm64.so
-#     libxinerama.so
-#   The library libJdbcOdbc.so has also been given an exception.
-#   The JNI/JVMTI demo libraries are also missing mapfiles, no exceptions yet.
-ifeq ($(ARCH_FAMILY),sparc)
-  MAPFILE_EXCEPTIONS = \
-    (libJdbcOdbc|libjdgaSUNWafb|libjdgaSUNWcg6|libjdgaSUNWffb|libjdgaSUNWm64|libxinerama)
-else
-  MAPFILE_EXCEPTIONS = (libJdbcOdbc)
-endif
-
-# Macro to check it's input file for banned dependencies and verify the
-#   binary built properly. Relies on process exit code.
-ifndef CROSS_COMPILE_ARCH
-ifneq (,$(DUMP))
-define binary_file_verification # binary_file
-( \
-  $(ECHO) "Checking for mapfile use in: $1" && \
-  if [ "`$(ECHO) $(basename $(notdir $1)) | $(EGREP) '$(MAPFILE_EXCEPTIONS)'`" = "" \
-       -a "`$(NM) -g -D $1 | $(EGREP) -v 'UNDEF' | $(EGREP) 'SUNWprivate'`" = "" ] ; then \
-    $(ECHO) "$(MAPFILE_WARNING): File was not built with a mapfile: $1"; \
-  fi && \
-  $(ECHO) "Library loads for: $1" && \
-  $(LDD) $1 && \
-  $(ECHO) "RUNPATH for: $1" && \
-  ( $(DUMP) -L -v $1 | $(EGREP) 'NEEDED|RUNPATH|RPATH' ) \
-)
-endef
-else
-define binary_file_verification 
-( \
-  $(ECHO) "Skipping binary file verification since no dump command found" \
-)
-endef
-endif
-else
-define binary_file_verification 
-( \
-  $(ECHO) "Skipping binary file verification for cross-compile build" \
-)
-endef
-endif
-
--- a/jdk/makefiles/common/shared/Defs-versions.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,215 +0,0 @@
-#
-# Copyright (c) 2009, 2011, 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.
-#
-
-#
-# WARNING: This file is shared with other workspaces.
-#
-
-# This file needs these set: PLATFORM, ARCH_FAMILY, and ARCH_DATA_MODEL.
-
-# Windows uses Microsoft compilers by default
-ifeq ($(PLATFORM), windows)
-  override CC_VERSION = msvc
-endif
-
-# Solaris uses Sun Studio compilers by default
-ifeq ($(PLATFORM), solaris)
-  override CC_VERSION = sun
-endif
-
-# Linux uses GNU compilers by default
-ifeq ($(PLATFORM), linux)
-  override CC_VERSION = gcc
-endif
-
-# Mac OS X uses LLVM by default
-ifeq ($(PLATFORM), macosx)
-  override CC_VERSION = llvm
-endif
-
-##########################################################################
-#
-# List of JDK official minimum, expected, or required versions:
-#
-# REQUIRED_ALSA_VERSION
-#   Linux only: The ALSA sound library version expected.
-#
-# REQUIRED_ANT_VER
-#   The minimum 'ant' version.
-#
-# REQUIRED_BOOT_VER
-#   The minimum boot jdk version.
-#
-# REQUIRED_CC_VER
-#   The primary C compiler version expected.
-#
-# REQUIRED_COMPILER_NAME
-#   The long descriptive name of the compiler we should use
-#
-# REQUIRED_COMPILER_VERSION
-#   The one word name that identifies the compilers being used.
-#
-# REQUIRED_CYGWIN_VER
-#   Windows only: If CYGWIN is used, the minimum CYGWIN version.
-#
-# REQUIRED_DXSDK_VER
-#   Windows only: The version of DirectX SDK expected.
-#
-# REQUIRED_FREETYPE_VERSION
-#   If we are using freetype, the freetype version expected.
-#
-# REQUIRED_GCC_VER
-#   Solaris and Linux only. The required version of gcc/g++ for the legacy OJI plugin.
-#
-# REQUIRED_LINK_VER
-#   Windows only: The version of link.exe expected.
-#
-# REQUIRED_MAKE_VER
-#   The minimum version of GNU make.
-#
-# REQUIRED_MKS_VER
-#   Windows only: If MKS used instead of CYGWIN, the minimum version of MKS.
-#
-# REQUIRED_OS_VARIANT_NAME
-#   The OS variation name required.
-#     Solaris: Solaris or OpenSolaris
-#     Windows: Windows2000, WindowsXP, Windows2003, etc.
-#     Linux: Fedora, RedHat, SuSE, Ubuntu, etc.
-#
-# REQUIRED_OS_VARIANT_VERSION
-#   The version number associated with the above OS variant name.
-#     Solaris: output of uname -r
-#     Windows: 5.0 for Windows2000, 5.1 for WindowsXP, 5.2 for Windows2003, etc.
-#     Linux: number for the variant, e.g. 9 for Fedora 9
-#
-# REQUIRED_OS_VERSION
-#   The formal OS version number.
-#     Solaris & Windows: same as REQUIRED_OS_VARIANT_VERSION
-#     Linux: the kernel version, or output of uname -r
-#
-# REQUIRED_UNZIP_VER
-#   The minimum version of unzip.
-#
-# REQUIRED_ZIP_VER
-#   The minimum version of unzip.
-#
-###########
-#
-# Differences in the build platform from these versions may trigger warnings
-#   messages during the sanity checking when building the JDK.
-#
-# When building the OpenJDK most of these required or expected  versions are 
-#  ignored or allowed to vary widely to accomodate the many build situations
-#  of the OpenJDK.
-#
-##########################################################################
-
-# Solaris specific
-ifeq ($(PLATFORM), solaris)
-  REQUIRED_OS_NAME            = SunOS
-  REQUIRED_OS_VERSION         = 5.10
-  REQUIRED_OS_VARIANT_NAME    = Solaris
-  REQUIRED_OS_VARIANT_VERSION = $(REQUIRED_OS_VERSION)
-  REQUIRED_COMPILER_NAME      = Sun Studio 12 Update 1
-  REQUIRED_COMPILER_VERSION   = SS12u1
-  # Cross-compilation compiler versions are target specific
-  # so don't set a required version if cross-compiling
-  ifndef CROSS_COMPILE_ARCH
-    ifeq ($(CC_VERSION),sun)
-      REQUIRED_CC_VER           = 5.10
-    endif
-    ifeq ($(CC_VERSION),gcc)
-      REQUIRED_CC_VER           = 3.4.3
-    endif
-  endif
-  REQUIRED_GCC_VER            = 2.95.2
-endif
-
-# Linux specific
-ifeq ($(PLATFORM), linux)
-  REQUIRED_OS_NAME            = Linux
-  REQUIRED_OS_VERSION         = 2.6
-  REQUIRED_OS_VARIANT_NAME    = Fedora
-  REQUIRED_OS_VARIANT_VERSION = 9
-  REQUIRED_ALSA_VERSION       = 0.9.1
-  REQUIRED_COMPILER_NAME      = GCC4
-  REQUIRED_COMPILER_VERSION   = GCC4
-  REQUIRED_GCC_VER            = 2.95
-  # Cross-compilation compiler versions are target specific
-  # so don't set a required version if cross-compiling
-  ifndef CROSS_COMPILE_ARCH
-    ifeq ($(CC_VERSION),gcc)
-      REQUIRED_CC_VER           = 4.3.0
-    endif
-    ifeq ($(CC_VERSION),sun)
-      REQUIRED_CC_VER           = 5.10
-    endif
-  endif
-endif
-
-# Mac specific
-ifeq ($(PLATFORM), macosx)
-  REQUIRED_OS_NAME            = Darwin
-  REQUIRED_OS_VERSION         = 11.2
-  REQUIRED_OS_VARIANT_NAME    = MacOSX
-  REQUIRED_OS_VARIANT_VERSION = 10.7.2
-  REQUIRED_COMPILER_NAME      = GCC4
-  REQUIRED_COMPILER_VERSION   = GCC4
-  REQUIRED_CC_VER             = 4.2.1
-endif
-
-# Windows specific
-ifeq ($(PLATFORM), windows)
-  REQUIRED_OS_NAME            = Windows
-  ifeq ($(ARCH_DATA_MODEL),64)
-    REQUIRED_OS_VERSION       = 5.2
-    REQUIRED_OS_VARIANT_NAME  = Windows2003
-  else
-    REQUIRED_OS_VERSION       = 5.1
-    REQUIRED_OS_VARIANT_NAME  = WindowsXP
-  endif
-  REQUIRED_OS_VARIANT_VERSION = $(REQUIRED_OS_VERSION)
-  REQUIRED_CYGWIN_VER         = 4.0
-  REQUIRED_MKS_VER            = 6.1
-  REQUIRED_DXSDK_VER          = 0x0900
-  ifeq ($(CC_VERSION),msvc)
-    REQUIRED_COMPILER_NAME    = Visual Studio 10
-    REQUIRED_COMPILER_VERSION = VS2010
-    REQUIRED_CC_VER           = 16.00.30319.01
-    REQUIRED_LINK_VER         = 10.00.30319.01
-  endif
-  ifeq ($(CC_VERSION),gcc)
-    REQUIRED_CC_VER           = 3.4.3
-  endif
-endif
-
-# Generic
-REQUIRED_ANT_VER          = 1.7.1
-REQUIRED_BOOT_VER         = 1.7
-REQUIRED_FREETYPE_VERSION = 2.3.0
-REQUIRED_MAKE_VER         = 3.81
-REQUIRED_UNZIP_VER        = 5.12
-REQUIRED_ZIP_VER          = 2.2
-
--- a/jdk/makefiles/common/shared/Defs-windows.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,696 +0,0 @@
-#
-# Copyright (c) 2005, 2011, 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.
-#
-
-#
-# Definitions for Windows.
-#
-
-# Default for COMPILER_WARNINGS_FATAL on Windows (C++ compiler warnings)
-#    Level: Default is 3, 0 means none, 4 is the most but may be unreliable
-#    Some makefiles may have set this to 0 to turn off warnings completely,
-#    which also effectively creates a COMPILER_WARNINGS_FATAL=false situation.
-#    Program.gmk may turn this down to 2 (building .exe's).
-#    Windows 64bit platforms are less likely to be warning free.
-#    Historically, Windows 32bit builds should be mostly warning free.
-#    VS2010 introduced a large number of security warnings that are off by
-#    default but will be turned back on with SHOW_ALL_WARNINGS=true.
-ifndef COMPILER_WARNING_LEVEL
-  COMPILER_WARNING_LEVEL=3
-endif
-ifndef COMPILER_WARNINGS_FATAL
-  COMPILER_WARNINGS_FATAL=false
-endif
-ifndef SHOW_ALL_WARNINGS
-  SHOW_ALL_WARNINGS = false
-endif
-
-# Windows should use parallel compilation for best build times
-ifndef COMPILE_APPROACH
-  COMPILE_APPROACH = normal
-endif
-
-# Indication that we are doing an incremental build.
-#    This may trigger the creation of make depend files.
-#    (This may not be working on windows yet, always force to false.)
-override INCREMENTAL_BUILD = false
-
-# WARNING: This is extremely touch stuff, between CYGWIN vs. MKS and all
-#          variations of MKS and CYGWIN releases, and 32bit vs 64bit,
-#          this file can give you nightmares.
-#
-# Notes:
-#   Keep all paths in the windows "mixed" style except CYGWIN UNXIXCOMMAND_PATH.
-#   Use of PrefixPath is critical, some variables must end with / (see NOTE).
-#   Use of quotes is critical due to possible spaces in paths coming from
-#     the environment variables, be careful.
-#   First convert \ to / with subst, keep it quoted due to blanks, then
-#     use cygpath -s or dosname -s to get the short non-blank name.
-#   If the MKS is old and doesn't have a dosname -s, you will be forced
-#     to set ALT variables with the short non-space directory names.
-#     If dosname doesn't appear to work, we won't use it.
-#     The dosname utility also wants to accept stdin if it is not supplied
-#     any path on the command line, this is really dangerous when using
-#     make variables that can easily become empty, so I use:
-#        echo $1 | dosname -s     instead of    dosname -s $1
-#     to prevent dosname from hanging up the make process when $1 is empty.
-#     The cygpath utility does not have this problem.
-#   The ALT values should never really have spaces or use \.
-#   Suspect these environment variables to have spaces and/or \ characters:
-#     SYSTEMROOT, SystemRoot, WINDIR, windir, PROGRAMFILES, ProgramFiles,
-#     DXSDK_DIR, MSTOOLS, Mstools, MSSDK, MSSdk, VCnnCOMNTOOLS, 
-#     MSVCDIR, MSVCDir.
-#     So use $(subst \,/,) on them first adding quotes and placing them in
-#         their own variable assigned with :=, then use FullPath.
-#
-
-ifdef USING_CYGWIN
-# Macro to effectively do a toupper without an exec
-define ToUpper
-$(subst a,A,$(subst b,B,$(subst c,C,$(subst d,D,$(subst e,E,$(subst f,F,\
-$(subst g,G,$(subst h,H,$(subst i,I,$(subst j,J,$(subst k,K,$(subst l,L,\
-$(subst m,M,$(subst n,N,$(subst o,O,$(subst p,P,$(subst q,Q,$(subst r,R,\
-$(subst s,S,$(subst t,T,$(subst u,U,$(subst v,V,$(subst w,W,$(subst x,X,\
-$(subst y,Y,$(subst z,Z,$1))))))))))))))))))))))))))
-endef
-# All possible drive letters
-drives=a b c d e f g h i j k l m n o p q r s t v u w x y z
-# Convert /cygdrive/ paths to the mixed style without an exec of cygpath
-#   Must be a path with no spaces. /cygdrive/letter is always lowercase
-#   and letter:/ is always uppercase coming from cygpath.
-define MixedPath
-$(patsubst /%,$(CYGWIN_HOME)/%,$(sort $(filter-out /cygdrive/%,$(foreach drive,$(drives),$(patsubst /cygdrive/$(drive)/%,$(call ToUpper,$(drive)):/%,$1)))))
-endef
-# Use FullPath to get C:/ style non-spaces path. Never ends with a /!
-# We assume cygpath is available in the search path
-#    NOTE: Use of 'pwd' with CYGWIN will not get you a mixed style path!
-define FullPath
-$(if $(word 2,$1),$(shell $(CYGPATH_CMD) $1 2> $(DEV_NULL)),$(call MixedPath,$(realpath $(subst ",,$1))))
-endef
-define OptFullPath
-$(shell if [ "$1" != "" -a -d "$1" ]; then $(CYGPATH_CMD) "$1" 2> $(DEV_NULL); else echo "$1"; fi)
-endef
-else
-# Temporary until we upgrade to MKS 8.7, MKS pwd returns mixed mode path
-define FullPath
-$(shell cd $1 2> $(DEV_NULL) && pwd)
-endef
-define OptFullPath
-$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
-endef
-endif
-
-# System drive
-ifdef SYSTEMDRIVE
-  _system_drive =$(SYSTEMDRIVE)
-else
-  ifdef SystemDrive
-    _system_drive =$(SystemDrive)
-  endif
-endif
-_system_drive:=$(call CheckValue,_system_drive,C:)
-
-# UNIXCOMMAND_PATH: path to where the most common Unix commands are.
-#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
-#        With cygwin, just use this as is don't use FullPath on it.
-ifdef ALT_UNIXCOMMAND_PATH
-  ifdef USING_CYGWIN
-    UNIXCOMMAND_PATH       :=$(call PrefixPath,$(ALT_UNIXCOMMAND_PATH))
-  else
-    xALT_UNIXCOMMAND_PATH  :="$(subst \,/,$(ALT_UNIXCOMMAND_PATH))"
-    fxALT_UNIXCOMMAND_PATH :=$(call FullPath,$(xALT_UNIXCOMMAND_PATH))
-    UNIXCOMMAND_PATH       :=$(call PrefixPath,$(fxALT_UNIXCOMMAND_PATH))
-  endif
-else
-  ifdef USING_CYGWIN
-    UNIXCOMMAND_PATH :=$(call PrefixPath,/usr/bin)
-  else
-    ifdef ROOTDIR
-      xROOTDIR :="$(subst \,/,$(ROOTDIR))"
-      _rootdir :=$(call FullPath,$(xROOTDIR))
-    else
-      xROOTDIR :="$(_system_drive)/mksnt"
-      _rootdir :=$(call FullPath,$(xROOTDIR))
-    endif
-    ifneq ($(_rootdir),)
-      UNIXCOMMAND_PATH :=$(call PrefixPath,$(_rootdir)/mksnt)
-    endif
-  endif
-endif
-UNIXCOMMAND_PATH:=$(call AltCheckSpaces,UNIXCOMMAND_PATH)
-
-# Get version of MKS or CYGWIN
-ifndef USING_CYGWIN
-_MKS_VER :=$(shell $(MKSINFO) 2>&1 | $(GREP) Release | $(TAIL) -1 | $(SED) -e 's@.*\(Release.*\)@\1@')
-MKS_VER  :=$(call GetVersion,$(_MKS_VER))
-# At this point, we can re-define FullPath to use DOSNAME_CMD
-CHECK_MKS87:=$(call CheckVersions,$(MKS_VER),8.7)
-TRY_DOSNAME:=false
-ifeq ($(CHECK_MKS87),same)
-TRY_DOSNAME:=true
-endif
-# Newer should be ok
-ifeq ($(CHECK_MKS87),newer)
-TRY_DOSNAME:=true
-endif
-ifeq ($(TRY_DOSNAME),true)
-ifeq ($(shell $(UNIXCOMMAND_PATH)dosname -s $(_system_drive)/ 2> $(DEV_NULL)),$(_system_drive)/)
-_DOSNAME=$(UNIXCOMMAND_PATH)dosname
-DOSNAME_CMD:=$(_DOSNAME) -s
-define FullPath
-$(subst //,/,$(shell echo $1 | $(DOSNAME_CMD) 2> $(DEV_NULL)))
-endef
-endif # test dosname -s
-endif # TRY_DOSNAME
-endif # MKS
-
-# We try to get references to what we need via the default component
-#    environment variables, or what was used historically.
-
-# Process Windows values into FullPath values, these paths may have \ chars
-
-# System root
-ifdef SYSTEMROOT
-  xSYSTEMROOT  :="$(subst \,/,$(SYSTEMROOT))"
-  _system_root :=$(call FullPath,$(xSYSTEMROOT))
-else
-  ifdef SystemRoot
-     xSYSTEMROOT :="$(subst \,/,$(SystemRoot))"
-    _system_root :=$(call FullPath,$(xSYSTEMROOT))
-  else
-    ifdef WINDIR
-      xWINDIR      :="$(subst \,/,$(WINDIR))"
-      _system_root :=$(call FullPath,$(xWINDIR))
-    else
-      ifdef windir
-        xWINDIR      :="$(subst \,/,$(windir))"
-        _system_root :=$(call FullPath,$(xWINDIR))
-      endif
-    endif
-  endif
-endif
-_system_root:=$(call CheckValue,_system_root,$(_system_drive)/WINNT)
-
-# Program Files directory
-ifdef PROGRAMFILES
-  xPROGRAMFILES      :="$(subst \,/,$(PROGRAMFILES))"
-else
-  ifeq ($(ARCH_DATA_MODEL), 32)
-    xPROGRAMFILES    :="$(_system_drive)/Program Files"
-  else
-    xPROGRAMFILES    :="$(_system_drive)/Program Files (x86)"
-  endif
-endif
-ifeq ($(ARCH_DATA_MODEL), 32)
-  _program_files     :=$(call FullPath,$(xPROGRAMFILES))
-  _program_files32   :=$(_program_files)
-else
-  ifdef PROGRAMW6432
-    xPROGRAMW6432    :="$(subst \,/,$(PROGRAMW6432))"
-  else
-    xPROGRAMW6432    :="$(_system_drive)/Program Files"
-  endif
-  _program_files     :=$(call FullPath,$(xPROGRAMW6432))
-  _program_files32   :=$(call FullPath,$(xPROGRAMFILES))
-  ifneq ($(word 1,$(_program_files32)),$(_program_files32))
-    _program_files32:=
-  endif
-endif
-ifneq ($(word 1,$(_program_files)),$(_program_files))
-  _program_files:=
-endif
-
-# DirectX SDK
-ifdef ALT_DXSDK_DRIVE
-  _dx_sdk_dir  =$(ALT_DXSDK_DRIVE):/DXSDK
-else
-  ifdef DXSDK_DIR
-    xDXSDK_DIR  :="$(subst \,/,$(DXSDK_DIR))"
-  else
-    xDXSDK_DIR  :="$(_system_drive)/DXSDK"
-  endif
-  _dx_sdk_dir :=$(call FullPath,$(xDXSDK_DIR))
-endif
-
-# Use of the Visual Studio compilers requires certain env variables be set:
-#   PATH should include the path to cl.exe
-#   INCLUDE should be defined
-#   LIB     should be defined
-#   LIBPATH should be defined
-#   VS100COMNTOOLS should be defined
-#   WINDOWSSDKDIR should be defined
-#     The 7.0a path is from VS2010 Pro, the 7.1 path is the standalone SDK.
-#     For 64bit either will work for us.
-#     If a developer chooses to install the standalone SDK in some other
-#     location, then they need to set WINDOWSSDKDIR.
-#
-# Compilers for 64bit may be from the free SDK, or Visual Studio Professional.
-#   The free Express compilers don't contain 64 bit compilers, which is why
-#   you instead need the SDK.
-#   Release enginering will use VS2010 Pro, so the frequency of testing of
-#     SDK based builds will depend entirely on individual usage.
-
-# We only need to do this once
-ifndef VS2010_EXISTS
-  # The 2 key paths we need are WINDOWSSDKDIR and VS100COMNTOOLS.
-  #   If not defined try to see if default location exists.
-  #   If defined make sure that the path has no spaces.
-  #   Finally, export path with no spaces so logic minimizes FullPath calls.
-  ifndef WINDOWSSDKDIR
-    # The 7.0a SDK is the second choice.
-    xWINDOWSSDKDIR :="$(_program_files32)/Microsoft SDKs/Windows/v7.0a/"
-    fWINDOWSSDKDIR :=$(call FullPath,$(xWINDOWSSDKDIR))
-    # The 7.1 SDK is the second choice.
-    ifeq ($(fWINDOWSSDKDIR),)
-      xWINDOWSSDKDIR :="$(_program_files32)/Microsoft SDKs/Windows/v7.1/"
-      fWINDOWSSDKDIR :=$(call FullPath,$(xWINDOWSSDKDIR))
-    endif
-  else
-    ifneq ($(word 2,$(WINDOWSSDKDIR)),)
-      xWINDOWSSDKDIR :="$(subst \,/,$(WINDOWSSDKDIR))"
-      fWINDOWSSDKDIR :=$(call FullPath,$(xWINDOWSSDKDIR))
-    else
-      fWINDOWSSDKDIR :=$(WINDOWSSDKDIR)
-    endif
-  endif
-  ifneq ($(fWINDOWSSDKDIR),)
-    WINDOWSSDKDIR  :=$(fWINDOWSSDKDIR)/
-  endif
-  ifndef VS100COMNTOOLS
-    xVS100COMNTOOLS :="$(_program_files32)/Microsoft Visual Studio 10.0/Common7/Tools/"
-    fVS100COMNTOOLS :=$(call FullPath,$(xVS100COMNTOOLS))
-  else
-    xVS100COMNTOOLS :="$(subst \,/,$(VS100COMNTOOLS))"
-    ifneq ($(word 2,$(VS100COMNTOOLS)),)
-      fVS100COMNTOOLS :=$(call FullPath,$(xVS100COMNTOOLS))
-    else
-      fVS100COMNTOOLS :=$(xVS100COMNTOOLS)
-    endif
-  endif
-  ifneq ($(fVS100COMNTOOLS),)
-    VS100COMNTOOLS :=$(fVS100COMNTOOLS)/
-  endif
-  # Check to see that both exist
-  ifeq ($(WINDOWSSDKDIR),)
-    _vs2010_message := No WINDOWSSDKDIR found on system. $(_vs2010_message)
-    VS2010_EXISTS   := false
-  endif
-  ifeq ($(VS100COMNTOOLS),)
-    _vs2010_message := No VS100COMNTOOLS found on system. $(_vs2010_message)
-    VS2010_EXISTS   := false
-  endif
-  ifeq ($(VS2010_EXISTS),false)
-    x:=$(warning WARNING: No VS2010 available. $(_vs2010_message))
-    VS100COMNTOOLS :=
-    WINDOWSSDKDIR  :=
-  else
-    VS2010_EXISTS := true
-    _msvc_dir     :=$(VS100COMNTOOLS)/../../Vc
-  endif
-  export VS2010_EXISTS
-  export VS100COMNTOOLS
-  export WINDOWSSDKDIR
-endif
-
-ifneq ($(VS2010_EXISTS),true)
-  x:=$(error ERROR: No VS2010 found on system.)
-endif 
-
-# VS2010 Compiler root directory
-_msvc_dir :=$(VS100COMNTOOLS)/../../Vc
-# SDK root directory
-_ms_sdk   :=$(WINDOWSSDKDIR)
-# Compiler bin directory and redist directory
-ifeq ($(ARCH_DATA_MODEL), 32)
-  _compiler_bin :=$(_msvc_dir)/Bin
-  _redist_sdk   :=$(call FullPath,$(_msvc_dir)/redist/x86/Microsoft.VC100.CRT)
-endif
-ifeq ($(ARCH_DATA_MODEL), 64)
-  _compiler_bin :=$(_msvc_dir)/bin/amd64
-  _redist_sdk   :=$(call FullPath,$(_msvc_dir)/redist/x64/Microsoft.VC100.CRT)
-endif
-ifeq ($(_redist_sdk),)
-  _redist_sdk   :=$(_system_root)/system32
-endif
-
-# Location on system where jdk installs might be
-ifneq ($(_program_files),)
-  USRJDKINSTANCES_PATH =$(_program_files)/Java
-else
-  USRJDKINSTANCES_PATH =$(_system_drive)/
-endif
-
-# SLASH_JAVA: location of all network accessable files
-# NOTE: Do not use FullPath on this because it's often a drive letter and
-#       plain drive letters are ambiguous, so just use this 'as is'.
-ifdef ALT_SLASH_JAVA
-  xALT_SLASH_JAVA :="$(subst \,/,$(ALT_SLASH_JAVA))"
-  SLASH_JAVA      :=$(xALT_SLASH_JAVA)
-else
-  ifdef ALT_JDK_JAVA_DRIVE
-    SLASH_JAVA  =$(JDK_JAVA_DRIVE)
-  else
-    SLASH_JAVA  =J:
-  endif
-endif
-#SLASH_JAVA:=$(call AltCheckSpaces,SLASH_JAVA)
-
-# JDK_DEVTOOLS_DIR: common path for all the java devtools
-ifdef ALT_JDK_DEVTOOLS_DIR
-  xALT_JDK_DEVTOOLS_DIR :="$(subst \,/,$(ALT_JDK_DEVTOOLS_DIR))"
-  JDK_DEVTOOLS_DIR      :=$(call FullPath,$(xALT_JDK_DEVTOOLS_DIR))
-else
-  JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
-endif
-JDK_DEVTOOLS_DIR:=$(call AltCheckSpaces,JDK_DEVTOOLS_DIR)
-
-# COMPILER_PATH: path to where the compiler and tools are installed.
-#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifdef ALT_COMPILER_PATH
-  xALT_COMPILER_PATH  :="$(subst \,/,$(ALT_COMPILER_PATH))"
-  fxALT_COMPILER_PATH :=$(call FullPath,$(xALT_COMPILER_PATH))
-  COMPILER_PATH       :=$(call PrefixPath,$(fxALT_COMPILER_PATH))
-else
-  COMPILER_PATH :=$(call PrefixPath,$(_compiler_bin))
-endif
-COMPILER_PATH :=$(call AltCheckSpaces,COMPILER_PATH)
-
-# MSDEVTOOLS_PATH: path to where the additional MS Compiler tools are.
-#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifdef ALT_MSDEVTOOLS_PATH
-  xALT_MSDEVTOOLS_PATH  :="$(subst \,/,$(ALT_MSDEVTOOLS_PATH))"
-  fxALT_MSDEVTOOLS_PATH :=$(call FullPath,$(xALT_MSDEVTOOLS_PATH))
-  MSDEVTOOLS_PATH       :=$(call PrefixPath,$(fxALT_MSDEVTOOLS_PATH))
-else
-  ifeq ($(ARCH_DATA_MODEL), 64)
-    ifdef MSTOOLS
-      xMSTOOLS  :="$(subst \,/,$(MSTOOLS))"
-      _ms_tools :=$(call FullPath,$(xMSTOOLS))
-    else
-      ifdef Mstools
-        xMSTOOLS  :="$(subst \,/,$(Mstools))"
-        _ms_tools :=$(call FullPath,$(xMSTOOLS))
-      else
-        _ms_tools :=
-      endif
-    endif
-    ifneq ($(_ms_tools),)
-      _ms_tools_bin :=$(_ms_tools)/Bin
-    else
-      # Assumes compiler bin is .../Bin/win64/x86/AMD64, rc.exe is 3 levels up
-      _ms_tools_bin :=$(_compiler_bin)/../../..
-    endif
-  else
-    _ms_tools_bin :=$(_compiler_bin)
-  endif
-  MSDEVTOOLS_PATH :=$(call PrefixPath,$(_ms_tools_bin))
-endif
-MSDEVTOOLS_PATH:=$(call AltCheckSpaces,MSDEVTOOLS_PATH)
-
-# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
-#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifdef ALT_DEVTOOLS_PATH
-  xALT_DEVTOOLS_PATH  :="$(subst \,/,$(ALT_DEVTOOLS_PATH))"
-  fxALT_DEVTOOLS_PATH :=$(call FullPath,$(xALT_DEVTOOLS_PATH))
-  DEVTOOLS_PATH       :=$(call PrefixPath,$(fxALT_DEVTOOLS_PATH))
-else
-  ifdef USING_CYGWIN
-    DEVTOOLS_PATH :=$(UNIXCOMMAND_PATH)
-  else
-    xDEVTOOLS_PATH  :="$(_system_drive)/utils"
-    fxDEVTOOLS_PATH :=$(call FullPath,$(xDEVTOOLS_PATH))
-    DEVTOOLS_PATH  :=$(call PrefixPath,$(fxDEVTOOLS_PATH))
-  endif
-endif
-DEVTOOLS_PATH:=$(call AltCheckSpaces,DEVTOOLS_PATH)
-
-# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
-# _BOOTDIR2: Second choice
-# The _BOOTDIR3 is defind optionally.
-ifndef ALT_BOOTDIR
-  _BOOTDIR1  =$(_system_drive)/jdk$(PREVIOUS_JDK_VERSION)
-  _BOOTDIR2  =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION)
-  _BOOTDIR3  =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
-endif
-
-# Everybody needs the MSVCRNN runtime starting with VS2010
-_NEEDS_MSVCRNN = true
-
-ifeq ($(_NEEDS_MSVCRNN), true)
-  # MSVCRNN_DLL_PATH: location of msvcrnn.dll that will be re-distributed
-  ifdef ALT_MSVCRNN_DLL_PATH
-    xALT_MSVCRNN_DLL_PATH :="$(subst \,/,$(ALT_MSVCRNN_DLL_PATH))"
-    MSVCRNN_DLL_PATH      :=$(call FullPath,$(xALT_MSVCRNN_DLL_PATH))
-  else
-    MSVCRNN_DLL_PATH :=$(_redist_sdk)
-  endif
-  MSVCRNN_DLL_PATH :=$(call AltCheckSpaces,MSVCRNN_DLL_PATH)
-endif
-
-# DXSDK_PATH: path to Microsoft DirectX SDK Include and Lib
-ifdef ALT_DXSDK_PATH
-  xALT_DXSDK_PATH :="$(subst \,/,$(ALT_DXSDK_PATH))"
-  DXSDK_PATH      :=$(call FullPath,$(xALT_DXSDK_PATH))
-else
-  _DXSDK_PATH1 :=$(_dx_sdk_dir)
-  _DXSDK_PATH2 :=$(JDK_DEVTOOLS_DIR)/windows/dxsdk
-  DXSDK_PATH  :=$(call DirExists,$(_DXSDK_PATH1),$(_DXSDK_PATH2),$(_dx_sdk_dir))
-endif
-DXSDK_PATH :=$(call AltCheckSpaces,DXSDK_PATH)
-
-# DXSDK_INCLUDE_PATH: path to Microsoft DirectX SDK Include
-ifdef ALT_DXSDK_INCLUDE_PATH
-  xALT_DXSDK_INCLUDE_PATH :="$(subst \,/,$(ALT_DXSDK_INCLUDE_PATH))"
-  DXSDK_INCLUDE_PATH      :=$(call FullPath,$(xALT_DXSDK_INCLUDE_PATH))
-else
-  DXSDK_INCLUDE_PATH =$(subst //,/,$(DXSDK_PATH)/Include)
-endif
-
-# DXSDK_LIB_PATH: path to Microsoft DirectX SDK Lib
-ifdef ALT_DXSDK_LIB_PATH
-  xALT_DXSDK_LIB_PATH :="$(subst \,/,$(ALT_DXSDK_LIB_PATH))"
-  DXSDK_LIB_PATH      :=$(call FullPath,$(xALT_DXSDK_LIB_PATH))
-else
-  ifeq ($(ARCH_DATA_MODEL), 64)
-    # 64bit libs are located in "Lib/x64" subdir
-    DXSDK_LIB_PATH =$(subst //,/,$(DXSDK_PATH)/Lib/x64)
-  else
-    DXSDK_LIB_PATH =$(subst //,/,$(DXSDK_PATH)/Lib)
-  endif
-endif
-
-# DEPLOY_MSSDK: Microsoft SDK for this platform (for deploy)
-ifdef ALT_DEPLOY_MSSDK
-  xALT_DEPLOY_MSSDK :="$(subst \,/,$(ALT_DEPLOY_MSSDK))"
-  DEPLOY_MSSDK      :=$(call FullPath,$(xALT_DEPLOY_MSSDK))
-else
-  DEPLOY_MSSDK      :=$(_ms_sdk)
-endif
-DEPLOY_MSSDK:=$(call AltCheckSpaces,DEPLOY_MSSDK)
-
-# INSTALL_MSSDK: Microsoft Installer SDK for this platform (for install)
-ifdef ALT_INSTALL_MSSDK
-  xALT_INSTALL_MSSDK :="$(subst \,/,$(ALT_INSTALL_MSSDK))"
-  INSTALL_MSSDK      :=$(call FullPath,$(xALT_INSTALL_MSSDK))
-else
-  INSTALL_MSSDK      :=$(_ms_sdk)
-endif
-INSTALL_MSSDK:=$(call AltCheckSpaces,INSTALL_MSSDK)
-
-# WSCRIPT: path to wscript.exe (used in creating install bundles)
-ifdef ALT_WSCRIPT
-  xALT_WSCRIPT :="$(subst \,/,$(ALT_WSCRIPT))"
-  WSCRIPT  =$(xALT_WSCRIPT)
-else
-  _WSCRIPT1 :=$(_system_root)/system32/wscript.exe
-  _WSCRIPT2 :=$(DEVTOOLS_PATH)wscript.exe
-  WSCRIPT  :=$(call FileExists,$(_WSCRIPT1),$(_WSCRIPT2))
-endif
-WSCRIPT:=$(call AltCheckSpaces,WSCRIPT)
-# batch mode no modal dialogs on errors, please.
-WSCRIPT += -B
-
-# CSCRIPT: path to cscript.exe (used in creating install bundles)
-ifdef ALT_CSCRIPT
-  xALT_CSCRIPT :="$(subst \,/,$(ALT_CSCRIPT))"
-  CSCRIPT  =$(xALT_CSCRIPT)
-else
-  _CSCRIPT1 :=$(_system_root)/system32/cscript.exe
-  _CSCRIPT2 :=$(DEVTOOLS_PATH)cscript.exe
-  CSCRIPT  :=$(call FileExists,$(_CSCRIPT1),$(_CSCRIPT2))
-endif
-CSCRIPT:=$(call AltCheckSpaces,CSCRIPT)
-
-# CABARC: path to cabarc.exe (used in creating install bundles)
-ifdef ALT_CABARC
-  xALT_CABARC :="$(subst \,/,$(ALT_CABARC))"
-  CABARC  =$(xALT_CABARC)
-else
-  _CABARC1 :=$(_system_root)/system32/cabarc.exe
-  _CABARC2 :=$(DEVTOOLS_PATH)cabarc.exe
-  CABARC  :=$(call FileExists,$(_CABARC1),$(_CABARC2))
-endif
-CABARC:=$(call AltCheckSpaces,CABARC)
-
-# MSICERT: path to msicert.exe (used in creating install bundles)
-ifdef ALT_MSICERT
-  xALT_MSICERT :="$(subst \,/,$(ALT_MSICERT))"
-  MSICERT  =$(xALT_MSICERT)
-else
-  _MSICERT1 :=$(INSTALL_MSSDK)/Bin/msicert.exe
-  _MSICERT2 :=$(DEVTOOLS_PATH)msicert.exe
-  MSICERT   :=$(call FileExists,$(_MSICERT1),$(_MSICERT2))
-endif
-MSICERT:=$(call AltCheckSpaces,MSICERT)
-
-# Import JDK images allow for partial builds, components not built are
-#    imported (or copied from) these import areas when needed.
-
-# BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for
-#   multiple platforms, e.g. windows-i586, solaris-sparc, linux-586, etc.
-ifdef ALT_BUILD_JDK_IMPORT_PATH
-  BUILD_JDK_IMPORT_PATH  :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
-else
-  BUILD_JDK_IMPORT_PATH   = $(PROMOTED_BUILD_BINARIES)
-endif
-BUILD_JDK_IMPORT_PATH:=$(call AltCheckSpaces,BUILD_JDK_IMPORT_PATH)
-
-# JDK_IMPORT_PATH: location of previously built JDK (this version) to import
-ifdef ALT_JDK_IMPORT_PATH
-  JDK_IMPORT_PATH  :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
-else
-  JDK_IMPORT_PATH   = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT)
-endif
-JDK_IMPORT_PATH:=$(call AltCheckSpaces,JDK_IMPORT_PATH)
-
-# HOTSPOT_CLIENT_PATH: location of client jvm library file.
-ifeq ($(ARCH_DATA_MODEL), 32)
-  ifdef ALT_HOTSPOT_CLIENT_PATH
-    HOTSPOT_CLIENT_PATH :=$(call FullPath,$(ALT_HOTSPOT_CLIENT_PATH))
-  else
-    HOTSPOT_CLIENT_PATH   =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/client
-  endif
-  HOTSPOT_CLIENT_PATH:=$(call AltCheckSpaces,HOTSPOT_CLIENT_PATH)
-endif
-
-# HOTSPOT_SERVER_PATH: location of server jvm library file.
-ifdef ALT_HOTSPOT_SERVER_PATH
-  HOTSPOT_SERVER_PATH :=$(call FullPath,$(ALT_HOTSPOT_SERVER_PATH))
-else
-  HOTSPOT_SERVER_PATH   =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/server
-endif
-HOTSPOT_SERVER_PATH:=$(call AltCheckSpaces,HOTSPOT_SERVER_PATH)
-
-# HOTSPOT_LIB_PATH: location of jvm.lib file.
-ifdef ALT_HOTSPOT_LIB_PATH
-  xALT_HOTSPOT_LIB_PATH :="$(subst \,/,$(ALT_HOTSPOT_LIB_PATH))"
-  HOTSPOT_LIB_PATH      :=$(call FullPath,$(xALT_HOTSPOT_LIB_PATH))
-else
-  HOTSPOT_LIB_PATH  =$(HOTSPOT_IMPORT_PATH)/lib
-endif
-HOTSPOT_LIB_PATH:=$(call AltCheckSpaces,HOTSPOT_LIB_PATH)
-
-# Special define for checking the binaries
-
-# All windows dll and exe files should have been built with /NXCOMPAT
-#   and be setup for dynamic base addresses.
-#   In addition, we should not be dependent on certain dll files that
-#   we do not or cannot redistribute.
-
-# List of filenames we should NOT be dependent on
-ifeq ($(MFC_DEBUG),true)
-  BANNED_DLLS=msvcp100[.]dll
-else
-  BANNED_DLLS=msvcp100[.]dll|msvcr100d[.]dll|msvcrtd[.]dll
-endif
-
-# Check for /safeseh (only used on 32bit)
-define binary_file_safeseh_verification # binary_file
-( \
-  $(ECHO) "Checking for /SAFESEH usage in: $1" && \
-  if [ "`$(DUMPBIN) /loadconfig $1 | $(EGREP) -i 'Safe Exception Handler Table'`" = "" ] ; then \
-    $(ECHO) "ERROR: Did not find 'Safe Exception Handler Table' in loadconfig: $1" ; \
-    $(DUMPBIN) /loadconfig $1 ; \
-    exit 6 ; \
-  fi ; \
-)
-endef
-
-# Check for /NXCOMPAT usage
-define binary_file_nxcompat_verification # binary_file
-( \
-  $(ECHO) "Checking for /NXCOMPAT usage in: $1" && \
-  if [ "`$(DUMPBIN) /headers $1 | $(EGREP) -i 'NX compatible'`" = "" ] ; then \
-    $(ECHO) "ERROR: Did not find 'NX compatible' in headers: $1" ; \
-    $(DUMPBIN) /headers $1 ; \
-    exit 7 ; \
-  fi ; \
-)
-endef
-
-# Check for /DYNAMICBASE usage
-define binary_file_dynamicbase_verification # binary_file
-( \
-  $(ECHO) "Checking for /DYNAMICBASE usage in: $1" && \
-  if [ "`$(DUMPBIN) /headers $1 | $(EGREP) -i 'Dynamic base'`" = "" ] ; then \
-    $(ECHO) "ERROR: Did not find 'Dynamic base' in headers: $1" ; \
-    $(DUMPBIN) /headers $1 ; \
-    exit 8 ; \
-  fi ; \
-)
-endef
-
-# Check for banned dll usage
-define binary_file_dll_verification # binary_file
-( \
-  $(ECHO) "Checking for banned dependencies in: $1" && \
-  if [ "`$(DUMPBIN) /dependents $1 | $(EGREP) -i '$(BANNED_DLLS)'`" != "" ] ; then \
-    $(ECHO) "ERROR: Found use of $(BANNED_DLLS)"; \
-    $(DUMPBIN) /dependents $1 ; \
-    exit 9 ; \
-  fi ; \
-)
-endef
-
-# Macro to check it's input file for properly built executables.
-#   Relies on process exit code. Different for 32bit vs 64bit.
-ifeq ($(ARCH_DATA_MODEL),32)
-define binary_file_verification # binary_file
-( \
-  $(call binary_file_safeseh_verification,$1); \
-  $(call binary_file_nxcompat_verification,$1); \
-  $(call binary_file_dynamicbase_verification,$1); \
-  $(call binary_file_dll_verification,$1); \
-)
-endef
-else
-define binary_file_verification # binary_file
-( \
-  $(call binary_file_nxcompat_verification,$1); \
-  $(call binary_file_dynamicbase_verification,$1); \
-  $(call binary_file_dll_verification,$1); \
-)
-endef
-endif
-
--- a/jdk/makefiles/common/shared/Defs.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,662 +0,0 @@
-#
-# Copyright (c) 2005, 2011, 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.
-#
-
-#
-# Definitions for all platforms.
-#
-# Normally the convention is that these alternate definitions of
-#   primary make variables are never defined inside the Makefiles anywhere
-#   but are defined via environment variables or set on the make command
-#   line. So you should never see an ALT_* variable defined in any
-#   makefiles, just used. This is the convention and there are some
-#   exceptions, either mistakes or unusual circumstances.
-#
-# The naming convention for the default value of one of these variables
-#   that has an ALT_* override capability is to name the default value with a
-#   leading underscore (_). So for XXX you would have:
-#      _XXX      default value
-#      ALT_XXX   any override the user is providing if any
-#      XXX       the final value, either the default _XXX or the ALT_XXX value.
-#
-
-# On Directory names. In very rare cases should the Windows directory
-#    names use the backslash, please use the C:/ style of windows paths.
-#    Avoid duplicating the // characters in paths, this has known to cause
-#    strange problems with jar and other utilities, e.g. /a//b/ != /a/b/.
-#    Some of these variables have an explicit trailing / character, but in
-#    general, they should NOT have the trailing / character.
-
--include $(SPEC)
--include $(VARS)
-
-# Assumes ARCH, PLATFORM, ARCH_VM_SUBDIR, JDK_TOPDIR, etc. have been defined.
-
-# Simple pwd path
-# NOTE: Just use the shell's cd and pwd here, more reliable at sanity time.
-define PwdPath
-$(shell cd $1 2> $(DEV_NULL) && pwd)
-endef
-define AbsPwdPathCheck
-$(shell cd .. 2> $(DEV_NULL) && cd $1 2> $(DEV_NULL) && pwd)
-endef
-
-# Checks an ALT value for spaces (should be one word), 
-#       warns and returns Check_ALT_$1 if spaces
-define AltCheckSpaces
-$(if $(word 2,$($1)),$(warning "WARNING: Value of $1 contains a space: '$($1)', check or set ALT_$1")Check_ALT_$1,$($1))
-endef
-
-# Checks an ALT value for empty, warns and returns Check_ALT_$1 if empty
-define AltCheckValue
-$(if $($1),$($1),$(warning "WARNING: Value of $1 cannot be empty, check or set ALT_$1")Check_ALT_$1)
-endef
-
-# Checks any value for empty, warns and returns $2 if empty
-define CheckValue
-$(if $($1),$($1),$(warning "WARNING: Value of $1 cannot be empty, will use '$2'")$2)
-endef
-
-# Prefix for a utility prefix path, if empty leave alone, otherwise end with a /
-define PrefixPath
-$(if $1,$(subst //,/,$1/),)
-endef
-
-# Select a directory if it exists, or the alternate 2 or the alternate 3
-define DirExists
-$(shell \
-  if [ -d "$1" ]; then  \
-    echo "$1"; \
-  elif [ -d "$2" ]; then \
-    echo "$2"; \
-  else \
-    echo "$3"; \
-  fi)
-endef
-
-# Select a directory if it exists, or the alternate 2, or the alternate 3, or the alternate 4
-define DirExists4
-$(shell \
-  if [ -d "$1" ]; then  \
-    echo "$1"; \
-  elif [ -d "$2" ]; then \
-    echo "$2"; \
-  elif [ -d "$3" ]; then \
-    echo "$3"; \
-  else \
-    echo "$4"; \
-  fi)
-endef
-
-
-# Select a writable directory if it exists and is writable, or the alternate
-define WriteDirExists
-$(shell \
-  if [ -d "$1" -a -w "$1" ]; then  \
-    echo "$1"; \
-  else \
-    echo "$2"; \
-  fi)
-endef
-
-# Select a file if it exists, or the alternate 1, or the alternate 2
-define FileExists
-$(shell \
-  if [ -r "$1" ]; then \
-    echo "$1"; \
-  elif [ -r "$2" ]; then \
-    echo "$2"; \
-  else \
-    echo "NO_FILE_EXISTS"; \
-  fi)
-endef
-
-# Given a line of text, get the version number from it
-define GetVersion
-$(shell echo $1 | sed -e 's@[^0-9]*\([0-9][0-9]*\.[0-9][.0-9]*\).*@\1@' )
-endef
-
-# Return one part of the version numbers, watch out for non digits.
-define VersionWord # Number Version
-$(word $1,$(subst ., ,$(subst -, ,$2)))
-endef
-
-# Given a major.minor.micro version, return the major, minor, or micro number
-define MajorVersion
-$(if $(call VersionWord,1,$1),$(call VersionWord,1,$1),0)
-endef
-define MinorVersion
-$(if $(call VersionWord,2,$1),$(call VersionWord,2,$1),0)
-endef
-define MicroVersion
-$(if $(call VersionWord,3,$1),$(call VersionWord,3,$1),0)
-endef
-
-# Macro that returns missing, same, newer, or older $1=version $2=required
-define CheckVersions
-$(shell \
-  if [ "$1" = "" -o "$2" = "" ]; then \
-    echo missing; \
-  elif [ "$1" = "$2" ]; then \
-    echo same; \
-  elif [ $(call MajorVersion,$1) -lt $(call MajorVersion,$2) ] ; then \
-    echo older; \
-  elif [ $(call MajorVersion,$1) -gt $(call MajorVersion,$2) ] ; then \
-    echo newer; \
-  elif [ $(call MinorVersion,$1) -lt $(call MinorVersion,$2) ]; then \
-    echo older; \
-  elif [ $(call MinorVersion,$1) -gt $(call MinorVersion,$2) ]; then \
-    echo newer; \
-  elif [ $(call MicroVersion,$1) -lt $(call MicroVersion,$2) ]; then \
-    echo older; \
-  elif [ $(call MicroVersion,$1) -gt $(call MicroVersion,$2) ]; then \
-    echo newer; \
-  else \
-    echo same; \
-  fi)
-endef
-
-# Expand SRCDIR_LIST, which is used to automatically include various
-# platform and shared sources/headers.  This is mainly useful for the
-# Mac OS X build, which pulls its platform sources from the solaris and/or
-# macosx trees, depending on the component.
-ifeq ($(PLATFORM), macosx)
-  define JavaSrcDirList
-  $(JAVA_SRCDIR_LIST:%=$1$(JDK_TOPDIR)/%/$2)
-  endef
-  define NativeSrcDirList
-  $(NATIVE_SRCDIR_LIST:%=$1$(JDK_TOPDIR)/%/$2)
-  endef
-endif
-
-# Make sure certain variables are non-empty at this point
-_check_values:=\
-$(call CheckValue,ARCH,),\
-$(call CheckValue,ARCH_DATA_MODEL,),\
-$(call CheckValue,ARCH_VM_SUBDIR,),\
-$(call CheckValue,JDK_TOPDIR,),\
-$(call CheckValue,JDK_MAKE_SHARED_DIR,),\
-$(call CheckValue,VARIANT,),\
-$(call CheckValue,PLATFORM,)
-
-# Misc common settings for all workspaces
-#   This determines the version of the product, and the previous version or boot
-ifndef JDK_MAJOR_VERSION
-  JDK_MAJOR_VERSION      = 1
-  PREVIOUS_MAJOR_VERSION = 1
-endif
-
-ifndef JDK_MINOR_VERSION
-  JDK_MINOR_VERSION      = 8
-  PREVIOUS_MINOR_VERSION = 7
-endif
-
-ifndef JDK_MICRO_VERSION
-  JDK_MICRO_VERSION      = 0
-  PREVIOUS_MICRO_VERSION = 0
-endif
-
-ifndef MILESTONE
-  MILESTONE = internal
-endif
-
-# Default names
-ifdef OPENJDK
-  LAUNCHER_NAME = openjdk
-  PRODUCT_NAME = OpenJDK
-  PRODUCT_SUFFIX = Runtime Environment
-  JDK_RC_PLATFORM_NAME = Platform
-  COMPANY_NAME = N/A
-else
-  LAUNCHER_NAME = java
-  PRODUCT_NAME = Java(TM)
-  PRODUCT_SUFFIX = SE Runtime Environment
-  JDK_RC_PLATFORM_NAME = Platform SE
-  COMPANY_NAME = Oracle Corporation
-endif
-
-RUNTIME_NAME = $(PRODUCT_NAME) $(PRODUCT_SUFFIX)
-
-ifndef BUILD_NUMBER
-  JDK_BUILD_NUMBER = b00
-else
-  ifndef JDK_BUILD_NUMBER
-    JDK_BUILD_NUMBER = $(BUILD_NUMBER)
-  endif
-endif
-
-# Default variant is the optimized version of everything
-#    can be OPT or DBG,  default is OPT
-#    Determine the extra pattern to add to the release name for debug/fastdebug.
-#    Determine the JDK_IMPORT_VARIANT, so we get the right VM files copied over.
-#    Determine suffix for obj directory or OBJDIR, for .o files.
-#    (by keeping .o files separate, just .o files, they don't clobber each
-#     other, however, the library files will clobber each other).
-#
-ifeq ($(VARIANT), DBG)
-  BUILD_VARIANT_RELEASE=-debug
-  OBJDIRNAME_SUFFIX=_g
-else
-  BUILD_VARIANT_RELEASE=
-  OBJDIRNAME_SUFFIX=
-endif
-ifeq ($(FASTDEBUG), true)
-  VARIANT=DBG
-  BUILD_VARIANT_RELEASE=-fastdebug
-  OBJDIRNAME_SUFFIX=_gO
-  _JDK_IMPORT_VARIANT=/fastdebug
-endif
-
-# Depending on the flavor of the build, add a -debug or -fastdebug to the name
-ifdef DEBUG_NAME
-  BUILD_VARIANT_RELEASE=-$(DEBUG_NAME)
-endif
-
-# These default values are redefined during a release build.
-#    CTE can set JDK_UPDATE_VERSION during the update release
-ifdef JDK_UPDATE_VERSION
-  JDK_VERSION  = $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)_$(JDK_UPDATE_VERSION)
-  MARKETING_NUMBER := $(shell \
-	$(ECHO) $(JDK_UPDATE_VERSION) | $(NAWK) '{if (substr($$0,1,1)=="0") print substr($$0, 2); else print $$0;}')
-  MARKET_NAME= $(shell $(ECHO) " Update $(MARKETING_NUMBER)")
-  JDK_MKTG_VERSION  = $(JDK_MINOR_VERSION)u$(MARKETING_NUMBER)
-else
-  JDK_VERSION  = $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
-  JDK_MKTG_VERSION  = $(JDK_MINOR_VERSION)
-  MARKET_NAME=
-endif
-JDK_UNDERSCORE_VERSION =  $(subst .,_,$(JDK_VERSION))
-JDK_MKTG_UNDERSCORE_VERSION =  $(subst .,_,$(JDK_MKTG_VERSION))
-
-# RELEASE is JDK_VERSION and -MILESTONE if MILESTONE is set
-ifneq ($(MILESTONE),fcs)
-  RELEASE      = $(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE)
-else
-  RELEASE      = $(JDK_VERSION)$(BUILD_VARIANT_RELEASE)
-endif
-
-# FULL_VERSION is RELEASE and -BUILD_NUMBER if BUILD_NUMBER is set
-ifdef BUILD_NUMBER
-  FULL_VERSION = $(RELEASE)-$(BUILD_NUMBER)
-else
-  BUILD_NUMBER = b00
-  ifndef USER_RELEASE_SUFFIX
-    BUILD_DATE := $(shell $(DATE) '+%Y_%m_%d_%H_%M')
-    # Avoid [:alnum:] since it depends on the locale.
-    CLEAN_USERNAME := $(shell $(ECHO) "$(USER)" | $(TR) -d -c 'abcdefghijklmnopqrstuvqxyz0123456789')
-    USER_RELEASE_SUFFIX := $(shell $(ECHO) "$(CLEAN_USERNAME)_$(BUILD_DATE)" | $(TR) 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz')
-  endif
-  export USER_RELEASE_SUFFIX
-  FULL_VERSION = $(RELEASE)-$(USER_RELEASE_SUFFIX)-$(BUILD_NUMBER)
-endif
-
-# Promoted build location
-PROMOTED_RE_AREA = $(SLASH_JAVA)/re/jdk/$(JDK_VERSION)/promoted
-PROMOTED_BUILD_LATEST = latest
-PROMOTED_BUILD_BASEDIR = $(PROMOTED_RE_AREA)/$(PROMOTED_BUILD_LATEST)
-PROMOTED_BUILD_DISTDIR = $(PROMOTED_BUILD_BASEDIR)/dist/$(PLATFORM)-$(ARCH)
-PROMOTED_BUILD_BINARIES = $(PROMOTED_BUILD_BASEDIR)/binaries
-
-# PARALLEL_COMPILE_JOBS: is the number of compiles done in parallel.
-#  If the user sets ALT_PARALLEL_COMPILE_JOBS, then COMPILE_APPROACH is set
-#  to parallel.
-#
-#  Recommended setting: 2 seems to be ideal for single cpu machines,
-#                       2 times the number of CPU's is a basic formula, 
-#                       but probably not more than 4 if the machine is 
-#                       being shared by others, or the machine is limited 
-#                       in RAM or swap.
-#
-ifdef ALT_PARALLEL_COMPILE_JOBS
-  PARALLEL_COMPILE_JOBS=$(ALT_PARALLEL_COMPILE_JOBS)
-else
-  PARALLEL_COMPILE_JOBS=2
-endif
-
-# Previous JDK release (version of BOOTDIR version)
-ifdef ALT_PREVIOUS_JDK_VERSION
-  PREVIOUS_JDK_VERSION = $(ALT_PREVIOUS_JDK_VERSION)
-else
-  PREVIOUS_JDK_VERSION  = $(PREVIOUS_MAJOR_VERSION).$(PREVIOUS_MINOR_VERSION).$(PREVIOUS_MICRO_VERSION)
-endif
-export PREVIOUS_JDK_VERSION
-PREVIOUS_JDK_VERSION:=$(call AltCheckSpaces,PREVIOUS_JDK_VERSION)
-
-# Version with _ instead of . in number
-ifeq ($(PREVIOUS_MINOR_VERSION),5)
-  PREVIOUS_JDK_UNDERSCORE_VERSION =  $(subst .,_,$(PREVIOUS_JDK_VERSION))
-else
-  PREVIOUS_JDK_UNDERSCORE_VERSION = $(PREVIOUS_MINOR_VERSION)
-endif
-
-# Include any private definitions for this set of workspaces
-_PRIVATE_DEFS_FILE=$(JDK_MAKE_SHARED_DIR)/PrivateDefs.gmk
-ifeq ($(USING_PRIVATE_DEFS),)
-  USING_PRIVATE_DEFS:=$(shell if [ -f $(_PRIVATE_DEFS_FILE) ]; then echo true; else echo false; fi)
-endif
-ifeq ($(USING_PRIVATE_DEFS),true)
-dummy:=$(warning "WARNING: Using definitions from $(_PRIVATE_DEFS_FILE)")
-include $(_PRIVATE_DEFS_FILE)
-endif
-
-# OUTPUTDIR: Location of all output for the build
-ifdef ALT_OUTPUTDIR
-  OUTPUTDIR:=$(subst \,/,$(ALT_OUTPUTDIR))
-  # Assumes this is absolute (checks later)
-  ABS_OUTPUTDIR:=$(OUTPUTDIR)
-else
-  ifndef _OUTPUTDIR
-    # Default:  Get "build" parent directory, which should always exist
-    ifndef BUILD_PARENT_DIRECTORY
-      BUILD_PARENT_DIRECTORY=$(BUILDDIR)/..
-    endif
-    ifdef OPENJDK
-      _OUTPUTDIRNAME=$(PLATFORM)-$(ARCH)$(OPENJDK_SUFFIX)
-    else
-      _OUTPUTDIRNAME=$(PLATFORM)-$(ARCH)
-    endif
-    _OUTPUTDIR=$(BUILD_PARENT_DIRECTORY)/build/$(_OUTPUTDIRNAME)
-  endif
-  OUTPUTDIR:=$(_OUTPUTDIR)
-endif
-# Check for spaces and null value
-OUTPUTDIR:=$(call AltCheckSpaces,OUTPUTDIR)
-
-# Get platform specific settings
-# NB: OUTPUTDIR must be defined. Otherwise hotspot import detection will not work correctly
-# On other hand this must be included early as it provides platform specific defines such as FullPath
-include $(JDK_MAKE_SHARED_DIR)/Defs-versions.gmk
-
-# Get platform specific settings (defines COMPILER_PATH)
-include $(JDK_MAKE_SHARED_DIR)/Defs-$(PLATFORM).gmk
-
-# Components
-ifdef ALT_LANGTOOLS_DIST
-  LANGTOOLS_DIST :=$(call FullPath,$(ALT_LANGTOOLS_DIST))
-else
-  LANGTOOLS_DIST =
-endif
-ifdef ALT_CORBA_DIST
-  CORBA_DIST :=$(call FullPath,$(ALT_CORBA_DIST))
-else
-  CORBA_DIST =
-endif
-ifdef ALT_JAXP_DIST
-  JAXP_DIST :=$(call FullPath,$(ALT_JAXP_DIST))
-else
-  JAXP_DIST =
-endif
-ifdef ALT_JAXWS_DIST
-  JAXWS_DIST :=$(call FullPath,$(ALT_JAXWS_DIST))
-else
-  JAXWS_DIST =
-endif
-
-# HOTSPOT_DOCS_IMPORT_PATH: Path to hotspot docs files to import into the docs generation
-ifdef ALT_HOTSPOT_DOCS_IMPORT_PATH
-  HOTSPOT_DOCS_IMPORT_PATH :=$(call FullPath,$(ALT_HOTSPOT_DOCS_IMPORT_PATH))
-else
-  HOTSPOT_DOCS_IMPORT_PATH :=$(call DirExists,$(HOTSPOT_IMPORT_PATH)/docs,$(PROMOTED_BUILD_BASEDIR)/docs,/NO_DOCS_DIR)
-endif
-
-# These are the same on all platforms but require the above platform include 1st
-
-# BOOTDIR: Bootstrap JDK, previous released JDK.
-#   _BOOTDIR1 and _BOOTDIR2 picked by platform
-#   Platform may optionally define _BOOTDIR3 as well.
-ifdef ALT_BOOTDIR
-  BOOTDIR =$(ALT_BOOTDIR)
-else
-  ifdef _BOOTDIR3
-    BOOTDIR  :=$(call DirExists4,$(_BOOTDIR1),$(_BOOTDIR2),$(_BOOTDIR3),/NO_BOOTDIR)
-  else
-    BOOTDIR  :=$(call DirExists,$(_BOOTDIR1),$(_BOOTDIR2),/NO_BOOTDIR)
-  endif
-endif
-export BOOTDIR
-BOOTDIR:=$(call AltCheckSpaces,BOOTDIR)
-
-# PREVIOUS_FCS_RE_AREA: re path to where previous release binaries/bundles are
-PREVIOUS_FCS_RE_AREA = $(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs
-
-# PREVIOUS_RELEASE_IMAGE: Previous install image to compare against
-ifdef ALT_PREVIOUS_RELEASE_IMAGE
-  
-  # Explicit image provided, no bundle access needed
-  PREVIOUS_RELEASE_IMAGE :=$(call FullPath,$(ALT_PREVIOUS_RELEASE_IMAGE))
-
-else
-  
-  # PREVIOUS_RELEASE_PATH: path to where previous release bundles are
-  ifdef ALT_PREVIOUS_RELEASE_PATH
-    PREVIOUS_RELEASE_PATH :=$(call OptFullPath,$(ALT_PREVIOUS_RELEASE_PATH))
-  else
-    PREVIOUS_RELEASE_PATH := \
-	$(call DirExists,$(PREVIOUS_FCS_RE_AREA)/bundles/$(PLATFORM)-$(ARCH),,)
-  endif
-
-  # Depending on if we have access to these bundles
-  ifeq ($(PREVIOUS_RELEASE_PATH),)
-    # Use images in re area or BOOTDIR (which is normally the previous release)
-    PREVIOUS_RELEASE_IMAGE := \
-         $(call DirExists,$(PREVIOUS_FCS_RE_AREA)/binaries/$(PLATFORM)-$(ARCH),$(BOOTDIR),)
-  else
-    # Get names of and paths to bundles
-    PREVIOUS_RELEASE_PATH:=$(call AltCheckSpaces,PREVIOUS_RELEASE_PATH)
-    export PREVIOUS_RELEASE_PATH
-  
-    # PREVIOUS_JDK_FILE: filename of install bundle for previous JDK
-    ifdef ALT_PREVIOUS_JDK_FILE
-      PREVIOUS_JDK_FILE  =$(ALT_PREVIOUS_JDK_FILE)
-    else
-      PREVIOUS_JDK_FILE = \
-	  jdk-$(PREVIOUS_JDK_UNDERSCORE_VERSION)-$(PLATFORM)-$(ARCH)$(BUNDLE_FILE_SUFFIX)
-    endif
-    export PREVIOUS_JDK_FILE
-    PREVIOUS_JDK_FILE:=$(call AltCheckSpaces,PREVIOUS_JDK_FILE)
-
-    # PREVIOUS_JRE_FILE: filename of install bundle for previous JRE
-    ifdef ALT_PREVIOUS_JRE_FILE
-      PREVIOUS_JRE_FILE  =$(ALT_PREVIOUS_JRE_FILE)
-    else
-      PREVIOUS_JRE_FILE = \
-	  jre-$(PREVIOUS_JDK_UNDERSCORE_VERSION)-$(PLATFORM)-$(ARCH)$(BUNDLE_FILE_SUFFIX)
-    endif
-    export PREVIOUS_JRE_FILE
-    PREVIOUS_JRE_FILE:=$(call AltCheckSpaces,PREVIOUS_JRE_FILE)
-   
-    # Paths to these bundles
-    PREVIOUS_JRE_BUNDLE = $(PREVIOUS_RELEASE_PATH)/$(PREVIOUS_JRE_FILE)
-    PREVIOUS_JDK_BUNDLE = $(PREVIOUS_RELEASE_PATH)/$(PREVIOUS_JDK_FILE)
-  endif
-
-endif
-
-# Indicate we are using an image comparison
-ifneq ($(PREVIOUS_RELEASE_IMAGE),)
-    PREVIOUS_RELEASE_PATH = USING-PREVIOUS_RELEASE_IMAGE
-    PREVIOUS_JRE_BUNDLE   = USING-PREVIOUS_RELEASE_IMAGE
-    PREVIOUS_JDK_BUNDLE   = USING-PREVIOUS_RELEASE_IMAGE
-endif
-
-# CACERTS_FILE: if OPENJDK is false and the internal version of the file 
-#		(that is, non-empty) is available, use it, otherwise use an 
-#		empty keystore.
-#
-# We put this variable here for sanity checks and in case another
-# components will need to know which cacerts file is being used.
-#
-ifdef ALT_CACERTS_FILE
-  CACERTS_FILE = $(ALT_CACERTS_FILE)
-else
-  CACERTS_EXT   = $(SHARE_SRC)/lib/security/cacerts
-  ifdef OPENJDK
-    CACERTS_FILE  :=$(CACERTS_EXT)
-  else # (!OPENJDK)
-    CACERTS_INT   = $(CLOSED_SHARE_SRC)/lib/security/cacerts.internal
-    CACERTS_FILE  :=$(call FileExists,$(CACERTS_INT),$(CACERTS_EXT))
-  endif # (OPENJDK)
-endif
-CACERTS_FILE:=$(call AltCheckSpaces,CACERTS_FILE)
-
-#
-# When signing the JCE framework and provider, we could be using built
-# bits on a read-only filesystem.  If so, this test will fail and crash
-# the build.
-#
-ifndef IGNORE_WRITABLE_OUTPUTDIR_TEST
-# Create the output directory and make sure it exists and is writable
-_create_outputdir:=$(shell $(MKDIR) -p "$(OUTPUTDIR)" > $(DEV_NULL) 2>&1)
-ifeq ($(call WriteDirExists,$(OUTPUTDIR),/dev/null),/dev/null)
-  _outputdir_error:=$(error "ERROR: OUTPUTDIR '$(OUTPUTDIR)' not created or not writable")
-endif
-endif
-
-# Define absolute path if needed and check for spaces and null value
-ifndef ABS_OUTPUTDIR
-  ifdef _OUTPUTDIRNAME
-    #Could not define this at the same time as _OUTPUTDIRNAME as FullPath is not defined at that point
-    ABS_BUILD_PARENT_DIRECTORY:=$(call FullPath,$(BUILD_PARENT_DIRECTORY))
-    ABS_OUTPUTDIR:=$(ABS_BUILD_PARENT_DIRECTORY)/build/$(_OUTPUTDIRNAME)
-  else
-    ABS_OUTPUTDIR:=$(call FullPath,$(OUTPUTDIR))
-  endif
-endif
-ABS_OUTPUTDIR:=$(call AltCheckSpaces,ABS_OUTPUTDIR)
-# Make doubly sure this is a full path
-ifeq ($(call AbsPwdPathCheck,$(ABS_OUTPUTDIR)), )
-  ifdef ALT_OUTPUTDIR
-    _outputdir_error:=$(error "ERROR: Trouble with the absolute path for OUTPUTDIR '$(OUTPUTDIR)', was ALT_OUTPUTDIR '$(ALT_OUTPUTDIR)' an absolute path?")
-  else
-    _outputdir_error:=$(error "ERROR: Trouble with the absolute path for OUTPUTDIR '$(OUTPUTDIR)'")
-  endif
-endif
-_dir1:=$(call FullPath,$(ABS_OUTPUTDIR))
-_dir2:=$(call FullPath,$(OUTPUTDIR))
-ifneq ($(_dir1),$(_dir2))
-  _outputdir_error:=$(error "ERROR: ABS_OUTPUTDIR '$(ABS_OUTPUTDIR)' is not the same directory as OUTPUTDIR '$(OUTPUTDIR)', '$(_dir1)'!='$(_dir2)'")
-endif
-
-# Bin directory
-#   NOTE: ISA_DIR is usually empty, on Solaris it might be /sparcv9 or /amd64
-BINDIR      = $(OUTPUTDIR)/bin$(ISA_DIR)
-
-# MOZILLA_HEADERS_PATH: path to mozilla header files for plugin
-ifdef ALT_MOZILLA_HEADERS_PATH
-  MOZILLA_HEADERS_PATH :=$(call FullPath,$(ALT_MOZILLA_HEADERS_PATH))
-else
-  MOZILLA_HEADERS_PATH  =$(JDK_DEVTOOLS_DIR)/share/plugin
-endif
-MOZILLA_HEADERS_PATH:=$(call AltCheckSpaces,MOZILLA_HEADERS_PATH)
-
-# CUPS_HEADERS_PATH: path to Cups headers files for Unix printing
-#ifneq ($(PLATFORM), windows)
-#JDK_CUPS_HEADERS_PATH=$(JDK_DEVTOOLS_DIR)/share/cups/include
-#  ifdef ALT_CUPS_HEADERS_PATH
-#     CUPS_HEADERS_PATH:=$(call FullPath,$(ALT_CUPS_HEADERS_PATH))
-#     CUPS_HEADERS_PATH:=$(call AltCheckValue,CUPS_HEADERS_PATH)
-#  else 
-#    CUPS_HEADERS_PATH:= \
-#      $(shell if [ -d "$(JDK_CUPS_HEADERS_PATH)" ]; then \
-#        echo "$(JDK_CUPS_HEADERS_PATH)"; \
-#      else \
-#         echo "$(_CUPS_HEADERS_PATH)";\
-#      fi)
-#  endif
-#endif
-
-# Utilities ant
-ifeq ($(PLATFORM), windows)
-  ifeq ($(ANT_HOME),)
-    ANT_HOME := $(call DirExists,$(JDK_DEVTOOLS_DIR)/share/ant/latest,,)
-  endif
-endif
-
-# There are few problems with ant we need to workaround:
-#  1) ant is using temporary directory java.io.tmpdir
-#     However, this directory is not unique enough and two separate ant processes
-#     can easily end up using the exact same temp directory. This may lead to weird build failures
-#     To workaround this we will define tmp dir explicitly
-#  2) ant attempts to detect JDK location based on java.exe location
-#     This is fragile as developer may have JRE first on the PATH. 
-#     To workaround this we will specify JAVA_HOME explicitly
-
-ANT_TMPDIR = $(ABS_OUTPUTDIR)/tmp
-ANT_WORKAROUNDS = ANT_OPTS=-Djava.io.tmpdir='$(ANT_TMPDIR)' JAVA_HOME='$(BOOTDIR)'
-
-ifeq ($(ANT_HOME),)
-  ANT = $(ANT_WORKAROUNDS) ant
-else
-  ANT = $(ANT_WORKAROUNDS) $(ANT_HOME)/bin/ant
-endif
-
-ifdef ALT_COPYRIGHT_YEAR
-  COPYRIGHT_YEAR = $(ALT_COPYRIGHT_YEAR)
-else
-  COPYRIGHT_YEAR = $(shell $(DATE) '+%Y')
-endif
-
-# Create file with source information
-SOURCE_TIPS=$(ABS_OUTPUTDIR)/source_tips
-
-# The source tips can come from the Mercurial repository, or in the files
-#   $(HGTIP_FILENAME) which contains the tip but is also positioned in the same
-#   directory as the original $(HGDIR) directory.
-#   These should not be := assignments, only used from the root Makefile.
-HG_VERSION = $(shell $(HG) version 2> $(DEV_NULL))
-HG_DIRECTORY=.hg
-HGTIP_FILENAME=.hgtip
-HG_SEARCH = ./REPO ./*/REPO ./*/*/REPO ./*/*/*/REPO
-REPO_LIST = $(patsubst ./%,%,$(patsubst %/,%,$(sort $(dir \
-    $(shell ( $(LS) -d $(HG_SEARCH:%/REPO=%/$(HG_DIRECTORY)) ; \
-              $(LS)    $(HG_SEARCH:%/REPO=%/$(HGTIP_FILENAME)) ) \
-	        2> $(DEV_NULL))))))
-
-# Emit the repo:tip pairs to $@
-define GetSourceTips
-for i in $(REPO_LIST) IGNORE ; do \
-  if [ "$${i}" = "IGNORE" ] ; then \
-    continue; \
-  elif [ -d $${i}/$(HG_DIRECTORY) -a "$(HG_VERSION)" != "" ] ; then \
-    $(PRINTF) " %s:%s" \
-      "$${i}" `$(HG) tip --repository $${i} --template '{node|short}\n'` ; \
-  elif [ -f $${i}/$(HGTIP_FILENAME) ] ; then \
-    $(PRINTF) " %s:%s" \
-      "$${i}" `$(CAT) $${i}/$(HGTIP_FILENAME)` ; \
-  fi; \
-done >> $@
-$(PRINTF) "\n" >> $@
-endef
-
-# Create the HGTIP_FILENAME file
-define CreateHgTip
-$(HG) tip --repository $1 --template '{node|short}\n' > $1/$(HGTIP_FILENAME);\
-$(ECHO) $1/$(HGTIP_FILENAME)
-endef
-
-# Get the compiler specific settings (will run the compiler to find out)
-#   NOTE: COMPILER_PATH must be set by this time.
-#   Up until we include this file, we don't know what specific compiler
-#   version is actually being used (i.e. what is in PATH or COMPILER_PATH).
-include $(JDK_MAKE_SHARED_DIR)/Compiler-$(CC_VERSION).gmk
--- a/jdk/makefiles/common/shared/Platform.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,526 +0,0 @@
-#
-# Copyright (c) 1997, 2011, 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.
-#
-
-#
-# Shared platform (OS/ARCH) variable settings for the JDK builds.
-#
-# Includes basic system requirements, versions of utilities required,
-#   suffixes on files, and basic defaults attributed to the build platform.
-#
-
-#
-# Assumes some basic unix system utilities (e.g. uname) are in the search path
-#   in order to figure out the system.
-#
-
-ifndef PLATFORM_SHARED
-
-PLATFORM_SHARED=done
-
-# Possible Input variables:
-#     ARCH_DATA_MODEL             32 or 64, default to 32
-#     USER, LOGNAME               user name (runs logname, or id if not set)
-#     PROCESSOR_IDENTIFIER        windows only: needed in environment
-#
-# (Also gets input by running the utilities uname, logname, isainfo, or id.)
-#
-# Variables set by this file:
-#     SYSTEM_UNAME                what 'uname' says this system is
-#     USER                        login name of user (minus blanks)
-#     PLATFORM                    windows, solaris, or linux
-#     VARIANT                     OPT or DBG, OPT is the default
-#     TEMP_DISK                   /tmp or C:/temp
-#     ARCH_DATA_MODEL             32 or 64
-#     ARCH                        sparc, sparcv9, i586, amd64, or ia64
-#     ARCH_FAMILY                 sparc or i586
-#     ARCHPROP                    sparc or x86
-#     ARCH_VM_SUBDIR              jre/bin, jre/lib/sparc, etc.
-#     LIBARCH                     sparc, sparcv9, i386, amd64, or ia64
-#     DEV_NULL                    destination of /dev/null, NUL or /dev/NULL
-#     CLASSPATH_SEPARATOR         separator in classpath, ; or :
-#     LIB_PREFIX                  dynamic or static library prefix, lib or empty
-#     LIB_SUFFIX                  static library file suffix, .lib or .a?
-#     LIBRARY_SUFFIX              dynamic library file suffix, .dll or .so
-#     OBJECT_SUFFIX               object file suffix, .o or .obj
-#     EXE_SUFFIX                  executable file suffix, .exe or empty
-#     BUNDLE_FILE_SUFFIX          suffix for bundles: .tar or .tar.gz
-#     ISA_DIR                     solaris only: /sparcv9 or /amd64
-#     LIBARCH32                   solaris only: sparc or i386
-#     LIBARCH64                   solaris only: sparcv9 or amd64
-#     USING_CYGWIN                windows only: true or false
-#     ISHIELD_TEMP_MIN            windows only: minimum disk space in temp area
-
-# Only run uname once in this make session.
-ifndef SYSTEM_UNAME
-  SYSTEM_UNAME := $(shell uname)
-  export SYSTEM_UNAME
-endif
-
-#
-# Prune out all known SCM (Source Code Management) directories
-# so they will not be included when copying directory trees
-# or packaging up .jar files, etc.  This applies to all workspaces.
-#
-SCM_DIRs = .hg .svn CVS RCS SCCS Codemgr_wsdata deleted_files .hgignore .hgtags
-# When changing SCM_DIRs also change SCM_DIRS_rexp and SCM_DIRS_prune:
-SCM_DIRS_rexp = ".hg|.svn|CVS|RCS|SCCS|Codemgr_wsdata|deleted_files|.hgignore|.hgtags"
-SCM_DIRS_prune = \( -name .hg -o -name .svn -o -name CVS -o -name RCS -o -name SCCS -o -name Codemgr_wsdata -o -name deleted_files -o -name .hgignore -o -name .hgtags \) -prune
-
-# Don't define this unless it's not defined
-ifndef VARIANT
-  VARIANT=OPT
-endif
-
-# Platform settings specific to Solaris
-ifeq ($(SYSTEM_UNAME), SunOS)
-  PLATFORM = solaris
-  # Solaris sparc build can be either 32-bit or 64-bit.
-  #   Default to 32, but allow explicit setting to 32 or 64.
-  ifndef ARCH_DATA_MODEL
-    ARCH_DATA_MODEL=32
-  endif
-  ifeq ($(ARCH_DATA_MODEL), 32)
-    processor := $(shell uname -p)
-    archExpr = case "$(processor)" in  \
-                i[3-9]86) \
-                    echo i586 \
-                    ;; \
-                sparc*)  \
-                    echo sparc \
-                    ;; \
-                *) \
-                    echo $(processor)  \
-                    ;; \
-        esac
-    ARCH        := $(shell $(archExpr))
-  else
-    ARCH := $(shell isainfo -n)
-    # ISA_DIR is used to locate 64-bit specific libraries which are generally
-    # in the same general place as other libraries under the ./$(ARCH) directory
-    ISA_DIR = /$(ARCH)
-  endif
-  # Need to maintain the jre/lib/i386 location for 32-bit Intel
-  ifeq ($(ARCH), i586)
-     ARCH_FAMILY = $(ARCH)
-     LIBARCH     = i386
-     # Value of Java os.arch property
-     ARCHPROP    = x86
-  else
-     ifeq ($(ARCH), amd64)
-        ARCH_FAMILY = i586
-     else
-        ARCH_FAMILY = sparc
-     endif
-     LIBARCH  = $(ARCH)
-     # Value of Java os.arch property
-     ARCHPROP = $(LIBARCH)
-  endif
-  # The two LIBARCH names
-  ifeq ($(ARCH_FAMILY), sparc)
-    LIBARCH32 = sparc
-    LIBARCH64 = sparcv9
-  else
-    LIBARCH32 = i386
-    LIBARCH64 = amd64
-  endif
-  # Suffix for file bundles used in previous release
-  BUNDLE_FILE_SUFFIX=.tar
-  # How much RAM does this machine have (zones send an error to stderr):
-  MB_OF_MEMORY:=$(shell /usr/sbin/prtconf 2>/dev/null | fgrep 'Memory size:' | expand | cut -d' ' -f3)
-endif
-
-# Platform settings specific to Linux
-ifeq ($(SYSTEM_UNAME), Linux)
-  PLATFORM = linux
-  # Arch and OS name/version
-  ifdef CROSS_COMPILE_ARCH
-    mach := $(CROSS_COMPILE_ARCH)
-  else
-    mach := $(shell uname -m)
-  endif
-  archExpr = case "$(mach)" in \
-                i[3-9]86) \
-                    echo i586 \
-                    ;; \
-                ia64) \
-                    echo ia64 \
-                    ;; \
-                x86_64) \
-                    echo amd64 \
-                    ;; \
-                sparc*) \
-                    echo sparc \
-                    ;; \
-                arm*) \
-                    echo arm \
-                    ;; \
-                *) \
-                    echo $(mach) \
-                    ;; \
-      esac
-  ARCH        := $(shell $(archExpr) )
-  ARCH_FAMILY := $(ARCH)
-
-  # Linux builds may be 32-bit or 64-bit data model.
-  ifeq ($(ARCH), sparc)
-    # Linux sparc build can be either 32-bit or 64-bit.
-    #   Default to 32, but allow explicit setting to 32 or 64.
-    ifndef ARCH_DATA_MODEL
-      ARCH_DATA_MODEL=32
-    endif
-    ifeq ($(ARCH_DATA_MODEL), 32)
-      ARCH=sparc
-    else
-      ARCH=sparcv9
-    endif
-  else
-    # Most archs are 32-bit
-    ifndef ARCH_DATA_MODEL
-      ARCH_DATA_MODEL=32
-      ifeq ($(ARCH), amd64)
-        ARCH_DATA_MODEL=64
-      endif
-      ifeq ($(ARCH), ia64)
-        ARCH_DATA_MODEL=64
-      endif
-    endif
-  endif
-
-  # Need to maintain the jre/lib/i386 location for 32-bit Intel
-  ifeq ($(ARCH), i586)
-    LIBARCH = i386
-  else
-    LIBARCH = $(ARCH)
-  endif
-
-  # Value of Java os.arch property
-  ARCHPROP  = $(LIBARCH)
-
-  # Suffix for file bundles used in previous release
-  BUNDLE_FILE_SUFFIX=.tar.gz
-  # How much RAM does this machine have:
-  MB_OF_MEMORY := $(shell free -m | fgrep Mem: | awk '{print $$2;}' )
-endif
-
-ifeq ($(SYSTEM_UNAME), Darwin)
-  PLATFORM = macosx
-  OS_NAME = darwin
-  OS_VENDOR = Apple
-  GB_OF_MEMORY := $(shell system_profiler SPHardwareDataType | fgrep Memory: | awk '{print $$2}')
-  MB_OF_MEMORY := $(shell expr ${GB_OF_MEMORY} '*' 1024)
-endif
-
-# Platform settings specific to BSD/Mac OS X
-ifeq ($(PLATFORM), macosx)
-  OS_VERSION := $(shell uname -r)
-
-  # Arch and OS name/version
-  # Darwin x86 builds are i386/amd64 universal by default.
-  # Allow arch to be set from the environment to avoid this.
-  ifeq ($(origin ARCH), undefined)
-   ifeq ($(PLATFORM), macosx)
-#     ifdef OPENJDK -- when universal 32/64 binaries available in Hotspot
-#        mach := universal
-#     else
-        mach := x86_64
-#     endif
-   else
-    mach := $(shell uname -m)
-   endif
-  else
-   mach := $(ARCH)
-  endif
-
-  archExpr = case "$(mach)" in \
-                i[3-9]86) \
-                    echo i586 \
-                    ;; \
-                sparc64) \
-                    echo sparcv9 \
-                    ;; \
-                sparc*) \
-                    echo sparc \
-                    ;; \
-                x86_64) \
-                    echo amd64 \
-                    ;; \
-                universal) \
-                    echo universal \
-                    ;; \
-                "Power Macintosh") \
-                    echo ppc \
-                    ;; \
-                *) \
-                    echo $(mach) \
-                    ;; \
-      esac
-  ARCH        := $(shell $(archExpr) )
-  ARCH_FAMILY := $(ARCH)
-
-  # i586, sparc, and ppc are 32 bit, amd64 and sparc64 are 64
-  # ARCH_DATA_MODEL does not exactly mean anything in universal
-  # but it has to be one or the other, so pick 32
-  ifneq (,$(findstring $(ARCH), i586 sparc ppc universal))
-    ARCH_DATA_MODEL=32
-  else
-    ARCH_DATA_MODEL=64
-  endif
-
-  # Need to maintain the jre/lib/i386 location for 32-bit Intel
-  ifeq ($(ARCH), i586)
-    LIBARCH = i386
-  else
-    LIBARCH = $(ARCH)
-  endif
-
-  # Value of Java os.arch property
-  ARCHPROP  = $(LIBARCH)
-
-  # Suffix for file bundles used in previous release
-  BUNDLE_FILE_SUFFIX=.tar.gz
-  # How much RAM does this machine have:
-endif
-
-# Windows with and without CYGWIN will be slightly different
-ifeq ($(SYSTEM_UNAME), Windows_NT)
-  PLATFORM = windows
-endif
-ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME)))
-  PLATFORM = windows
-  USING_CYGWIN = true
-  export USING_CYGWIN
-  CYGPATH_CMD=cygpath -a -s -m
-  # Only run "cygpath /" once in this make session.
-  ifndef CYGWIN_HOME
-    CYGWIN_HOME := $(shell $(CYGPATH_CMD) /)
-    export CYGWIN_HOME
-  endif
-endif
-
-# Platform settings specific to Windows
-ifeq ($(PLATFORM), windows)
-  # Windows builds default to the appropriate for the underlaying
-  # architecture.
-  # Temporary disk area
-  TEMP_DISK=C:/temp
-  # GNU Make or MKS overrides $(PROCESSOR_ARCHITECTURE) to always
-  #  return "x86". Use the first word of $(PROCESSOR_IDENTIFIER) instead.
-  #  And sometimes PROCESSOR_IDENTIFIER is not defined at all
-  #  (in some restricted shells), so we use uname if we have to.
-  ifeq ($(PROCESSOR_IDENTIFIER),)
-    # Only run uname -m once in this make session.
-    ifndef SYSTEM_UNAME_M
-      SYSTEM_UNAME_M := $(shell uname -m)
-      export SYSTEM_UNAME_M
-    endif
-    PROC_ARCH:=$(SYSTEM_UNAME_M)
-  else
-    PROC_ARCH:=$(word 1, $(PROCESSOR_IDENTIFIER))
-  endif
-  # Cover all the possibilities, MKS uname, CYGWIN uname, PROCESSOR_IDENTIFIER
-  #    Get: X86, X64, or IA64
-  PROC_ARCH:=$(patsubst 386,X86,$(PROC_ARCH))
-  PROC_ARCH:=$(patsubst 486,X86,$(PROC_ARCH))
-  PROC_ARCH:=$(patsubst 586,X86,$(PROC_ARCH))
-  PROC_ARCH:=$(patsubst 686,X86,$(PROC_ARCH))
-  PROC_ARCH:=$(patsubst i386,X86,$(PROC_ARCH))
-  PROC_ARCH:=$(patsubst i486,X86,$(PROC_ARCH))
-  PROC_ARCH:=$(patsubst i586,X86,$(PROC_ARCH))
-  PROC_ARCH:=$(patsubst i686,X86,$(PROC_ARCH))
-  PROC_ARCH:=$(patsubst x86,X86,$(PROC_ARCH))
-  PROC_ARCH:=$(patsubst intel64,X64,$(PROC_ARCH))
-  PROC_ARCH:=$(patsubst Intel64,X64,$(PROC_ARCH))
-  PROC_ARCH:=$(patsubst INTEL64,X64,$(PROC_ARCH))
-  PROC_ARCH:=$(patsubst em64t,X64,$(PROC_ARCH))
-  PROC_ARCH:=$(patsubst EM64T,X64,$(PROC_ARCH))
-  PROC_ARCH:=$(patsubst amd64,X64,$(PROC_ARCH))
-  PROC_ARCH:=$(patsubst AMD64,X64,$(PROC_ARCH))
-  PROC_ARCH:=$(patsubst 8664,X64,$(PROC_ARCH))
-  PROC_ARCH:=$(patsubst x86_64,X64,$(PROC_ARCH))
-  PROC_ARCH:=$(patsubst ia64,IA64,$(PROC_ARCH))
-  ifndef ARCH_DATA_MODEL
-    ifeq ($(PROC_ARCH),IA64)
-      ARCH_DATA_MODEL=64
-    else
-      ifeq ($(PROC_ARCH),X64)
-        ARCH_DATA_MODEL=64
-      else
-        ARCH_DATA_MODEL=32
-      endif
-    endif
-  endif
-  export ARCH_DATA_MODEL
-  ifeq ($(ARCH_DATA_MODEL), 64)
-    # If the user wants to perform a cross compile build then they must
-    # - set ARCH_DATA_MODEL=64 and either
-    #      + set ARCH to ia64 or amd64, or
-    ifeq ($(PROC_ARCH),X64)
-      ARCH=amd64
-    else
-      ifeq ($(PROC_ARCH),IA64)
-        ARCH=ia64
-      endif
-    endif
-    LIBARCH=$(ARCH)
-    # Value of Java os.arch property
-    ARCHPROP=$(LIBARCH)
-  else
-    # LIBARCH is used to preserve the jre/lib/i386 directory name for 32-bit intel
-    ARCH=i586
-    LIBARCH=i386
-    # Value of Java os.arch property
-    ARCHPROP=x86
-  endif
-  ARCH_FAMILY = $(ARCH)
-  # Where is unwanted output to be delivered?
-  # MKS uses the special file "NUL", cygwin uses the customary unix file.
-  ifeq ($(USING_CYGWIN),true)
-    DEV_NULL = /dev/null
-  else
-    DEV_NULL = NUL
-  endif
-  export DEV_NULL
-  # Classpath separator
-  CLASSPATH_SEPARATOR = ;
-  # The suffix used for object file (.o for unix .obj for windows)
-  OBJECT_SUFFIX = obj
-  # The suffix applied to executables (.exe for windows, nothing for solaris)
-  EXE_SUFFIX = .exe
-  # The prefix applied to library files (lib for solaris, nothing for windows)
-  LIB_PREFIX=
-  LIBRARY_SUFFIX = dll
-  LIB_SUFFIX     = lib
-  # User name determination (set _USER)
-  ifndef USER
-    ifdef USERNAME
-      _USER := $(USERNAME)
-    else
-      ifdef LOGNAME
-        _USER := $(LOGNAME)
-      else
-        _USER := $(shell id -un)
-      endif
-    endif
-  else
-    _USER:=$(USER)
-  endif
-  # Location of client/server directories
-  ARCH_VM_SUBDIR=jre/bin
-  # Suffix for file bundles used in previous release
-  BUNDLE_FILE_SUFFIX=.tar
-  # ISHIELD_TEMP_MIN is the difference of an empty C:\TEMP vs. one after a
-  #     bundles build on windows.
-  ISHIELD_TEMP_MIN=250000
-  # How much RAM does this machine have:
-  ifeq ($(JDK_HAS_MEM_INFO),)
-    MB_OF_MEMORY := 1024
-  endif
-endif
-
-# Unix type settings (same for all unix platforms)
-ifneq ($(PLATFORM), windows)
-  # Temporary disk area
-  TEMP_DISK=/tmp
-  # Where is unwanted output to be delivered?
-  DEV_NULL = /dev/null
-  export DEV_NULL
-  # Character used between entries in classpath 
-  CLASSPATH_SEPARATOR = :
-  # suffix used for object file (.o for unix .obj for windows)
-  OBJECT_SUFFIX = o
-  # The suffix applied to runtime libraries
-  LIBRARY_SUFFIX = so
-  # The suffix applied to link libraries
-  LIB_SUFFIX = so
-  # The suffix applied to executables (.exe for windows, nothing for solaris)
-  EXE_SUFFIX =
-  # The prefix applied to library files (lib for solaris, nothing for windows)
-  LIB_PREFIX = lib
-  # User name determination (set _USER)
-  ifndef USER
-    ifdef LOGNAME
-      _USER := $(LOGNAME)
-    else
-      _USER := $(shell logname)
-    endif
-  else
-    _USER:=$(USER)
-  endif
-  # Location of client/server directories
-  ARCH_VM_SUBDIR=jre/lib/$(LIBARCH)
-endif
-
-# Darwin-specific Overrides
-ifeq ($(SYSTEM_UNAME),Darwin)
-  # The suffix applied to runtime libraries
-  LIBRARY_SUFFIX = dylib
-  # The suffix applied to link libraries
-  ifeq ($(ARCH), universal)
-    LIB_SUFFIX = o
-  else
-    LIB_SUFFIX = a
-  endif
-
-  ifeq ($(PLATFORM), macosx)
-  	ARCH_VM_SUBDIR=jre/lib/$(LIBARCH)
-  endif
-endif
-
-# Machines with 512Mb or less of real memory are considered low memory
-#    build machines and adjustments will be made to prevent excessing
-#    system swapping during the build.
-ifeq ($(JDK_HAS_MEM_INFO),)
-  JDK_HAS_MEM_INFO=true
-  export JDK_HAS_MEM_INFO
-  ifneq ($(MB_OF_MEMORY),)
-    LOW_MEMORY_MACHINE := $(shell \
-      if [ $(MB_OF_MEMORY) -le 512 ] ; then \
-        echo "true"; \
-      else \
-        echo "false"; \
-      fi)
-    MAX_VM_MEMORY := 512
-    MIN_VM_MEMORY := $(MAX_VM_MEMORY)
-  else
-    MB_OF_MEMORY       := unknown
-    LOW_MEMORY_MACHINE := true
-    MAX_VM_MEMORY      := 384
-    MIN_VM_MEMORY      := 128
-  endif
-  export MB_OF_MEMORY
-  export LOW_MEMORY_MACHINE
-  export MAX_VM_MEMORY
-  export MIN_VM_MEMORY
-endif
-
-# If blanks in the username, use the first 4 words and pack them together
-_USER1:=$(subst ', ,$(_USER))
-_USER2:=$(subst ", ,$(_USER1))
-USER:=$(word 1,$(_USER2))$(word 2,$(_USER2))$(word 3,$(_USER2))$(word 4,$(_USER2))
-export USER
-
-export PLATFORM
-endif
-
--- a/jdk/makefiles/common/shared/PrivateDefs.gmk-example	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-
-# This file, when re-named to PrivateDefs.gmk will get included in the
-#   makefile definitions (before the ALT_ variables are read) so that you can
-#   override makefile settings permanently for a workspace.
-#   Use of this file will cause WARNING errors, repeatedly, for a reason.
-#
-# WARNING: Use with caution.
-#
-
-# EXAMPLE: Testing a special build of hotspot
-#    (this is the build/solaris/export-solaris-sparc directory from doing
-#     a 'cd hotspot/make; gnumake' build)
-#
-ifeq ($(PLATFORM),solaris)
-  ifeq ($(ARCH),sparc)
-    ALT_HOTSPOT_IMPORT_PATH=$(JDK_TOPDIR)/../export-solaris-sparc
-  endif
-endif
-
--- a/jdk/makefiles/common/shared/Sanity-Settings.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,267 +0,0 @@
-#
-# Copyright (c) 2005, 2011, 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.
-#
-
-#
-# Shared sanity settings file. Fills in the variable ALL_SETTINGS.
-#
-
-# On Windows in particular, it can happen that quotes get into the PATH
-#    variable. This is very bad, and must be caught early or you can
-#    see errors like: sh: -c: line 0: syntax error near unexpected token
-#
-ifneq ($(PATH), $(subst ",,$(PATH)))
-  dummy1:=$(error ERROR: PATH variable contains double quotes, fix your PATH.)
-endif
-ifneq ($(PATH), $(subst ',,$(PATH)))
-  dummy1:=$(error ERROR: PATH variable contains single quotes, fix your PATH.)
-endif
-
-# Used to add a heading to ALL_SETTINGS
-define addHeading
-"\n$1:\n"
-endef
-
-# Used to add a line to ALL_SETTINGS for an optional value
-#   (need if test for windows which has issues with ; characters in values)
-define addOptionalSetting
-$(if $($1)," $1 = $($1)\n"," $1 = $($1)\n")
-endef
-
-# Used to add a line to ALL_SETTINGS for something that must have a value
-define addRequiredSetting
-$(if $($1)," $1 = $($1)\n",$(warning WARNING: $1 should not be empty [Sanity-Settings.gmk]))
-endef
-
-# Used to add a line to ALL_SETTINGS for something that must have a value
-define addRequiredVersionSetting
-$(if $($1)," $1 = $($1) [requires at least $(REQUIRED_$1)]\n",$(warning WARNING: $1 should not be empty [Sanity-Settings.gmk]))
-endef
-
-# Used to add a series of lines to ALL_SETTINGS
-define addAltSetting
-" $1 = $($1)\n    ALT_$1 = $(ALT_$1)\n"
-endef
-
-# Variable that contains a string of all information
-
-# Make sure this is a 'do it now' variable.
-ALL_SETTINGS:=$(call addHeading,Bootstrap Settings)
-ALL_SETTINGS+=$(call addAltSetting,BOOTDIR)
-ALL_SETTINGS+=$(call addRequiredVersionSetting,BOOT_VER)
-ALL_SETTINGS+=$(call addAltSetting,OUTPUTDIR)
-ALL_SETTINGS+=$(call addRequiredSetting,ABS_OUTPUTDIR)
-
-
-ALL_SETTINGS+=$(call addHeading,Build Tool Settings)
-ALL_SETTINGS+=$(call addAltSetting,SLASH_JAVA)
-ALL_SETTINGS+=$(call addRequiredSetting,VARIANT)
-ALL_SETTINGS+=$(call addAltSetting,JDK_DEVTOOLS_DIR)
-ALL_SETTINGS+=$(call addOptionalSetting,ANT_HOME)
-ALL_SETTINGS+=$(call addAltSetting,UNIXCOMMAND_PATH)
-ALL_SETTINGS+=$(call addAltSetting,COMPILER_PATH)
-ALL_SETTINGS+=$(call addAltSetting,DEVTOOLS_PATH)
-ifeq ($(PLATFORM),linux)
-  ALL_SETTINGS+=$(call addAltSetting,UNIXCCS_PATH)
-  ALL_SETTINGS+=$(call addAltSetting,USRBIN_PATH)
-  ifndef OPENJDK
-    ALL_SETTINGS+=$(call addAltSetting,GCC29_COMPILER_PATH)
-  endif
-endif
-ifeq ($(PLATFORM),solaris)
-  ALL_SETTINGS+=$(call addAltSetting,UNIXCCS_PATH)
-  ifndef OPENJDK
-    ALL_SETTINGS+=$(call addAltSetting,GCC_COMPILER_PATH)
-  endif
-endif
-ifeq ($(PLATFORM),windows)
-  ifneq ($(MSVCRNN_DLL),)
-    ALL_SETTINGS+=$(call addAltSetting,MSVCRNN_DLL_PATH)
-  endif
-  ALL_SETTINGS+=$(call addRequiredSetting,INCLUDE)
-  ALL_SETTINGS+=$(call addRequiredSetting,LIB)
-endif
-ALL_SETTINGS+=$(call addOptionalSetting,COMPILER_NAME)
-ALL_SETTINGS+=$(call addOptionalSetting,COMPILER_VERSION)
-ifdef REQUIRED_CC_VER
-  ALL_SETTINGS+=$(call addRequiredVersionSetting,CC_VER)
-else
-  ALL_SETTINGS+=$(call addOptionalSetting,CC_VER)
-endif
-ifeq ($(PLATFORM),solaris)
-  ifeq ($(ARCH_DATA_MODEL), 32)
-    ifndef OPENJDK
-      ALL_SETTINGS+=$(call addRequiredVersionSetting,GCC_VER)
-    endif
-  endif
-endif
-ALL_SETTINGS+=$(call addRequiredVersionSetting,ZIP_VER)
-ALL_SETTINGS+=$(call addRequiredVersionSetting,UNZIP_VER)
-ifeq ($(PLATFORM),windows)
-  ALL_SETTINGS+=$(call addRequiredVersionSetting,LINK_VER)
-  ALL_SETTINGS+=$(call addRequiredSetting,CC)
-  ALL_SETTINGS+=$(call addRequiredSetting,LINK)
-  ALL_SETTINGS+=$(call addRequiredSetting,DUMPBIN)
-endif
-ALL_SETTINGS+=$(call addRequiredVersionSetting,ANT_VER)
-ALL_SETTINGS+=$(call addRequiredSetting,TEMPDIR)
-
-
-ALL_SETTINGS+=$(call addHeading,Build Directives)
-ALL_SETTINGS+=$(call addOptionalSetting,OPENJDK)
-ALL_SETTINGS+=$(call addOptionalSetting,USE_HOTSPOT_INTERPRETER_MODE)
-ALL_SETTINGS+=$(call addOptionalSetting,PEDANTIC)
-ALL_SETTINGS+=$(call addOptionalSetting,DEV_ONLY)
-ALL_SETTINGS+=$(call addOptionalSetting,NO_DOCS)
-ALL_SETTINGS+=$(call addOptionalSetting,NO_DEMOS)
-ALL_SETTINGS+=$(call addOptionalSetting,NO_SAMPLES)
-ALL_SETTINGS+=$(call addOptionalSetting,NO_IMAGES)
-ALL_SETTINGS+=$(call addOptionalSetting,TOOLS_ONLY)
-ALL_SETTINGS+=$(call addOptionalSetting,INSANE)
-ALL_SETTINGS+=$(call addRequiredSetting,COMPILE_APPROACH)
-ifeq ($(COMPILE_APPROACH), parallel)
-  ALL_SETTINGS+=$(call addAltSetting,PARALLEL_COMPILE_JOBS)
-endif
-ALL_SETTINGS+=$(call addOptionalSetting,FASTDEBUG)
-ALL_SETTINGS+=$(call addRequiredSetting,COMPILER_WARNINGS_FATAL)
-ALL_SETTINGS+=$(call addOptionalSetting,COMPILER_WARNING_LEVEL)
-ALL_SETTINGS+=$(call addOptionalSetting,SHOW_ALL_WARNINGS)
-ALL_SETTINGS+=$(call addRequiredSetting,INCREMENTAL_BUILD)
-ALL_SETTINGS+=$(call addOptionalSetting,CC_HIGHEST_OPT)
-ALL_SETTINGS+=$(call addOptionalSetting,CC_HIGHER_OPT)
-ALL_SETTINGS+=$(call addOptionalSetting,CC_LOWER_OPT)
-ALL_SETTINGS+=$(call addOptionalSetting,CXXFLAGS)
-ALL_SETTINGS+=$(call addOptionalSetting,CFLAGS)
-
-ALL_SETTINGS+=$(call addOptionalSetting,BOOT_JAVA_CMD)
-ALL_SETTINGS+=$(call addOptionalSetting,BOOT_JAVAC_CMD)
-ALL_SETTINGS+=$(call addOptionalSetting,BOOT_JAR_CMD)
-ALL_SETTINGS+=$(call addOptionalSetting,BOOT_JARSIGNER_CMD)
-
-# These don't print out well with windows due to the ';' characters
-ifneq ($(PLATFORM),windows)
-  ALL_SETTINGS+=$(call addOptionalSetting,JAVAC_CMD)
-  ALL_SETTINGS+=$(call addOptionalSetting,JAVAH_CMD)
-  ALL_SETTINGS+=$(call addOptionalSetting,JAVADOC_CMD)
-endif
-
-ALL_SETTINGS+=$(call addHeading,Build Platform Settings)
-ALL_SETTINGS+=$(call addRequiredSetting,USER)
-ALL_SETTINGS+=$(call addRequiredSetting,PLATFORM)
-ALL_SETTINGS+=$(call addRequiredSetting,ARCH)
-ALL_SETTINGS+=$(call addRequiredSetting,LIBARCH)
-ALL_SETTINGS+=$(call addRequiredSetting,ARCH_FAMILY)
-ALL_SETTINGS+=$(call addRequiredSetting,ARCH_DATA_MODEL)
-ALL_SETTINGS+=$(call addRequiredSetting,ARCHPROP)
-ifeq ($(PLATFORM),windows)
-  ALL_SETTINGS+=$(call addRequiredSetting,PROCESSOR_ARCHITECTURE)
-  ALL_SETTINGS+=$(call addRequiredSetting,PROCESSOR_IDENTIFIER)
-  ifdef USING_CYGWIN
-    ALL_SETTINGS+=$(call addRequiredSetting,USING_CYGWIN)
-    ALL_SETTINGS+=$(call addRequiredVersionSetting,CYGWIN_VER)
-    ALL_SETTINGS+=$(call addRequiredSetting,CYGPATH_CMD)
-  else
-    ALL_SETTINGS+=$(call addRequiredVersionSetting,MKS_VER)
-    ALL_SETTINGS+=$(call addOptionalSetting,DOSNAME_CMD)
-  endif
-endif
-ifeq ($(PLATFORM),linux)
-  ifdef REQUIRED_ALSA_VERSION
-    ALL_SETTINGS+=$(call addRequiredSetting,ALSA_VERSION)
-  endif
-endif
-ALL_SETTINGS+=$(call addRequiredVersionSetting,OS_VERSION)
-ALL_SETTINGS+=$(call addOptionalSetting,OS_VARIANT_NAME)
-ALL_SETTINGS+=$(call addOptionalSetting,OS_VARIANT_VERSION)
-ALL_SETTINGS+=$(call addRequiredSetting,MB_OF_MEMORY)
-
-
-ALL_SETTINGS+=$(call addHeading,GNU Make Settings)
-ALL_SETTINGS+=$(call addRequiredSetting,MAKE)
-ALL_SETTINGS+=$(call addRequiredVersionSetting,MAKE_VER)
-ALL_SETTINGS+=$(call addOptionalSetting,MAKECMDGOALS)
-ALL_SETTINGS+=$(call addOptionalSetting,MAKEFLAGS)
-ALL_SETTINGS+=$(call addRequiredSetting,SHELL)
-
-
-ALL_SETTINGS+=$(call addHeading,Target Build Versions)
-ALL_SETTINGS+=$(call addRequiredSetting,JDK_VERSION)
-ALL_SETTINGS+=$(call addOptionalSetting,MILESTONE)
-ALL_SETTINGS+=$(call addOptionalSetting,RELEASE)
-ALL_SETTINGS+=$(call addRequiredSetting,FULL_VERSION)
-ALL_SETTINGS+=$(call addOptionalSetting,BUILD_NUMBER)
-
-
-ALL_SETTINGS+=$(call addHeading,External File/Binary Locations)
-ALL_SETTINGS+=$(call addRequiredSetting,USRJDKINSTANCES_PATH)
-ALL_SETTINGS+=$(call addAltSetting,BUILD_JDK_IMPORT_PATH)
-ALL_SETTINGS+=$(call addAltSetting,JDK_IMPORT_PATH)
-ALL_SETTINGS+=$(call addAltSetting,LANGTOOLS_DIST)
-ALL_SETTINGS+=$(call addAltSetting,CORBA_DIST)
-ALL_SETTINGS+=$(call addAltSetting,JAXP_DIST)
-ALL_SETTINGS+=$(call addAltSetting,JAXWS_DIST)
-ALL_SETTINGS+=$(call addAltSetting,HOTSPOT_DOCS_IMPORT_PATH)
-ALL_SETTINGS+=$(call addAltSetting,HOTSPOT_IMPORT_PATH)
-ifeq ($(ARCH_DATA_MODEL), 32)
-  ALL_SETTINGS+=$(call addAltSetting,HOTSPOT_CLIENT_PATH)
-endif
-ALL_SETTINGS+=$(call addAltSetting,HOTSPOT_SERVER_PATH)
-ifeq ($(PLATFORM),windows)
-  ALL_SETTINGS+=$(call addAltSetting,HOTSPOT_LIB_PATH)
-  ALL_SETTINGS+=$(call addRequiredSetting,DXSDK_VER)
-  ALL_SETTINGS+=$(call addAltSetting,DXSDK_PATH)
-  ALL_SETTINGS+=$(call addAltSetting,DXSDK_INCLUDE_PATH)
-  ALL_SETTINGS+=$(call addAltSetting,DXSDK_LIB_PATH)
-  ALL_SETTINGS+=$(call addAltSetting,WINDOWSSDKDIR)
-  ALL_SETTINGS+=$(call addRequiredSetting,RC)
-  ALL_SETTINGS+=$(call addRequiredSetting,REBASE)
-  ifndef OPENJDK
-    ALL_SETTINGS+=$(call addAltSetting,DEPLOY_MSSDK)
-    ALL_SETTINGS+=$(call addAltSetting,INSTALL_MSSDK)
-    ALL_SETTINGS+=$(call addAltSetting,WSCRIPT)
-    ALL_SETTINGS+=$(call addAltSetting,MSICERT)
-  endif
-endif
-ALL_SETTINGS+=$(call addAltSetting,CACERTS_FILE)
-ifndef OPENJDK
-  ALL_SETTINGS+=$(call addAltSetting,MOZILLA_HEADERS_PATH)
-endif
-ifneq ($(PLATFORM),windows)
-  ALL_SETTINGS+=$(call addAltSetting,CUPS_HEADERS_PATH)
-endif
-
-ifdef OPENJDK
-  ALL_SETTINGS+=$(call addHeading,OpenJDK-specific settings)
-  ALL_SETTINGS+=$(call addAltSetting,FREETYPE_HEADERS_PATH)
-  ALL_SETTINGS+=$(call addAltSetting,FREETYPE_LIB_PATH)
-endif
-
-ifdef OPENJDK
-  ALL_SETTINGS+=$(call addHeading,Previous JDK Settings)
-  ALL_SETTINGS+=$(call addAltSetting,PREVIOUS_RELEASE_PATH)
-  ALL_SETTINGS+=$(call addAltSetting,PREVIOUS_JDK_VERSION)
-  ALL_SETTINGS+=$(call addAltSetting,PREVIOUS_JDK_FILE)
-  ALL_SETTINGS+=$(call addAltSetting,PREVIOUS_JRE_FILE)
-  ALL_SETTINGS+=$(call addAltSetting,PREVIOUS_RELEASE_IMAGE)
-endif
--- a/jdk/makefiles/java/Makefile	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1995, 2011, 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.
-#
-
-#
-# Makefile for building all of java
-#
-
-PRODUCT=java
-BUILDDIR=..
-include $(BUILDDIR)/common/Defs.gmk
-
-#
-# The order of subdirs here is important
-#
-SUBDIRS += redist
-
-# Others
-#    Note: java_crw_demo java_hprof_demo are demos but must be delivered built in sdk
-
-SUBDIRS +=
-
-SUBDIRS_management =
-SUBDIRS_misc       =
-
-#TODO Check invoke
-#                     logging instrument invoke sql rmi
-
-ifeq ($(PLATFORM), macosx)
-  SUBDIRS += jobjc
-endif # PLATFORM
-
-include $(BUILDDIR)/common/Subdirs.gmk
-
-all build clean clobber::
-	$(SUBDIRS-loop)
-
--- a/jdk/makefiles/java/invoke/Makefile	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 2008, 2011, 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.
-#
-
-BUILDDIR = ../..
-
-PACKAGE = java.lang.invoke
-PRODUCT = java
-include $(BUILDDIR)/common/Defs.gmk
-
-AUTO_FILES_JAVA_DIRS = java/lang/invoke sun/invoke
-FILES_java = \
-    java/lang/ClassValue.java \
-    java/lang/BootstrapMethodError.java
-
-# The sources built here use new language syntax to generate
-# method handle calls.  Let's be sure we are using that format.
-LANGUAGE_VERSION = -source 7
-CLASS_VERSION = -target 7
-
-include $(BUILDDIR)/common/Classes.gmk
--- a/jdk/makefiles/java/redist/Makefile	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,497 +0,0 @@
-#
-# Copyright (c) 1997, 2011, 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.
-#
-
-#
-# Imports files exported by a hotspot build or provided from an external
-#   location into the OUTPUTDIR, and also primes the OUTPUTDIR with files
-#   that are provided inside this workspace.
-#
-# IMPORT_LIST contains the list of destination files that are copied 
-#     from external places (outside this workspace).
-#
-# INTERNAL_IMPORT_LIST is the list of destination files from BUILDDIR.
-# 
-
-BUILDDIR = ../..
-PRODUCT  = java
-include $(BUILDDIR)/common/Defs.gmk
-include $(BUILDDIR)/Tools.gmk
-
-$(info ENTERING redist)
-
-SERVER_LOCATION = server
-CLIENT_LOCATION = client
-KERNEL_LOCATION = kernel
-
-DB_SUFFIX = _db
-DTRACE_SUFFIX = _dtrace
-
-ifeq ($(PLATFORM), windows)
-  LIB_LOCATION = $(BINDIR)
-else ifeq ($(PLATFORM), macosx)
-  LIB_LOCATION = $(LIBDIR)
-else
-  LIB_LOCATION = $(LIBDIR)/$(LIBARCH)
-endif
-
-JVM_NAME               = $(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX)
-JVMLIB_NAME            = $(LIB_PREFIX)jvm.$(LIB_SUFFIX)
-JVMMAP_NAME            = $(LIB_PREFIX)jvm.map
-JVMPDB_NAME            = $(LIB_PREFIX)jvm.pdb
-LIBJSIG_NAME           = $(LIB_PREFIX)jsig.$(LIBRARY_SUFFIX)
-JVMDB_NAME             = $(LIB_PREFIX)jvm$(DB_SUFFIX).$(LIBRARY_SUFFIX)
-JVMDTRACE_NAME         = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).$(LIBRARY_SUFFIX)
-
-JVM_DEBUGINFO_NAME       = $(LIB_PREFIX)jvm.debuginfo
-LIBJSIG_DEBUGINFO_NAME   = $(LIB_PREFIX)jsig.debuginfo
-JVMDB_DEBUGINFO_NAME     = $(LIB_PREFIX)jvm$(DB_SUFFIX).debuginfo
-JVMDTRACE_DEBUGINFO_NAME = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).debuginfo
-
-CLASSSHARINGDATA_DIR   = $(BUILDDIR)/../make/tools/sharing
-
-# Needed to do file copy
-ABS_BUILDDIR :=$(call FullPath,$(BUILDDIR))
-
-SUBDIRS_desktop =
-SUBDIRS_tools   = sajdi
-include $(BUILDDIR)/common/Subdirs.gmk
-
-all clean clobber::
-	$(SUBDIRS-loop)
-
-all:: build
-
-# List of files created here or coming from BUILDDIR area (this workspace)
-INTERNAL_IMPORT_LIST = $(LIBDIR)/classlist
-
-# List of files coming from outside this workspace
-ifeq ($(JVM_VARIANT_SERVER),true)
-    IMPORT_LIST = $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME) \
-                  $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt
-    ifneq ($(OBJCOPY),)
-        # the import JDK may not contain .debuginfo files
-        ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVM_DEBUGINFO_NAME)),)
-           IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DEBUGINFO_NAME)
-        endif
-    endif
-endif
-ifeq ($(JVM_VARIANT_CLIENT),true)
-    IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME) \
-                   $(LIB_LOCATION)/$(CLIENT_LOCATION)/Xusage.txt
-    ifneq ($(OBJCOPY),)
-        # the import JDK may not contain .debuginfo files
-        ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVM_DEBUGINFO_NAME)),)
-            IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DEBUGINFO_NAME)
-        endif
-    endif
-endif
-
-$(info ENTERING redist 2)
-ifeq ($(PLATFORM), windows)
-    IMPORT_LIST += $(BINDIR)/$(notdir $(MSVCR100DLL))
-
-    $(BINDIR)/$(notdir $(MSVCR100DLL)): $(MSVCR100DLL)
-	$(install-import-file)
-	$(call chmod-file, a+x)
-
-    # Get the hotspot .map and .pdb files for client and server
-    ifeq ($(JVM_VARIANT_SERVER),true)
-        IMPORT_LIST += \
-		$(LIBDIR)/$(JVMLIB_NAME) \
-		$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMMAP_NAME) \
-		$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMPDB_NAME)
-    endif
-
-    # Add .map and .pdb files to the import path for client and kernel VMs. 
-    ifeq ($(JVM_VARIANT_CLIENT),true)
-        IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMMAP_NAME) \
-                       $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMPDB_NAME)
-    endif
-    ifeq ($(JVM_VARIANT_KERNEL),true)
-        IMPORT_LIST += $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMMAP_NAME) \
-                       $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMPDB_NAME)
-    endif
-
-    $(info XXXX $(LIBDIR)/$(JVMLIB_NAME): $(HOTSPOT_LIB_PATH)/$(JVMLIB_NAME))
-    $(LIBDIR)/$(JVMLIB_NAME): $(HOTSPOT_LIB_PATH)/$(JVMLIB_NAME)
-	$(install-import-file)
-
-    # it is OK for the .map and .pdb files to not exist, so do not force a 
-    # dependency on them from the bootstrap location, and allow the copy to fail.
-    $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMMAP_NAME):
-	@$(prep-target)
-	-$(CP) $(HOTSPOT_CLIENT_PATH)/$(JVMMAP_NAME)  $@
-
-    $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMMAP_NAME):
-	@$(prep-target)
-	-$(CP) $(HOTSPOT_KERNEL_PATH)/$(JVMMAP_NAME)  $@
-
-    $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMMAP_NAME):
-	@$(prep-target)
-	-$(CP) $(HOTSPOT_SERVER_PATH)/$(JVMMAP_NAME) $@
-
-    $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMPDB_NAME):
-	@$(prep-target)
-	-$(CP) $(HOTSPOT_CLIENT_PATH)/$(JVMPDB_NAME)  $@
-
-    $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMPDB_NAME):
-	@$(prep-target)
-	-$(CP) $(HOTSPOT_KERNEL_PATH)/$(JVMPDB_NAME)  $@
-
-    $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMPDB_NAME): 
-	@$(prep-target)
-	-$(CP) $(HOTSPOT_SERVER_PATH)/$(JVMPDB_NAME) $@
-
-else
-    # Posix like systems
-    IMPORT_LIST += $(LIB_LOCATION)/$(LIBJSIG_NAME)
-    ifneq ($(OBJCOPY),)
-        # the import JDK may not contain .debuginfo files
-        ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),)
-            IMPORT_LIST += $(LIB_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME)
-        endif
-    endif
-    ifeq ($(JVM_VARIANT_CLIENT),true)
-        IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME)
-        ifneq ($(OBJCOPY),)
-            # the import JDK may not contain the target of the symlink
-            ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),)
-                IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME)
-            endif
-        endif
-    endif
-    ifeq ($(JVM_VARIANT_SERVER),true)
-        IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME)
-        ifneq ($(OBJCOPY),)
-            # the import JDK may not contain the target of the symlink
-            ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),)
-                IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME)
-            endif
-        endif
-    endif
-
-    ifeq ($(PLATFORM), solaris)
-
-        ifeq ($(JVM_VARIANT_CLIENT),true)
-            IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME)
-
-            # The conditional can be removed when import JDKs contain these files.
-            ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME)),)
-                IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_NAME)
-                IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_NAME)
-                IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_NAME)
-                ifneq ($(OBJCOPY),)
-                    # the import JDK may not contain .debuginfo files
-                    ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)),)
-                        IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME)
-                        IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME)
-                        IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME)
-                    endif
-                endif
-            else
-                $(warning WARNING: $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME) not found!)
-            endif
-
-            $(LIB_LOCATION)/$(JVM_NAME): $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME)
-			@$(prep-target)
-        endif 
-
-        ifeq ($(JVM_VARIANT_SERVER),true)
-            IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME)
-            ifneq ($(OBJCOPY),)
-                # the import JDK may not contain .debuginfo files
-                ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDB_DEBUGINFO_NAME)),)
-                    IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DEBUGINFO_NAME)
-                endif
-            endif
-            # The conditional can be removed when import JDKs contain these files.
-            ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_NAME)),)
-                IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_NAME)
-                ifneq ($(OBJCOPY),)
-                    # the import JDK may not contain .debuginfo files
-                    ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)),)
-                        IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME)
-                    endif
-                endif
-            else
-                $(warning WARNING: $(HOTSPOT_SERVER_PATH)/$(JVMDB_NAME) not found!)
-            endif 
-
-            # The conditional can be removed when import JDKs contain these files.
-            ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME)),)
-                IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME)
-                ifneq ($(OBJCOPY),)
-                    # the import JDK may not contain .debuginfo files
-                    ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DEBUGINFO_NAME)),)
-                        IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME)
-                    endif
-                endif
-            else
-                $(warning WARNING: $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME) not found!)
-            endif
-
-            # The conditional can be removed when import JDKs contain these files.
-            ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME)),)
-                IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_NAME)
-                ifneq ($(OBJCOPY),)
-                    # the import JDK may not contain .debuginfo files
-                    ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME)),)
-                        IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME)
-                    endif
-                endif
-            else
-                $(warning WARNING: $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME) not found!)
-            endif
-        endif
-    endif 
-endif 
-
-$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVM_NAME)
-	$(install-import-file)
-	@$(call binary_file_verification,$@)
-
-ifneq ($(OBJCOPY),)
-$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVM_DEBUGINFO_NAME)
-	$(install-import-file)
-endif
-
-$(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVM_NAME): $(HOTSPOT_KERNEL_PATH)/$(JVM_NAME)
-	$(install-file)
-	@$(call binary_file_verification,$@)
-
-$(LIB_LOCATION)/$(LIBJSIG_NAME): $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_NAME)
-	$(install-import-file)
-	@$(call binary_file_verification,$@)
-
-ifneq ($(OBJCOPY),)
-$(LIB_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME): $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)
-	$(install-import-file)
-endif
-
-$(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME):
-	@$(prep-target)
-	$(call install-sym-link, ../$(LIBJSIG_NAME))
-
-ifneq ($(OBJCOPY),)
-$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME) \
-$(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME):
-	@$(prep-target)
-	$(call install-sym-link, ../$(LIBJSIG_DEBUGINFO_NAME))
-endif
-$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME):
-	@$(prep-target)
-	$(call install-sym-link, ../$(LIBJSIG_NAME))
-
-ifneq ($(OBJCOPY),)
-$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME):
-	@$(prep-target)
-	$(call install-sym-link, ../$(LIBJSIG_DEBUGINFO_NAME))
-endif
-
-$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_NAME)
-	$(install-import-file)
-	@$(call binary_file_verification,$@)
-
-$(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDB_NAME)
-	$(install-import-file)
-	@$(call binary_file_verification,$@)
-
-ifneq ($(OBJCOPY),)
-$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_DEBUGINFO_NAME)
-	$(install-import-file)
-
-$(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDB_DEBUGINFO_NAME)
-	$(install-import-file)
-endif
-
-$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB_NAME)
-	$(install-import-file)
-	@$(call binary_file_verification,$@)
-
-$(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME)
-	$(install-import-file)
-	@$(call binary_file_verification,$@)
-
-ifneq ($(OBJCOPY),)
-$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB_DEBUGINFO_NAME)
-	$(install-import-file)
-
-$(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DEBUGINFO_NAME)
-	$(install-import-file)
-endif
-
-$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME)
-	$(install-import-file)
-	@$(call binary_file_verification,$@)
-
-$(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDTRACE_NAME)
-	$(install-import-file)
-	@$(call binary_file_verification,$@)
-
-ifneq ($(OBJCOPY),)
-$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)
-	$(install-import-file)
-
-$(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME)
-	$(install-import-file)
-endif
-
-$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_NAME)
-	$(install-import-file)
-	@$(call binary_file_verification,$@)
-
-$(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME)
-	$(install-import-file)
-	@$(call binary_file_verification,$@)
-
-$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME): $(HOTSPOT_SERVER_PATH)/$(JVM_NAME)
-	$(install-import-file)
-	@$(call binary_file_verification,$@)
-
-ifneq ($(OBJCOPY),)
-$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)
-	$(install-import-file)
-
-$(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME)
-	$(install-import-file)
-
-$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVM_DEBUGINFO_NAME)
-	$(install-import-file)
-endif
-
-$(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt : $(HOTSPOT_SERVER_PATH)/Xusage.txt
-	$(install-import-file)
-
-
-$(LIB_LOCATION)/$(CLIENT_LOCATION)/Xusage.txt : $(HOTSPOT_CLIENT_PATH)/Xusage.txt
-	$(install-import-file)
-
-$(LIB_LOCATION)/$(KERNEL_LOCATION)/Xusage.txt : $(HOTSPOT_KERNEL_PATH)/Xusage.txt
-	$(install-file)
-
-#
-# Specific to non-OpenJDK building
-#
-ifndef OPENJDK
-
-INTERNAL_IMPORT_LIST += \
-            $(LIBDIR)/security/US_export_policy.jar \
-            $(LIBDIR)/security/local_policy.jar \
-            $(LIBDIR)/jce.jar
-
-$(LIBDIR)/jce.jar: \
-	    $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
-	$(install-file)
-$(LIBDIR)/security/US_export_policy.jar: \
-	    $(JDK_TOPDIR)/make/closed/tools/crypto/jce/US_export_policy.jar
-	$(install-file)
-$(LIBDIR)/security/local_policy.jar: \
-	    $(JDK_TOPDIR)/make/closed/tools/crypto/jce/local_policy.jar
-	$(install-file)
-
-endif # OPENJDK
-
-# Construct classlist file
-$(LIBDIR)/classlist: \
-    $(CLASSSHARINGDATA_DIR)/classlist.$(PLATFORM) \
-    $(ADDJSUM_JARFILE)
-	@$(prep-target)
-	@$(RM) -f $@.temp
-	$(TOOL_ADDJSUM) \
-	    $(CLASSSHARINGDATA_DIR)/classlist.$(PLATFORM) $@.temp
-	$(MV) $@.temp $@
-
-# Import internal files (ones that are stashed in this source tree)
-import_internal_files : $(INTERNAL_IMPORT_LIST)
-
-# Import files from the JDK that we are not building
-import_files: $(IMPORT_LIST)
-
-# Get component information variables and rules
-include $(BUILDDIR)/common/internal/ImportComponents.gmk
-
-# Security files we need to import
-SEC_FILES_ZIP=$(ABS_BUILDDIR)/tools/crypto/sec-bin.zip
-SEC_FILES_WIN_ZIP=$(ABS_BUILDDIR)/tools/crypto/sec-windows-bin.zip
-JGSS_WIN32_FILES_ZIP=$(ABS_BUILDDIR)/tools/crypto/jgss-windows-i586-bin.zip
-JGSS_WIN64_FILES_ZIP=$(ABS_BUILDDIR)/tools/crypto/jgss-windows-x64-bin.zip
-
-# Unzip zip file $2 into directory $1 (if $2 exists)
-#   Warning: $2 must be absolute path not relative
-define SecUnzipper
-if [ -f $2 ] ; then \
-  $(MKDIR) -p $1; \
-  $(ECHO) "( $(CD) $1 && $(UNZIP) -o $2 )"; \
-  ( $(CD) $1 && $(UNZIP) -o $2 ); \
-fi
-endef
-
-# If sec-bin exists, unpack it into the build directory
-#   Also, the library recompile build indirectly depends on two SSL classes,
-#   so copy those as well   FIXUP
-#   if sec-windows-bin exists, unpack it into the build directory
-#   if JGSS files exists, unpack it into the build directory
-$(TEMPDIR)/security_imported:
-	@$(prep-target)
-	@$(call SecUnzipper,$(OUTPUTDIR),$(SEC_FILES_ZIP))
-ifeq ($(PLATFORM), windows)
-	@$(call SecUnzipper,$(OUTPUTDIR),$(SEC_FILES_WIN_ZIP))
-endif
-ifeq ($(PLATFORM), windows)
-    ifeq ($(ARCH_DATA_MODEL), 32)
-	@$(call SecUnzipper,$(OUTPUTDIR),$(JGSS_WIN32_FILES_ZIP))
-    else
-	@$(call SecUnzipper,$(OUTPUTDIR),$(JGSS_WIN64_FILES_ZIP))
-    endif
-endif
-	@$(ECHO) "Imported on `$(DATE)`" > $@
-
-# Import all files from other components
-$(TEMPDIR)/components_imported:
-	@$(prep-target)
-	$(call import-component-binaries,$(ABS_OUTPUTDIR))
-	$(call import-component-sources,$(IMPORTSRCDIR))
-	$(call import-component-docs,$(IMPORTDOCDIR))
-	$(call import-component-classes,$(CLASSDESTDIR))
-	@$(ECHO) "Imported on `$(DATE)`" > $@
-
-# Do pretty much everything
-build : import_files \
-	import_internal_files \
-	$(TEMPDIR)/components_imported \
-	$(TEMPDIR)/security_imported
-
-# Clean up what we imported (except for component files)
-clean clobber::
-	$(RM) $(IMPORT_LIST)
-	$(RM) $(INTERNAL_IMPORT_LIST)
-	$(call import-component-sources-clean,$(IMPORTSRCDIR))
-	$(call import-component-docs-clean,$(IMPORTDOCDIR))
-	$(call import-component-classes-clean,$(CLASSDESTDIR))
-	$(RM) $(TEMPDIR)/components_imported
-	$(RM) $(TEMPDIR)/security_imported
-
-.PHONY: import_files import_internal_files
-
--- a/jdk/makefiles/java/redist/sajdi/Makefile	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,116 +0,0 @@
-#
-# Copyright (c) 1997, 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.
-#
-
-BUILDDIR = ../../..
-PRODUCT  = java
-include $(BUILDDIR)/common/Defs.gmk
-
-ifeq ($(PLATFORM), windows)
-  LIB_LOCATION = $(BINDIR)
-else ifeq ($(PLATFORM), macosx)
-  LIB_LOCATION = $(LIBDIR)
-else
-  LIB_LOCATION = $(LIBDIR)/$(LIBARCH)
-endif
-
-# INCLUDE_SA is false on platforms where SA is not supported.
-# On platforms where it is supported, we want to allow it to
-# not be present, at least temporarily.  So,
-# if the SA files (well, just sa-jdi.jar) do not exist
-# in the HOTSPOT_IMPORT_PATH, then we won't build SA.
-SA_EXISTS := $(shell if [ -r $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar ] ; then \
-                          $(ECHO) true; \
-                        else \
-                          $(ECHO) false; \
-                        fi)
-
-ifeq ($(SA_EXISTS), false)
-  INCLUDE_SA := false
-endif
-
-IMPORT_LIST =
-ifeq ($(INCLUDE_SA), true)
-  IMPORT_LIST += $(LIBDIR)/sa-jdi.jar \
-                 $(LIB_LOCATION)/$(SALIB_NAME)
-  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
-    ifeq ($(ZIP_DEBUGINFO_FILES),1)
-      # the import JDK may not contain .diz files
-      ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(SA_DIZ_NAME)),)
-        IMPORT_LIST += $(LIB_LOCATION)/$(SA_DIZ_NAME)
-      endif
-    else
-      ifeq ($(PLATFORM), windows)
-        # the import JDK may not contain .pdb files
-        ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(SAPDB_NAME)),)
-          # assume .map file is present if .pdb is present
-          IMPORT_LIST += $(LIB_LOCATION)/$(SAMAP_NAME) \
-                         $(LIB_LOCATION)/$(SAPDB_NAME)
-        endif
-      else
-        # the import JDK may not contain .debuginfo files
-        ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(SA_DEBUGINFO_NAME)),)
-          IMPORT_LIST += $(LIB_LOCATION)/$(SA_DEBUGINFO_NAME)
-        endif
-      endif
-    endif
-  endif
-endif # INCLUDE_SA
-
-
-ifeq ($(INCLUDE_SA), true)
-# The Serviceability Agent is built in the Hotspot workspace.
-# It contains two files:
-#  - sa-jdi.jar:  This goes into the same dir as tools.jar.
-#  - a shared library:  sawindbg.dll on windows / libproc.sa on unix
-#		        This goes into the same dir as the other
-#			shared libs, eg. libjdwp.so.
-$(LIBDIR)/sa-jdi.jar: $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar
-	$(install-importonly-file)
-
-$(LIB_LOCATION)/$(SALIB_NAME): $(HOTSPOT_SALIB_PATH)/$(SALIB_NAME)
-	$(install-import-file)
-
-  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
-    ifeq ($(ZIP_DEBUGINFO_FILES),1)
-$(LIB_LOCATION)/$(SA_DIZ_NAME): $(HOTSPOT_SALIB_PATH)/$(SA_DIZ_NAME)
-	$(install-import-file)
-    else
-      ifeq ($(PLATFORM), windows)
-$(LIB_LOCATION)/$(SAPDB_NAME): $(HOTSPOT_SALIB_PATH)/$(SAPDB_NAME)
-	$(install-import-file)
-
-$(LIB_LOCATION)/$(SAMAP_NAME): $(HOTSPOT_SALIB_PATH)/$(SAMAP_NAME)
-	$(install-import-file)
-      else
-$(LIB_LOCATION)/$(SA_DEBUGINFO_NAME): $(HOTSPOT_SALIB_PATH)/$(SA_DEBUGINFO_NAME)
-	$(install-import-file)
-      endif
-    endif
-  endif
-endif # INCLUDE_SA
-
-all: $(IMPORT_LIST)
-
-clean clobber::
--- a/jdk/makefiles/javax/crypto/Defs-jce.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-#
-# Copyright (c) 2007, 2011, 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.
-#
-
-include $(BUILDDIR)/common/Release.gmk
-
-#
-# Include these extra attributes for now, should probably take out.
-#
-JCE_MANIFEST_FILE    = $(TEMPDIR)/manifest.mf
-$(JCE_MANIFEST_FILE): $(MAINMANIFEST)
-	$(prep-target)
-	$(SED) -e "s#@@RELEASE@@#$(RELEASE)#"           \
-               -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
-               $(MAINMANIFEST) >> $@
-	$(ECHO) "Extension-Name: javax.crypto" >> $@
-	$(ECHO) "Implementation-Vendor-Id: com.sun" >> $@
-
-README-MAKEFILE_WARNING = \
-    "\nPlease read make/javax/crypto/Makefile for further build instructions."
-
-define no-source-warning
-	@$(ECHO) "\n***JCE sources are not available, skipping build.***" \
-	    $(README-MAKEFILE_WARNING)
-endef
-
-ifndef OPENJDK
-
-PREBUILT_DIR = $(JDK_TOPDIR)/make/closed/tools/crypto
-
-define build-warning
-	@$(ECHO) "\n***JCE in JDK builds require special tools/procedures.***" \
-	    $(README-MAKEFILE_WARNING)
-endef
-
-#
-# Location for JCE codesigning key.
-#
-SIGNING_KEY_DIR    = /security/ws/JCE-signing/src
-SIGNING_KEYSTORE   = $(SIGNING_KEY_DIR)/KeyStore.jks
-SIGNING_PASSPHRASE = $(SIGNING_KEY_DIR)/passphrase.txt
-SIGNING_ALIAS      = oracle_jce_rsa
-
-#
-# Defines for signing the various jar files.
-#
-
-define presign
-    @if [ ! -f $(SIGNING_KEYSTORE) -o ! -f $(SIGNING_PASSPHRASE) ]; then \
-	$(ECHO) "\n$(SIGNING_KEYSTORE): Signing mechanism *NOT* available..." \
-	    $(README-MAKEFILE_WARNING); \
-	exit 2; \
-    fi
-endef
-
-define sign-target
-	$(BOOT_JARSIGNER_CMD) -keystore $(SIGNING_KEYSTORE) \
-	    $@ $(SIGNING_ALIAS) < $(SIGNING_PASSPHRASE)
-	@$(java-vm-cleanup)
-	@$(ECHO) "\nJar codesigning finished."
-endef
-
-RELEASE_DIR = $(OUTPUTDIR)/jce-release
-
-define release-warning
-	@$(ECHO) \
-	    "\n***The jar files built by the 'release' target must***" \
-	    "\n***still be checked into the closed workspace!     ***" \
-	    $(README-MAKEFILE_WARNING)
-endef
-
-#
-# Convenience macros for signing a jar file.
-#
-# Call through $(call sign-file, target file)
-#
-define sign-file
-	$(presign)
-	$(prep-target)
-	$(CP) $1 $@
-	$(sign-target)
-endef
-
-endif  # !OPENJDK
--- a/jdk/makefiles/javax/crypto/Makefile	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,484 +0,0 @@
-#
-# Copyright (c) 2007, 2011, 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.
-#
-
-#
-# Makefile for building jce.jar and the various cryptographic strength
-# policy jar files.
-#
-
-#
-# (The terms "OpenJDK" and "JDK" below refer to OpenJDK and Sun JDK builds
-# respectively.)
-#
-# JCE builds are very different between OpenJDK and JDK.  The OpenJDK JCE
-# jar files do not require signing, but those for JDK do.  If an unsigned
-# jar file is installed into JDK, things will break when the crypto
-# routines are called.
-#
-# This Makefile does the "real" build of the JCE files.  There are some
-# javac options currently specific to JCE, so we recompile now to make
-# sure any implicit compilations didn't use any incorrect flags.
-#
-# For OpenJDK, the jar files built here are installed directly into the
-# OpenJDK.
-#
-# For JDK, the binaries use pre-built/pre-signed binary files stored in
-# the closed workspace that are not shipped in the OpenJDK workspaces.
-# We still build the JDK files here to verify the files compile, and in
-# preparation for possible signing.  Developers working on JCE in JDK
-# must sign the JCE files before testing.  The JCE signing key is kept
-# separate from the JDK workspace to prevent its disclosure.
-#
-# SPECIAL NOTE TO JCE/JDK developers:  The source files must eventually
-# be built and signed, and the resulting jar files *MUST BE CHECKED INTO
-# THE CLOSED PART OF THE WORKSPACE*.  This separate step *MUST NOT BE
-# FORGOTTEN*, otherwise a bug fixed in the source code will not be
-# reflected in the shipped binaries.  The "release" target should be
-# used to generate the required files.
-#
-# There are a number of targets to help both JDK/OpenJDK developers.
-#
-# Main Targets (JDK/OPENJDK):
-#
-#     all/clobber/clean        The usual.
-#                                  If OpenJDK: builds/installs the
-#                                      jce.jar/limited policy files.
-#                                  If JDK: builds but does not install.
-#                                     During full tops-down builds,
-#                                     prebuilt/presigned jce.jar &
-#                                     limited policy files are copied
-#                                     in by make/java/redist/Makefile.
-#                                     If you are working in this directory
-#                                     and want to install the prebuilts,
-#                                     use the "install-prebuilt" target.
-#
-#     jar                      Builds/installs jce.jar
-#                                  If OpenJDK, does not sign
-#                                  If JDK, tries to sign
-#
-# Other lesser-used Targets (JDK/OPENJDK):
-#
-#     build-jar                Builds jce.jar (does not sign/install)
-#
-#     build-policy             Builds policy files (does not sign/install)
-#
-#     install-jar              Alias for "jar" above
-#
-#     install-limited          Builds/installs limited policy files
-#                                  If OpenJDK, does not sign
-#                                  If JDK, tries to sign
-#     install-unlimited        Builds/nstalls unlimited policy files
-#                                  If OpenJDK, does not sign
-#                                  If JDK, tries to sign
-#
-# Other targets (JDK only):
-#
-#     sign                     Alias for sign-jar and sign-policy
-#          sign-jar            Builds/signs jce.jar file (no install)
-#          sign-policy         Builds/signs policy files (no install)
-#
-#     release                  Builds all targets in preparation
-#                              for workspace integration.
-#
-#     install-prebuilt         Installs the pre-built jar files
-#
-# This makefile was written to support parallel target execution.
-#
-
-BUILDDIR = ../..
-PACKAGE = javax.crypto
-PRODUCT = sun
-
-#
-# The following is for when we need to do postprocessing
-# (signing) against a read-only build.  If the OUTPUTDIR
-# isn't writable, the build currently crashes out.
-#
-ifndef OPENJDK
-  ifdef ALT_JCE_BUILD_DIR
-    # =====================================================
-    # Where to place the output, in case we're building from a read-only
-    # build area.  (e.g. a release engineering build.)
-    JCE_BUILD_DIR=${ALT_JCE_BUILD_DIR}
-    IGNORE_WRITABLE_OUTPUTDIR_TEST=true
-  else
-    JCE_BUILD_DIR=${TEMPDIR}
-  endif
-endif
-
-JAVAC_MAX_WARNINGS = true
-JAVAC_WARNINGS_FATAL = true
-include $(BUILDDIR)/common/Defs.gmk
-
-#
-# Location for the newly built classfiles.
-#
-CLASSDESTDIR = $(TEMPDIR)/classes
-
-#
-# Subdirectories of these are automatically included.
-#
-AUTO_FILES_JAVA_DIRS = \
-    javax/crypto \
-    sun/security/internal/interfaces \
-    sun/security/internal/spec
-
-include $(BUILDDIR)/common/Classes.gmk
-
-#
-# Rules
-#
-
-#
-# Some licensees do not get the security sources, but we still need to
-# be able to build "all" for them.  Check here to see if the sources were
-# available.  If not, then we don't need to continue this rule.
-#
-
-ifdef OPENJDK
-all: build-jar install-jar build-policy install-limited
-else  # OPENJDK
-ifeq ($(strip $(FILES_java)),)
-all:
-	$(no-source-warning)
-else  # FILES_java/policy files available
-all: build-jar build-policy
-	$(build-warning)
-endif # $(FILES_java)/policy files available
-endif # OPENJDK
-
-#
-# We use a variety of subdirectories in the $(TEMPDIR) depending on what
-# part of the build we're doing.  Both OPENJDK/JDK builds are initially
-# done in the unsigned area.  When files are signed in JDK, they will be
-# placed in the appropriate areas.
-#
-UNSIGNED_DIR = $(TEMPDIR)/unsigned
-
-include Defs-jce.gmk
-
-
-# =====================================================
-# Build the unsigned jce.jar file.  Signing comes later.
-#
-
-JAR_DESTFILE = $(LIBDIR)/jce.jar
-
-#
-# JCE building is somewhat involved.
-#
-# OpenJDK:  Since we do not ship prebuilt JCE files, previous compiles
-# in the build may have needed JCE class signatures.  There were then
-# implicitly built by javac (likely using the boot javac).  While using
-# those class files was fine for signatures, we need to rebuild using
-# the right compiler.
-#
-# JDK:  Even through the jce.jar was previously installed, since the
-# source files are accessible in the source directories, they will
-# always be "newer" than the prebuilt files inside the jar, and thus
-# make will always rebuild them.  (We could "hide" the JCE source in a
-# separate directory, but that would make the build logic for JDK and
-# OpenJDK more complicated.)
-#
-# Thus in either situation, we shouldn't use these files.
-#
-# To make sure the classes were built with the right compiler options,
-# delete the existing files in $(CLASSBINDIR), rebuild the right way in a
-# directory under $(TEMPDIR), then copy the files back to
-# $(CLASSBINDIR).   Building in $(TEMPDIR) allows us to use our make
-# infrastructure without modification:  .classes.list, macros, etc.
-#
-
-#
-# The list of directories that will be remade from scratch, using the
-# right compilers/options.
-#
-DELETE_DIRS = $(patsubst %, $(CLASSBINDIR)/%, $(AUTO_FILES_JAVA_DIRS))
-
-#
-# Since the -C option to jar is used below, each directory entry must be
-# preceded with the appropriate directory to "cd" into.
-#
-JAR_DIRS = $(patsubst %, -C $(CLASSDESTDIR) %, $(AUTO_FILES_JAVA_DIRS))
-
-build-jar: $(UNSIGNED_DIR)/jce.jar
-
-#
-# Build jce.jar, then replace the previously built JCE files in the
-# classes directory with these.  This ensures we have consistently built
-# files throughout the workspaces.
-#
-$(UNSIGNED_DIR)/jce.jar: prebuild build $(JCE_MANIFEST_FILE)
-	$(prep-target)
-	$(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ $(JAR_DIRS) \
-	    $(BOOT_JAR_JFLAGS)
-	$(CP) -r $(CLASSDESTDIR)/* $(CLASSBINDIR)
-	@$(java-vm-cleanup)
-
-build: prebuild
-
-prebuild:
-	$(RM) -r $(DELETE_DIRS)
-
-
-# =====================================================
-# Build the unsigned policy files.
-#
-# Given the current state of world export/import policies,
-# these settings work for Sun's situation.  This note is not
-# legal guidance, you must still resolve any export/import issues
-# applicable for your situation.  Contact your export/import
-# counsel for more information.
-#
-
-POLICY_DESTDIR			= $(LIBDIR)/security
-UNSIGNED_POLICY_BUILDDIR	= $(UNSIGNED_DIR)/policy
-
-build-policy: unlimited limited
-
-#
-# Build the unsigned unlimited policy files.
-#
-unlimited: \
-	    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar	\
-	    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar
-
-$(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar:		\
-	    policy/unlimited/default_US_export.policy			\
-	    policy/unlimited/UNLIMITED
-	$(prep-target)
-	$(BOOT_JAR_CMD) cmf policy/unlimited/UNLIMITED $@		\
-	    -C policy/unlimited default_US_export.policy		\
-	    $(BOOT_JAR_JFLAGS)
-	@$(java-vm-cleanup)
-
-$(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar:			\
-	    policy/unlimited/default_local.policy			\
-	    policy/unlimited/UNLIMITED
-	$(prep-target)
-	$(BOOT_JAR_CMD) cmf policy/unlimited/UNLIMITED $@		\
-	    -C policy/unlimited default_local.policy			\
-	    $(BOOT_JAR_JFLAGS)
-	@$(java-vm-cleanup)
-
-#
-# Build the unsigned limited policy files.
-#
-# NOTE:  We currently do not place restrictions on our limited export
-# policy.  This was not a typo.
-#
-limited: \
-	    $(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar	\
-	    $(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar
-
-$(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar:		\
-	    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar
-	$(install-file)
-
-$(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar:			\
-	    policy/limited/default_local.policy				\
-	    policy/limited/exempt_local.policy				\
-	    policy/limited/LIMITED
-	$(prep-target)
-	$(BOOT_JAR_CMD) cmf policy/limited/LIMITED $@			\
-	    -C policy/limited default_local.policy			\
-	    -C policy/limited exempt_local.policy			\
-	    $(BOOT_JAR_JFLAGS)
-	@$(java-vm-cleanup)
-
-UNSIGNED_POLICY_FILES = \
-    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar		\
-    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar		\
-    $(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar		\
-    $(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar		\
-
-
-ifndef OPENJDK
-# =====================================================
-# Sign the various jar files.  Not needed for OpenJDK.
-#
-
-SIGNED_DIR		= $(JCE_BUILD_DIR)/signed
-SIGNED_POLICY_BUILDDIR	= $(SIGNED_DIR)/policy
-
-SIGNED_POLICY_FILES = \
-    $(patsubst $(UNSIGNED_POLICY_BUILDDIR)/%,$(SIGNED_POLICY_BUILDDIR)/%, \
-	$(UNSIGNED_POLICY_FILES))
-
-sign: sign-jar sign-policy
-
-sign-jar: $(SIGNED_DIR)/jce.jar
-
-sign-policy: $(SIGNED_POLICY_FILES)
-
-ifndef ALT_JCE_BUILD_DIR
-$(SIGNED_DIR)/jce.jar: $(UNSIGNED_DIR)/jce.jar
-else
-#
-# We have to remove the build dependency, otherwise, we'll try to rebuild it
-# which we can't do on a read-only filesystem.
-#
-$(SIGNED_DIR)/jce.jar:
-	@if [ ! -r $(UNSIGNED_DIR)/jce.jar ] ; then \
-	    $(ECHO) "Couldn't find $(UNSIGNED_DIR)/jce.jar"; \
-	    exit 1; \
-	fi
-endif
-	$(call sign-file, $(UNSIGNED_DIR)/jce.jar)
-
-$(SIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar:	\
-	    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar
-	$(call sign-file, $<)
-
-$(SIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar:		\
-	    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar
-	$(call sign-file, $<)
-
-$(SIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar:		\
-	    $(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar
-	$(call sign-file, $<)
-
-$(SIGNED_POLICY_BUILDDIR)/limited/local_policy.jar:		\
-	    $(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar
-	$(call sign-file, $<)
-
-
-# =====================================================
-# Create the Release Engineering files.  Signed builds,
-# unlimited policy file distribution, etc.
-#
-
-CLOSED_DIR = $(BUILDDIR)/closed/javax/crypto
-
-release: $(SIGNED_DIR)/jce.jar sign-policy $(CLOSED_DIR)/doc/README.txt
-	$(RM) -r \
-	    $(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy              \
-	    $(JCE_BUILD_DIR)/release/jce.jar                         \
-	    $(JCE_BUILD_DIR)/release/US_export_policy.jar            \
-	    $(JCE_BUILD_DIR)/release/local_policy.jar                \
-	    $(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy.zip
-	$(MKDIR) -p $(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy
-	$(CP) $(SIGNED_DIR)/jce.jar $(JCE_BUILD_DIR)/release
-	$(CP) \
-	    $(SIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar   \
-	    $(SIGNED_POLICY_BUILDDIR)/limited/local_policy.jar       \
-	    $(JCE_BUILD_DIR)/release
-	$(CP) \
-	    $(SIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar \
-	    $(SIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar     \
-	    $(CLOSED_DIR)/doc/README.txt                             \
-	    $(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy
-	cd $(JCE_BUILD_DIR)/release ; \
-	$(ZIPEXE) -qr UnlimitedJCEPolicy.zip UnlimitedJCEPolicy
-	$(release-warning)
-
-endif # OPENJDK
-
-
-# =====================================================
-# Install routines.
-#
-
-#
-# Install jce.jar, depending on which type is requested.
-#
-install-jar jar: $(JAR_DESTFILE)
-ifndef OPENJDK
-	$(release-warning)
-endif
-
-ifdef OPENJDK
-$(JAR_DESTFILE): $(UNSIGNED_DIR)/jce.jar
-else
-$(JAR_DESTFILE): $(SIGNED_DIR)/jce.jar
-endif
-	$(install-file)
-
-#
-# Install the appropriate policy file, depending on the type of build.
-#
-ifdef OPENJDK
-INSTALL_POLICYDIR = $(UNSIGNED_POLICY_BUILDDIR)
-else
-INSTALL_POLICYDIR = $(SIGNED_POLICY_BUILDDIR)
-endif
-
-install-limited-jars: \
-	    $(INSTALL_POLICYDIR)/limited/US_export_policy.jar	\
-	    $(INSTALL_POLICYDIR)/limited/local_policy.jar
-	$(MKDIR) -p $(POLICY_DESTDIR)
-	$(RM) \
-	    $(POLICY_DESTDIR)/US_export_policy.jar		\
-	    $(POLICY_DESTDIR)/local_policy.jar
-	$(CP) $^ $(POLICY_DESTDIR)
-
-install-limited: install-limited-jars
-ifndef OPENJDK
-	$(release-warning)
-endif
-
-install-unlimited-jars: \
-	    $(INSTALL_POLICYDIR)/unlimited/US_export_policy.jar	\
-	    $(INSTALL_POLICYDIR)/unlimited/local_policy.jar 
-	$(MKDIR) -p $(POLICY_DESTDIR)
-	$(RM) \
-	    $(POLICY_DESTDIR)/US_export_policy.jar		\
-	    $(POLICY_DESTDIR)/local_policy.jar
-	$(CP) $^ $(POLICY_DESTDIR)
-
-install-unlimited: install-unlimited-jars
-ifndef OPENJDK
-	$(release-warning)
-endif
-
-ifndef OPENJDK
-install-prebuilt-jars:
-	@$(ECHO) "\n>>>Installing prebuilt JCE framework..."
-	$(RM) $(JAR_DESTFILE) \
-	    $(POLICY_DESTDIR)/US_export_policy.jar \
-	    $(POLICY_DESTDIR)/local_policy.jar
-	$(CP) $(PREBUILT_DIR)/jce/jce.jar $(JAR_DESTFILE)
-	$(CP) \
-	    $(PREBUILT_DIR)/jce/US_export_policy.jar \
-	    $(PREBUILT_DIR)/jce/local_policy.jar \
-	    $(POLICY_DESTDIR)
-
-install-prebuilt: install-prebuilt-jars
-endif
-
-# =====================================================
-# Support routines.
-#
-
-clobber clean::
-	$(RM) -r $(JAR_DESTFILE) $(POLICY_DESTDIR)/US_export_policy.jar \
-	    $(POLICY_DESTDIR)/local_policy.jar $(DELETE_DIRS) $(TEMPDIR) \
-	    $(JCE_BUILD_DIR)
-
-.PHONY: build-jar jar build-policy unlimited limited install-jar \
-	install-limited install-unlimited
-ifndef OPENJDK
-.PHONY: sign sign-jar sign-policy release install-prebuilt
-endif
--- a/jdk/makefiles/javax/crypto/policy/limited/LIMITED	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-Crypto-Strength: limited
--- a/jdk/makefiles/javax/crypto/policy/limited/default_local.policy	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-// Some countries have import limits on crypto strength. This policy file
-// is worldwide importable.
-
-grant {
-    permission javax.crypto.CryptoPermission "DES", 64;
-    permission javax.crypto.CryptoPermission "DESede", *;
-    permission javax.crypto.CryptoPermission "RC2", 128, 
-                                     "javax.crypto.spec.RC2ParameterSpec", 128;
-    permission javax.crypto.CryptoPermission "RC4", 128;
-    permission javax.crypto.CryptoPermission "RC5", 128, 
-          "javax.crypto.spec.RC5ParameterSpec", *, 12, *;
-    permission javax.crypto.CryptoPermission "RSA", *;
-    permission javax.crypto.CryptoPermission *, 128;
-};
--- a/jdk/makefiles/javax/crypto/policy/limited/exempt_local.policy	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-// Some countries have import limits on crypto strength. So this file
-// will be useful.
-
-grant {
-    // There is no restriction to any algorithms if KeyRecovery is enforced.
-    permission javax.crypto.CryptoPermission *, "KeyRecovery"; 
-
-    // There is no restriction to any algorithms if KeyEscrow is enforced.
-    permission javax.crypto.CryptoPermission *, "KeyEscrow"; 
-
-    // There is no restriction to any algorithms if KeyWeakening is enforced. 
-    permission javax.crypto.CryptoPermission *, "KeyWeakening";
-};
--- a/jdk/makefiles/javax/crypto/policy/unlimited/UNLIMITED	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-Crypto-Strength: unlimited
--- a/jdk/makefiles/javax/crypto/policy/unlimited/default_US_export.policy	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-// Manufacturing policy file.
-grant {
-    // There is no restriction to any algorithms.
-    permission javax.crypto.CryptoAllPermission; 
-};
--- a/jdk/makefiles/javax/crypto/policy/unlimited/default_local.policy	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-// Country-specific policy file for countries with no limits on crypto strength.
-grant {
-    // There is no restriction to any algorithms.
-    permission javax.crypto.CryptoAllPermission; 
-};
--- a/jdk/makefiles/mapfiles/libjava/mapfile-vers	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/mapfiles/libjava/mapfile-vers	Wed Jul 05 18:16:12 2017 +0200
@@ -232,7 +232,6 @@
 		Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2Ljava_security_AccessControlContext_2;
 		Java_java_security_AccessController_getStackAccessControlContext;
 		Java_java_security_AccessController_getInheritedAccessControlContext;
-		Java_java_sql_DriverManager_getCallerClassLoader;
 		Java_java_util_ResourceBundle_getClassContext;
 		Java_java_util_TimeZone_getSystemTimeZoneID;
 		Java_java_util_TimeZone_getSystemGMTOffsetID;
--- a/jdk/makefiles/mapfiles/libjfr/mapfile-vers	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/mapfiles/libjfr/mapfile-vers	Wed Jul 05 18:16:12 2017 +0200
@@ -6,34 +6,34 @@
 # Define library interface.
 
 SUNWprivate_1.1 {
-	global:
-	    Java_oracle_jrockit_jfr_util_os_Process_getpid;
-	    Java_oracle_jrockit_jfr_util_os_Timing_counterTime;
-	    Java_oracle_jrockit_jfr_util_os_Timing_init;
-	    Java_oracle_jrockit_jfr_util_log_NativeLogger_output0;
-	    Java_oracle_jrockit_jfr_VMJFR_isEnabled;
-	    Java_oracle_jrockit_jfr_VMJFR_options;
-	    Java_oracle_jrockit_jfr_VMJFR_init;
-	    Java_oracle_jrockit_jfr_VMJFR_addConstPool;
-	    Java_oracle_jrockit_jfr_VMJFR_removeConstPool;
-	    Java_oracle_jrockit_jfr_VMJFR_storeConstPool;
-	    Java_oracle_jrockit_jfr_VMJFR_classID;
-	    Java_oracle_jrockit_jfr_VMJFR_stackTraceID;
-	    Java_oracle_jrockit_jfr_VMJFR_threadID;
-	    Java_oracle_jrockit_jfr_VMJFR_rotate;
-	    Java_oracle_jrockit_jfr_VMJFR_shutdown;
-	    Java_oracle_jrockit_jfr_VMJFR_start;
-	    Java_oracle_jrockit_jfr_VMJFR_stop;
-	    Java_oracle_jrockit_jfr_VMJFR_buffer;
-	    Java_oracle_jrockit_jfr_VMJFR_flush;
-	    Java_oracle_jrockit_jfr_VMJFR_write;
-	    Java_oracle_jrockit_jfr_VMJFR_add;
-	    Java_oracle_jrockit_jfr_VMJFR_remove;
-	    Java_oracle_jrockit_jfr_VMJFR_setThreshold;
-	    Java_oracle_jrockit_jfr_VMJFR_setPeriod;
-	    Java_oracle_jrockit_jfr_VMJFR_getPeriod;
-	    Java_oracle_jrockit_jfr_VMJFR_descriptors;
+  global:
+      Java_oracle_jrockit_jfr_Process_getpid;
+      Java_oracle_jrockit_jfr_Timing_counterTime;
+      Java_oracle_jrockit_jfr_Timing_init;
+      Java_oracle_jrockit_jfr_NativeLogger_output0;
+      Java_oracle_jrockit_jfr_VMJFR_isEnabled;
+      Java_oracle_jrockit_jfr_VMJFR_options;
+      Java_oracle_jrockit_jfr_VMJFR_init;
+      Java_oracle_jrockit_jfr_VMJFR_addConstPool;
+      Java_oracle_jrockit_jfr_VMJFR_removeConstPool;
+      Java_oracle_jrockit_jfr_VMJFR_storeConstPool;
+      Java_oracle_jrockit_jfr_VMJFR_classID;
+      Java_oracle_jrockit_jfr_VMJFR_stackTraceID;
+      Java_oracle_jrockit_jfr_VMJFR_threadID;
+      Java_oracle_jrockit_jfr_VMJFR_rotate;
+      Java_oracle_jrockit_jfr_VMJFR_shutdown;
+      Java_oracle_jrockit_jfr_VMJFR_start;
+      Java_oracle_jrockit_jfr_VMJFR_stop;
+      Java_oracle_jrockit_jfr_VMJFR_buffer;
+      Java_oracle_jrockit_jfr_VMJFR_flush;
+      Java_oracle_jrockit_jfr_VMJFR_write;
+      Java_oracle_jrockit_jfr_VMJFR_add;
+      Java_oracle_jrockit_jfr_VMJFR_remove;
+      Java_oracle_jrockit_jfr_VMJFR_setThreshold;
+      Java_oracle_jrockit_jfr_VMJFR_setPeriod;
+      Java_oracle_jrockit_jfr_VMJFR_getPeriod;
+      Java_oracle_jrockit_jfr_VMJFR_descriptors;
             JNI_OnLoad;
-	local:
-	    *;
+  local:
+      *;
 };
--- a/jdk/makefiles/mapfiles/libnio/mapfile-linux	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/mapfiles/libnio/mapfile-linux	Wed Jul 05 18:16:12 2017 +0200
@@ -39,7 +39,6 @@
                 Java_sun_nio_ch_EPollArrayWrapper_epollCreate;
                 Java_sun_nio_ch_EPollArrayWrapper_epollCtl;
                 Java_sun_nio_ch_EPollArrayWrapper_epollWait;
-		Java_sun_nio_ch_EPollArrayWrapper_fdLimit;
 		Java_sun_nio_ch_EPollArrayWrapper_init;
 		Java_sun_nio_ch_EPollArrayWrapper_interrupt;
 		Java_sun_nio_ch_EPollArrayWrapper_offsetofData;
@@ -87,7 +86,9 @@
                 Java_sun_nio_ch_IOUtil_configureBlocking;
                 Java_sun_nio_ch_IOUtil_drain;
                 Java_sun_nio_ch_IOUtil_fdVal;
+		Java_sun_nio_ch_IOUtil_fdLimit;
                 Java_sun_nio_ch_IOUtil_initIDs;
+		Java_sun_nio_ch_IOUtil_iovMax;
                 Java_sun_nio_ch_IOUtil_makePipe;
                 Java_sun_nio_ch_IOUtil_randomBytes;
                 Java_sun_nio_ch_IOUtil_setfdVal;
--- a/jdk/makefiles/mapfiles/libnio/mapfile-solaris	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/makefiles/mapfiles/libnio/mapfile-solaris	Wed Jul 05 18:16:12 2017 +0200
@@ -36,7 +36,6 @@
                 Java_sun_nio_ch_DatagramDispatcher_readv0;
                 Java_sun_nio_ch_DatagramDispatcher_write0;
                 Java_sun_nio_ch_DatagramDispatcher_writev0;
-                Java_sun_nio_ch_DevPollArrayWrapper_fdLimit;
                 Java_sun_nio_ch_DevPollArrayWrapper_init;
                 Java_sun_nio_ch_DevPollArrayWrapper_interrupt;
                 Java_sun_nio_ch_DevPollArrayWrapper_poll0;
@@ -74,8 +73,10 @@
 		Java_sun_nio_ch_InheritedChannel_soType0;
                 Java_sun_nio_ch_IOUtil_configureBlocking;
                 Java_sun_nio_ch_IOUtil_drain;
+		Java_sun_nio_ch_IOUtil_fdLimit;
                 Java_sun_nio_ch_IOUtil_fdVal;
                 Java_sun_nio_ch_IOUtil_initIDs;
+		Java_sun_nio_ch_IOUtil_iovMax;
                 Java_sun_nio_ch_IOUtil_makePipe;
                 Java_sun_nio_ch_IOUtil_randomBytes;
                 Java_sun_nio_ch_IOUtil_setfdVal;
@@ -112,13 +113,13 @@
 		Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_accept0;
 		Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_initIDs;
 		Java_sun_nio_ch_UnixAsynchronousSocketChannelImpl_checkConnect;
-		Java_sun_nio_ch_SolarisEventPort_init;
-		Java_sun_nio_ch_SolarisEventPort_portCreate;
-		Java_sun_nio_ch_SolarisEventPort_portClose;
-		Java_sun_nio_ch_SolarisEventPort_portAssociate;
-		Java_sun_nio_ch_SolarisEventPort_portGet;
-		Java_sun_nio_ch_SolarisEventPort_portGetn;
-		Java_sun_nio_ch_SolarisEventPort_portSend;
+		Java_sun_nio_ch_SolarisEventPort_port_1create;
+		Java_sun_nio_ch_SolarisEventPort_port_1close;
+		Java_sun_nio_ch_SolarisEventPort_port_1associate;
+		Java_sun_nio_ch_SolarisEventPort_port_1dissociate;
+		Java_sun_nio_ch_SolarisEventPort_port_1get;
+		Java_sun_nio_ch_SolarisEventPort_port_1getn;
+		Java_sun_nio_ch_SolarisEventPort_port_1send;
 		Java_sun_nio_fs_GnomeFileTypeDetector_initializeGio;
 		Java_sun_nio_fs_GnomeFileTypeDetector_probeUsingGio;
 		Java_sun_nio_fs_GnomeFileTypeDetector_initializeGnomeVfs;
--- a/jdk/makefiles/mkdemo/Makefile	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-#
-# Copyright (c) 1997, 2011, 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.
-#
-
-#
-# Makefile for building all the demos
-#
-
-BUILDDIR = ..
-PRODUCT = demos
-include $(BUILDDIR)/common/Defs.gmk
-
-SUBDIRS            = jni
-SUBDIRS_desktop    = 
-SUBDIRS_management = 
-SUBDIRS_misc       = 
-SUBDIRS_tools      = jvmti
-
-include $(BUILDDIR)/common/Subdirs.gmk
-
-TOPLEVEL_FILES =							\
-	$(DEMODIR)/README
-
-all build:: nbproject
-	$(SUBDIRS-loop)
-
-all build:: $(TOPLEVEL_FILES)
-
-nbproject:
-	$(RM) -r $(DEMODIR)/nbproject
-	$(MKDIR) -p $(DEMODIR)
-	( $(CD) $(SHARE_SRC)/demo && $(TAR) -cf - \
-	  `$(FIND) nbproject $(SCM_DIRS_prune) -o -type f -print` ) | \
-	  ( $(CD) $(DEMODIR) && $(TAR) -xf - )
-ifndef OPENJDK
-	( $(CD) $(CLOSED_SHARE_SRC)/demo && $(TAR) -cf - \
-	  `$(FIND) nbproject $(SCM_DIRS_prune) -o -type f -print` ) | \
-	  ( $(CD) $(DEMODIR) && $(TAR) -xf - )
-endif
-
-$(DEMODIR)/%: $(DEMOSRCDIR)/%
-	$(install-file)
-
-clean clobber::
-	$(SUBDIRS-loop)
-	$(RM) -r $(DEMODIR)
-	$(RM) -r $(DEMOCLASSDIR)
--- a/jdk/makefiles/mkdemo/jni/Makefile	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-#
-# Copyright (c) 1999, 2010, 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.
-#
-
-#
-# Makefile for building the jni demo(s)
-#
-
-BUILDDIR = ../..
-PRODUCT = demos
-include $(BUILDDIR)/common/Defs.gmk
-
-SUBDIRS =
-
-ifeq ($(PLATFORM),solaris)
-  SUBDIRS += Poller
-endif
-
-include $(BUILDDIR)/common/Subdirs.gmk
-
-all build clean clobber::
-	$(SUBDIRS-loop)
-
--- a/jdk/makefiles/mkdemo/jni/Poller/Makefile	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-#
-# Copyright (c) 1999, 2006, 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.
-#
-
-#
-# Build Poller class demo.
-#
-
-BUILDDIR = ../../..
-PRODUCT = demo/jni
-DEMONAME = Poller
-include $(BUILDDIR)/common/Defs.gmk
-
-DEMO_ROOT       = $(PLATFORM_SRC)/demo/jni/$(DEMONAME)
-DEMO_TOPFILES   = ./README.txt
-DEMO_MAINCLASS  = Client
-DEMO_NATIVECLASS= $(DEMONAME)
-DEMO_DESTDIR    = $(DEMODIR)/jni/$(DEMONAME)
-
-#
-# Demo jar building rules.
-#
-include $(BUILDDIR)/common/Demo.gmk
-
--- a/jdk/makefiles/mkdemo/jvmti/Makefile	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-#
-# Copyright (c) 2004, 2011, 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.
-#
-
-#
-# Makefile for building the jvmti demo(s)
-#
-
-BUILDDIR = ../..
-PRODUCT = demos
-include $(BUILDDIR)/common/Defs.gmk
-
-# Can be built in any order, the JRE version of hprof and java_crw_demo are
-#   really built in make/java.
-#   The hprof target here just delivers the sources and README files.
-#   The java_crw_demo and agent_util files are copied into each demo that
-#   uses them.
-SUBDIRS = \
-	  hprof
-
-include $(BUILDDIR)/common/Subdirs.gmk
-
-all build clean clobber::
-	$(SUBDIRS-loop)
-
-all build :: $(DEMODIR)/jvmti/index.html
-
-$(DEMODIR)/jvmti/index.html: $(SHARE_SRC)/demo/jvmti/index.html
-	$(install-file)
-
--- a/jdk/makefiles/mkdemo/jvmti/README.txt	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 2004, 2010, 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.
-#
-
-Instructions on adding a jvmti demo agent.
-
-Basically you want to mimic the jvmti demo agent "mtrace".
-
-* Create and populate a source directory at src/share/demo/jvmti
-  (Try and re-use code in agent_util area like src/share/demo/jvmti/mtrace)
-  (This should include a small README.txt document on what this demo is)
-
-* Make sure the appropriate "demo" copyright notice is added to all the
-  source files.
-
-* Edit src/share/demo/jvmti/index.html and add in reference to this demo.
-
-* Create make directory at make/mkdemo/jvmti
-  (Mimic make/mkdemo/jvmti/mtrace/Makefile)
-
-* Edit make/mkdemo/jvmti/Makefile and add in the new demo
-
-* Create test directory at test/demo/jvmti, create at least one test
-  (Use test/demo/jvmti/mtrace as a template)
-
-* Don't forget to check in all the new files
-
-* Build and create images (cd make && gnumake && gnumake images)
-  (Do this on Solaris, Linux, and at least one Windows platform)
-
-* Verify that browsing build/*/j2sdk-images/demo/jvmti looks right
-
-* Run the tests: cd test/demo/jvmti && runregress .
-  (Do this on Solaris, Linux, and at least one Windows platform)
-
-Contact: serviceability-dev@openjdk.java.net for more information or help.
-
--- a/jdk/makefiles/mkdemo/jvmti/hprof/Makefile	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-#
-# Copyright (c) 2004, 2010, 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.
-#
-
-BUILDDIR = ../../..
-PRODUCT = demo/jvmti
-DEMONAME = hprof
-include $(BUILDDIR)/common/Defs.gmk
-
-DEMO_ROOT       = $(SHARE_SRC)/demo/jvmti/$(DEMONAME)
-DEMO_TOPFILES   = ./README.txt
-DEMO_PSRCDIR    = $(PLATFORM_SRC)/demo/jvmti/$(DEMONAME)
-DEMO_DESTDIR    = $(DEMODIR)/jvmti/$(DEMONAME)
-
-DEMO_OBJECTS    = java_crw_demo.$(OBJECT_SUFFIX)
-
-ifeq ($(PLATFORM), windows)
-  EXTRA_LIBS += wsock32.lib winmm.lib
-endif
-ifeq ($(PLATFORM), solaris)
-  OTHER_LDLIBS += $(LIBSOCKET) $(LIBNSL) -ldl
-endif
-ifeq ($(PLATFORM), linux)
-  OTHER_LDLIBS += $(LIBSOCKET) $(LIBNSL) -ldl -lpthread
-endif
-
-#
-# Demo jar building rules.
-#
-include $(BUILDDIR)/common/Demo.gmk
-
--- a/jdk/makefiles/mkdemo/jvmti/mapfile-vers	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-#
-# Copyright (c) 2004, 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.
-#
-
-# Define public interface for a Java JVMTI agent library (Solaris & Linux).
-
-SUNWprivate_1.1 {
-	global:
-	    Agent_OnLoad;
-	    Agent_OnUnload;
-	local:
-	    *;
-};
--- a/jdk/makefiles/mkdemo/management/README.txt	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-#
-# Copyright (c) 2004, 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.
-#
-
-Instructions on adding a java.lang.management demo.
-
-Basically you want to mimic the java.lang.management demo "FullThreadDump".
-
-* Create and populate a source directory at src/demo/management
-  (This should include a small README.txt document on what this demo is)
-
-* Make sure the appropriate "demo" copyright notice is added to all the
-  source files.
-
-* Edit src/share/demo/management/index.html and add in reference to this demo.
-
-* Create make directory at make/mkdemo/management
-  (Mimic make/mkdemo/management/FullThreadDump/Makefile)
-
-* Edit make/mkdemo/management/Makefile and add in the new demo
-
-* Create test directory at test/demo/management, create at least one test
-  (Use test/demo/management/FullThreadDump as a template)
-
-* Don't forget to put all files under SCM control
-
-* Build and create images (cd make && gnumake && gnumake images)
-  (Do this on Solaris, Linux, and at least one Windows platform)
-
-* Verify that browsing build/*/j2sdk-images/demo/management looks right
-
-* Run the tests: cd test/demo/management && runregress .
-  (Do this on Solaris, Linux, and at least one Windows platform)
-
-Contact: jk-svc-group@sun.com for more information or help.
-
--- a/jdk/makefiles/sun/jkernel/Makefile	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-#
-# Copyright (c) 2008, 2010, 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.
-#
-
-BUILDDIR = ../..
-MODULE  = jkernel
-PACKAGE = sun.jkernel
-LIBRARY = jkernel
-PRODUCT = sun
-
-include $(BUILDDIR)/common/Defs.gmk
-
-#
-# Use highest optimization level
-#
-_OPT = $(CC_HIGHEST_OPT)
-
-#
-# Java source files
-#
-include FILES_java.gmk
-AUTO_FILES_JAVA_DIRS = sun/jkernel
-
-LOCALE_SUFFIXES = $(JDK_LOCALES)
-
-#
-# Native source files
-#
-
-ifeq ($(ARCH_DATA_MODEL), 32) 
-
-ifeq ($(PLATFORM), windows)
-
-# If this is the VS Express compiler it will lack vc/atlmfc/
-ATL_MFC_DIR :=$(call DirExists,$(COMPILER_PATH)/../atlmfc,,)
-
-ifneq ($(ATL_MFC_DIR),)
-
-include FILES_c_windows.gmk
-
-vpath %.cpp   $(PLATFORM_SRC)/native/sun/jkernel
-
-
-VERSIONINFO_RESOURCE = $(PLATFORM_SRC)/native/sun/jkernel/kernel.rc
-
-LDLIBS += urlmon.lib wininet.lib shlwapi.lib version.lib comctl32.lib gdi32.lib -def:$(PLATFORM_SRC)/native/sun/jkernel/kernel.def
-
-include $(BUILDDIR)/common/Library.gmk
-
-endif
-
-endif
-
-endif
-
-#
-# Resources
-#
-include $(JDK_TOPDIR)/makefiles/common/internal/Resources.gmk
-
-#
-# Rules
-#
-include $(BUILDDIR)/common/Classes.gmk
-
-# If extra compression is going to be available in the deploy build enable 
-# its use here by defining the JRE-relative pathname of the shared library
-
-ifeq ($(PLATFORM), windows)
-  ifdef EXTRA_COMP_INSTALL_PATH
-    CPPFLAGS += -DEXTRA_COMP_INSTALL_PATH=$(EXTRA_COMP_INSTALL_PATH)
-  endif
-endif
--- a/jdk/makefiles/sun/security/ec/Makefile	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,333 +0,0 @@
-#
-# Copyright (c) 2009, 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.
-#
-
-#
-# Makefile for building sunec.jar and sunec native library.
-#
-# This file was derived from make/com/sun/crypto/provider/Makefile.
-#
-
-#
-# (The terms "OpenJDK" and "JDK" below refer to OpenJDK and Sun JDK builds
-# respectively.)
-#
-# JCE builds are very different between OpenJDK and JDK.  The OpenJDK JCE
-# jar files do not require signing, but those for JDK do.  If an unsigned
-# jar file is installed into JDK, things will break when the crypto
-# routines are called.
-#
-# This Makefile does the "real" build of the JCE files.  For OpenJDK,
-# the jar files built here are installed directly into the OpenJDK.
-#
-# For JDK, the binaries use pre-built/pre-signed binary files stored in
-# the closed workspace that are not shipped in the OpenJDK workspaces.
-# We still build the JDK files here to verify the files compile, and in
-# preparation for possible signing.  Developers working on JCE in JDK
-# must sign the JCE files before testing.  The JCE signing key is kept
-# separate from the JDK workspace to prevent its disclosure.
-#
-# SPECIAL NOTE TO JCE/JDK developers:  The source files must eventually
-# be built, signed, and then the resulting jar files MUST BE CHECKED
-# INTO THE CLOSED PART OF THE WORKSPACE*.  This separate step *MUST NOT
-# BE FORGOTTEN*, otherwise a bug fixed in the source code will not be
-# reflected in the shipped binaries.  The "release" target should be
-# used to generate the required files.
-#
-# There are a number of targets to help both JDK/OpenJDK developers.
-#
-# Main Targets (JDK/OPENJDK):
-#
-#     all/clobber/clean		The usual, plus the native libraries.
-#				    If OpenJDK, installs sunec.jar.
-#				    If JDK, installs prebuilt
-#				    sunec.jar.
-#
-#     jar			Builds/installs sunec.jar
-#				    If OpenJDK, does not sign.
-#				    If JDK, tries to sign.
-#
-# Other lesser-used Targets (JDK/OPENJDK):
-#
-#     build-jar			Builds sunec.jar
-#				    (does not sign/install)
-#
-#     install-jar		Alias for "jar" above.
-#
-# Other targets (JDK only):
-#
-#     sign			Alias for sign-jar
-#	  sign-jar		Builds/signs sunec.jar (no install)
-#
-#     release			Builds all targets in preparation
-#				for workspace integration.
-#
-#     install-prebuilt		Installs the pre-built jar files
-#
-# This makefile was written to support parallel target execution.
-#
-
-BUILDDIR = ../../..
-PACKAGE = sun.security.ec
-PRODUCT = sun
-
-#
-# The following is for when we need to do postprocessing
-# (signing) against a read-only build.  If the OUTPUTDIR
-# isn't writable, the build currently crashes out.
-#
-ifndef OPENJDK
-  ifdef ALT_JCE_BUILD_DIR
-    # =====================================================
-    # Where to place the output, in case we're building from a read-only
-    # build area.  (e.g. a release engineering build.)
-    JCE_BUILD_DIR=${ALT_JCE_BUILD_DIR}
-    IGNORE_WRITABLE_OUTPUTDIR_TEST=true
-  else
-    JCE_BUILD_DIR=${TEMPDIR}
-  endif
-endif
-
-JAVAC_MAX_WARNINGS=false
-JAVAC_LINT_OPTIONS=-Xlint:all,-deprecation
-JAVAC_WARNINGS_FATAL=true
-include $(BUILDDIR)/common/Defs.gmk
-
-#
-# Location for the newly built classfiles.
-#
-CLASSDESTDIR = $(TEMPDIR)/classes
-
-#
-# Java files
-#
-AUTO_FILES_JAVA_DIRS = $(PKGDIR)
-
-#
-# Exclude the sources that get built by ../other/Makefile
-#
-AUTO_JAVA_PRUNE = \
-    ECKeyFactory.java \
-    ECParameters.java \
-    ECPrivateKeyImpl.java \
-    ECPublicKeyImpl.java \
-    NamedCurve.java
-
-#
-# Some licensees do not get the native ECC sources, but we still need to
-# be able to build "all" for them.  Check here to see if the sources are
-# available.  If not, then skip them.
-#
-
-NATIVE_ECC_AVAILABLE := $(shell \
-    if [ -d $(SHARE_SRC)/native/$(PKGDIR)/impl ] ; then \
-	$(ECHO) true; \
-    else \
-	$(ECHO) false; \
-    fi)
-
-ifeq ($(NATIVE_ECC_AVAILABLE), true)
-
-  LIBRARY = sunec
-
-  #
-  # Java files that define native methods
-  #
-  FILES_export = \
-      $(PKGDIR)/ECDHKeyAgreement.java \
-      $(PKGDIR)/ECDSASignature.java \
-      $(PKGDIR)/ECKeyPairGenerator.java
-
-  JAVAHFLAGS = -bootclasspath \
-    "$(CLASSDESTDIR)$(CLASSPATH_SEPARATOR)$(CLASSBINDIR)$(JCE_PATH)"
-
-  #
-  # C and C++ files
-  #
-  include FILES_c.gmk
-
-  FILES_cpp = ECC_JNI.cpp
-
-  CPLUSPLUSLIBRARY=true
-
-  FILES_m = mapfile-vers
-
-  #
-  # Find native code
-  #
-  vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR)
-
-  vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/impl
-
-  #
-  # Find include files
-  #
-  OTHER_INCLUDES += -I$(SHARE_SRC)/native/$(PKGDIR)/impl
-
-  #
-  # Compiler flags
-  #
-  OTHER_CFLAGS += -DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B
-
-  #
-  # Libraries to link
-  #
-  ifneq ($(PLATFORM), windows)
-    OTHER_LDLIBS = $(LIBCXX)
-  endif
-
-  include $(BUILDDIR)/common/Mapfile-vers.gmk
-
-  include $(BUILDDIR)/common/Library.gmk
-
-else # NATIVE_ECC_AVAILABLE
-
-  include $(BUILDDIR)/common/Classes.gmk
-
-endif # NATIVE_ECC_AVAILABLE
-
-#
-# We use a variety of subdirectories in the $(TEMPDIR) depending on what
-# part of the build we're doing.  Both OPENJDK/JDK builds are initially
-# done in the unsigned area.  When files are signed in JDK,
-# they will be placed in the appropriate area.
-#
-UNSIGNED_DIR = $(TEMPDIR)/unsigned
-
-include $(BUILDDIR)/javax/crypto/Defs-jce.gmk
-
-#
-# Rules
-#
-
-ifdef OPENJDK
-all: build-jar install-jar
-else
-all: build-jar install-prebuilt
-	$(build-warning)
-endif
-
-
-# =====================================================
-# Build the unsigned sunec.jar file.
-#
-
-JAR_DESTFILE = $(EXTDIR)/sunec.jar
-
-#
-# Since the -C option to jar is used below, each directory entry must be
-# preceded with the appropriate directory to "cd" into.
-#
-JAR_DIRS = $(patsubst %, -C $(CLASSDESTDIR) %, $(AUTO_FILES_JAVA_DIRS))
-
-build-jar: $(UNSIGNED_DIR)/sunec.jar
-
-#
-# Build sunec.jar.
-#
-$(UNSIGNED_DIR)/sunec.jar: build
-	$(prep-target)
-	$(BOOT_JAR_CMD) cf $@ $(JAR_DIRS) \
-	    $(BOOT_JAR_JFLAGS)
-	@$(java-vm-cleanup)
-
-
-ifndef OPENJDK
-# =====================================================
-# Sign the provider jar file.  Not needed for OpenJDK.
-#
-
-SIGNED_DIR = $(JCE_BUILD_DIR)/signed
-
-sign: sign-jar
-
-sign-jar: $(SIGNED_DIR)/sunec.jar
-
-ifndef ALT_JCE_BUILD_DIR
-$(SIGNED_DIR)/sunec.jar: $(UNSIGNED_DIR)/sunec.jar
-else
-#
-# We have to remove the build dependency, otherwise, we'll try to rebuild it
-# which we can't do on a read-only filesystem.
-#
-$(SIGNED_DIR)/sunec.jar:
-	@if [ ! -r $(UNSIGNED_DIR)/sunec.jar ] ; then \
-	    $(ECHO) "Couldn't find $(UNSIGNED_DIR)/sunec.jar"; \
-	    exit 1; \
-	fi
-endif
-	$(call sign-file, $(UNSIGNED_DIR)/sunec.jar)
-
-
-# =====================================================
-# Create the Release Engineering files.  Signed builds, etc.
-#
-
-release: $(SIGNED_DIR)/sunec.jar
-	$(RM) $(JCE_BUILD_DIR)/release/sunec.jar
-	$(MKDIR) -p $(JCE_BUILD_DIR)/release
-	$(CP) $(SIGNED_DIR)/sunec.jar $(JCE_BUILD_DIR)/release
-	$(release-warning)
-
-endif # OPENJDK
-
-
-# =====================================================
-# Install routines.
-#
-
-#
-# Install sunec.jar, depending on which type is requested.
-#
-install-jar jar: $(JAR_DESTFILE)
-ifndef OPENJDK
-	$(release-warning)
-endif
-
-ifdef OPENJDK
-$(JAR_DESTFILE): $(UNSIGNED_DIR)/sunec.jar
-else
-$(JAR_DESTFILE): $(SIGNED_DIR)/sunec.jar
-endif
-	$(install-file)
-
-ifndef OPENJDK
-install-prebuilt:
-	@$(ECHO) "\n>>>Installing prebuilt SunEC provider..."
-	$(RM) $(JAR_DESTFILE)
-	$(CP) $(PREBUILT_DIR)/ec/sunec.jar $(JAR_DESTFILE)
-endif
-
-
-# =====================================================
-# Support routines.
-#
-
-clobber clean::
-	$(RM) -r $(JAR_DESTFILE) $(TEMPDIR) $(JCE_BUILD_DIR)
-
-.PHONY: build-jar jar install-jar
-ifndef OPENJDK
-.PHONY: sign sign-jar release install-prebuilt
-endif
--- a/jdk/makefiles/sun/security/pkcs11/FILES_c.gmk	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-#
-# Copyright (c) 2003, 2007, 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.
-#
-
-FILES_c = \
-	j2secmod.c \
-	j2secmod_md.c \
-	p11_convert.c \
-	p11_crypt.c \
-	p11_digest.c \
-	p11_dual.c \
-	p11_general.c \
-	p11_keymgmt.c \
-	p11_mutex.c \
-	p11_objmgmt.c \
-	p11_sessmgmt.c \
-	p11_sign.c \
-	p11_util.c \
-	p11_md.c
-
--- a/jdk/makefiles/sun/security/pkcs11/Makefile	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,313 +0,0 @@
-#
-# Copyright (c) 2003, 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.
-#
-
-#
-# Makefile for building sunpkcs11.jar and native libraries.
-#
-# This file was derived from make/com/sun/crypto/provider/Makefile.
-#
-
-#
-# (The terms "OpenJDK" and "JDK" below refer to OpenJDK and Sun JDK builds
-# respectively.)
-#
-# JCE builds are very different between OpenJDK and JDK.  The OpenJDK JCE
-# jar files do not require signing, but those for JDK do.  If an unsigned
-# jar file is installed into JDK, things will break when the crypto
-# routines are called.
-#
-# This Makefile does the "real" build of the JCE files.  For OpenJDK,
-# the jar files built here are installed directly into the OpenJDK.
-#
-# For JDK, the binaries use pre-built/pre-signed binary files stored in
-# the closed workspace that are not shipped in the OpenJDK workspaces.
-# We still build the JDK files here to verify the files compile, and in
-# preparation for possible signing.  Developers working on JCE in JDK
-# must sign the JCE files before testing.  The JCE signing key is kept
-# separate from the JDK workspace to prevent its disclosure.
-#
-# SPECIAL NOTE TO JCE/JDK developers:  The source files must eventually
-# be built, signed, and then the resulting jar files MUST BE CHECKED
-# INTO THE CLOSED PART OF THE WORKSPACE*.  This separate step *MUST NOT
-# BE FORGOTTEN*, otherwise a bug fixed in the source code will not be
-# reflected in the shipped binaries.  The "release" target should be
-# used to generate the required files.
-#
-# There are a number of targets to help both JDK/OpenJDK developers.
-#
-# Main Targets (JDK/OPENJDK):
-#
-#     all/clobber/clean        The usual, plus the native libraries.
-#                                  If OpenJDK, installs sunpkcs11.jar.
-#                                  If JDK, installs prebuilt
-#                                      sunpkcs11.jar.
-#
-#     jar                      Builds/installs sunpkcs11.jar
-#                                  If OpenJDK, does not sign.
-#                                  If JDK, tries to sign.
-#
-# Other lesser-used Targets (JDK/OPENJDK):
-#
-#     build-jar                Builds sunpkcs11.jar
-#                                  (does not sign/install)
-#
-#     install-jar              Alias for "jar" above.
-#
-# Other targets (JDK only):
-#
-#     sign                     Alias for sign-jar
-#          sign-jar            Builds/signs sunpkcs11.jar (no install)
-#
-#     release                  Builds all targets in preparation
-#                              for workspace integration.
-#
-#     install-prebuilt         Installs the pre-built jar files
-#
-# This makefile was written to support parallel target execution.
-#
-
-BUILDDIR = ../../..
-PACKAGE = sun.security.pkcs11
-LIBRARY = j2pkcs11
-PRODUCT = sun
-
-#
-# The following is for when we need to do postprocessing
-# (signing/obfuscation) against a read-only build.  If the OUTPUTDIR
-# isn't writable, the build currently crashes out.
-#
-ifndef OPENJDK
-  ifdef ALT_JCE_BUILD_DIR
-    # =====================================================
-    # Where to place the output, in case we're building from a read-only
-    # build area.  (e.g. a release engineering build.)
-    JCE_BUILD_DIR=${ALT_JCE_BUILD_DIR}
-    IGNORE_WRITABLE_OUTPUTDIR_TEST=true
-  else
-    JCE_BUILD_DIR=${TEMPDIR}
-  endif
-endif
-
-JAVAC_MAX_WARNINGS=false
-JAVAC_LINT_OPTIONS=-Xlint:all,-deprecation
-JAVAC_WARNINGS_FATAL=true
-include $(BUILDDIR)/common/Defs.gmk
-
-#
-# C and Java Files
-#
-include FILES_c.gmk
-
-#
-# Subdirectories of these are automatically included.
-#
-AUTO_FILES_JAVA_DIRS = sun/security/pkcs11
-
-#
-# Java files that define native methods
-#
-FILES_export = \
-    sun/security/pkcs11/wrapper/PKCS11.java \
-    sun/security/pkcs11/Secmod.java
-
-#
-# Find native code
-#
-vpath %.c \
-  $(SHARE_SRC)/native/sun/security/pkcs11/wrapper \
-  $(PLATFORM_SRC)/native/sun/security/pkcs11/wrapper \
-
-#
-# Find include files
-#
-OTHER_INCLUDES += \
-  -I$(SHARE_SRC)/native/sun/security/pkcs11/wrapper \
-  -I$(PLATFORM_SRC)/native/sun/security/pkcs11/wrapper
-
-#
-# Rules
-#
-CLASSDESTDIR = $(TEMPDIR)/classes
-JAVAHFLAGS = -bootclasspath \
-  "$(CLASSDESTDIR)$(CLASSPATH_SEPARATOR)$(CLASSBINDIR)$(JCE_PATH)"
-
-include $(BUILDDIR)/common/Mapfile-vers.gmk
-
-include $(BUILDDIR)/common/Library.gmk
-
-#
-# Libraries to link
-#
-ifneq ($(PLATFORM), windows)
-  OTHER_LDLIBS = $(LIBDL)
-endif
-
-# Other config files
-SUNPKCS11_CFG   =
-
-ifeq ($(PLATFORM), solaris)
-#SUNPKCS11_CFG   = sunpkcs11-cfg
-endif # PLATFORM
-
-SUNPKCS11_CFG_SRC   = $(TOPDIR)/src/share/lib/security/sunpkcs11-solaris.cfg
-SUNPKCS11_CFG_BUILD = $(LIBDIR)/security/sunpkcs11-solaris.cfg
-
-#
-# We use a variety of subdirectories in the $(TEMPDIR) depending on what
-# part of the build we're doing.  Both OPENJDK/JDK builds are initially
-# done in the unsigned area.  When files are signed in JDK,
-# they will be placed in the appropriate area.
-#
-UNSIGNED_DIR = $(TEMPDIR)/unsigned
-
-#
-# Rules
-#
-
-ifdef OPENJDK
-all: $(SUNPKCS11_CFG) build-jar install-jar
-else
-all: $(SUNPKCS11_CFG) build-jar install-prebuilt
-	$(build-warning)
-endif
-
-sunpkcs11-cfg: $(SUNPKCS11_CFG_BUILD)
-
-$(SUNPKCS11_CFG_BUILD): $(SUNPKCS11_CFG_SRC)
-	$(install-file)
-
-include $(BUILDDIR)/javax/crypto/Defs-jce.gmk
-
-
-# =====================================================
-# Build the unsigned sunpkcs11.jar file.
-#
-
-JAR_DESTFILE = $(EXTDIR)/sunpkcs11.jar
-
-#
-# The sunpkcs11.jar needs to be in the extension class directory,
-# therefore none of its classes can appear in $(CLASSBINDIR). 
-# Currently no one is using any of the PKCS11 internals, so these files
-# should not have been built.
-#
-
-#
-# Since the -C option to jar is used below, each directory entry must be
-# preceded with the appropriate directory to "cd" into.
-#
-JAR_DIRS = $(patsubst %, -C $(CLASSDESTDIR) %, $(AUTO_FILES_JAVA_DIRS))
-
-build-jar: $(UNSIGNED_DIR)/sunpkcs11.jar
-
-#
-# Build sunpkcs11.jar.
-#
-$(UNSIGNED_DIR)/sunpkcs11.jar: build
-	$(prep-target)
-	$(BOOT_JAR_CMD) cf $@ $(JAR_DIRS) \
-	    $(BOOT_JAR_JFLAGS)
-	@$(java-vm-cleanup)
-
-
-ifndef OPENJDK
-# =====================================================
-# Sign the provider jar file.  Not needed for OpenJDK.
-#
-
-SIGNED_DIR = $(JCE_BUILD_DIR)/signed
-
-sign: sign-jar
-
-sign-jar: $(SIGNED_DIR)/sunpkcs11.jar
-
-ifndef ALT_JCE_BUILD_DIR
-$(SIGNED_DIR)/sunpkcs11.jar: $(UNSIGNED_DIR)/sunpkcs11.jar
-else
-#
-# We have to remove the build dependency, otherwise, we'll try to rebuild it
-# which we can't do on a read-only filesystem.
-#
-$(SIGNED_DIR)/sunpkcs11.jar:
-	@if [ ! -r $(UNSIGNED_DIR)/sunpkcs11.jar ] ; then \
-            $(ECHO) "Couldn't find $(UNSIGNED_DIR)/sunpkcs11.jar"; \
-            exit 1; \
-        fi
-endif
-	$(call sign-file, $(UNSIGNED_DIR)/sunpkcs11.jar)
-
-
-# =====================================================
-# Create the Release Engineering files.  Signed builds, etc.
-#
-
-release: $(SIGNED_DIR)/sunpkcs11.jar
-	$(RM) $(JCE_BUILD_DIR)/release/sunpkcs11.jar
-	$(MKDIR) -p $(JCE_BUILD_DIR)/release
-	$(CP) $(SIGNED_DIR)/sunpkcs11.jar $(JCE_BUILD_DIR)/release
-	$(release-warning)
-
-endif # OPENJDK
-
-
-# =====================================================
-# Install routines.
-#
-
-#
-# Install sunpkcs11.jar, depending on which type is requested.
-#
-install-jar jar: $(JAR_DESTFILE)
-ifndef OPENJDK
-	$(release-warning)
-endif
-
-ifdef OPENJDK
-$(JAR_DESTFILE): $(UNSIGNED_DIR)/sunpkcs11.jar
-else
-$(JAR_DESTFILE): $(SIGNED_DIR)/sunpkcs11.jar
-endif
-	$(install-file)
-
-ifndef OPENJDK
-install-prebuilt:
-	@$(ECHO) "\n>>>Installing prebuilt SunPKCS11 provider..."
-	$(RM) $(JAR_DESTFILE)
-	$(CP) $(PREBUILT_DIR)/pkcs11/sunpkcs11.jar $(JAR_DESTFILE)
-endif
-
-
-# =====================================================
-# Support routines.
-#
-
-clobber clean::
-	$(RM) -r $(JAR_DESTFILE) $(TEMPDIR) $(JCE_BUILD_DIR)
-	$(RM) $(SUNPKCS11_CFG_BUILD) 
-
-.PHONY: build-jar jar install-jar
-ifndef OPENJDK
-.PHONY: sign sign-jar release install-prebuilt
-endif
--- a/jdk/makefiles/sun/security/pkcs11/mapfile-vers	Wed Jul 05 18:15:28 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-#
-# Copyright (c) 2003, 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.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-	global:
-		JNI_OnLoad;
-		Java_sun_security_pkcs11_wrapper_PKCS11_initializeLibrary;
-		Java_sun_security_pkcs11_wrapper_PKCS11_finalizeLibrary;
-		Java_sun_security_pkcs11_wrapper_PKCS11_connect;
-		Java_sun_security_pkcs11_wrapper_PKCS11_disconnect;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1Initialize;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1Finalize;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetInfo;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetSlotList;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetSlotInfo;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetTokenInfo;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetMechanismList;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetMechanismInfo;
-#		Java_sun_security_pkcs11_wrapper_PKCS11_C_1InitToken;
-#		Java_sun_security_pkcs11_wrapper_PKCS11_C_1InitPIN;
-#		Java_sun_security_pkcs11_wrapper_PKCS11_C_1SetPIN;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1OpenSession;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1CloseSession;
-#		Java_sun_security_pkcs11_wrapper_PKCS11_C_1CloseAllSessions;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetSessionInfo;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetOperationState;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1SetOperationState;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1Login;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1Logout;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1CreateObject;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1CopyObject;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DestroyObject;
-#		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetObjectSize;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetAttributeValue;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1SetAttributeValue;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1FindObjectsInit;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1FindObjects;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1FindObjectsFinal;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1EncryptInit;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1Encrypt;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1EncryptUpdate;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1EncryptFinal;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DecryptInit;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1Decrypt;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DecryptUpdate;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DecryptFinal;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DigestInit;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DigestSingle;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DigestUpdate;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DigestKey;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DigestFinal;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1SignInit;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1Sign;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1SignUpdate;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1SignFinal;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1SignRecoverInit;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1SignRecover;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1VerifyInit;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1Verify;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1VerifyUpdate;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1VerifyFinal;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1VerifyRecoverInit;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1VerifyRecover;
-#		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DigestEncryptUpdate;
-#		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DecryptDigestUpdate;
-#		Java_sun_security_pkcs11_wrapper_PKCS11_C_1SignEncryptUpdate;
-#		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DecryptVerifyUpdate;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GenerateKey;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GenerateKeyPair;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1WrapKey;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1UnwrapKey;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1DeriveKey;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1SeedRandom;
-		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GenerateRandom;
-#		Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetFunctionStatus;
-#		Java_sun_security_pkcs11_wrapper_PKCS11_C_1CancelFunction;
-#		Java_sun_security_pkcs11_wrapper_PKCS11_C_1WaitForSlotEvent;
-		Java_sun_security_pkcs11_Secmod_nssGetLibraryHandle;
-		Java_sun_security_pkcs11_Secmod_nssLoadLibrary;
-		Java_sun_security_pkcs11_Secmod_nssVersionCheck;
-		Java_sun_security_pkcs11_Secmod_nssInit;
-		Java_sun_security_pkcs11_Secmod_nssGetModuleList;
-
-	local:
-		*;
-};
--- a/jdk/src/macosx/classes/sun/awt/CGraphicsEnvironment.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/classes/sun/awt/CGraphicsEnvironment.java	Wed Jul 05 18:16:12 2017 +0200
@@ -200,29 +200,25 @@
        return true;
     }
 
-    private Font[] allFontsWithLogical;
     static String[] sLogicalFonts = { "Serif", "SansSerif", "Monospaced", "Dialog", "DialogInput" };
 
     @Override
     public Font[] getAllFonts() {
-        if (allFontsWithLogical == null)
-        {
-            Font[] newFonts;
-            Font[] superFonts = super.getAllFonts();
 
-            int numLogical = sLogicalFonts.length;
-            int numOtherFonts = superFonts.length;
+        Font[] newFonts;
+        Font[] superFonts = super.getAllFonts();
+
+        int numLogical = sLogicalFonts.length;
+        int numOtherFonts = superFonts.length;
 
-            newFonts = new Font[numOtherFonts + numLogical];
-            System.arraycopy(superFonts,0,newFonts,numLogical,numOtherFonts);
+        newFonts = new Font[numOtherFonts + numLogical];
+        System.arraycopy(superFonts,0,newFonts,numLogical,numOtherFonts);
 
-            for (int i = 0; i < numLogical; i++)
-            {
-                newFonts[i] = new Font(sLogicalFonts[i], Font.PLAIN, 1);
-            }
-            allFontsWithLogical = newFonts;
+        for (int i = 0; i < numLogical; i++)
+        {
+            newFonts[i] = new Font(sLogicalFonts[i], Font.PLAIN, 1);
         }
-        return java.util.Arrays.copyOf(allFontsWithLogical, allFontsWithLogical.length);
+        return newFonts;
     }
 
 }
--- a/jdk/src/macosx/classes/sun/lwawt/LWButtonPeer.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/classes/sun/lwawt/LWButtonPeer.java	Wed Jul 05 18:16:12 2017 +0200
@@ -47,8 +47,8 @@
     }
 
     @Override
-    public void initialize() {
-        super.initialize();
+    void initializeImpl() {
+        super.initializeImpl();
         setLabel(getTarget().getLabel());
         synchronized (getDelegateLock()) {
             getDelegate().addActionListener(this);
--- a/jdk/src/macosx/classes/sun/lwawt/LWCheckboxPeer.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/classes/sun/lwawt/LWCheckboxPeer.java	Wed Jul 05 18:16:12 2017 +0200
@@ -61,8 +61,8 @@
     }
 
     @Override
-    public void initialize() {
-        super.initialize();
+    void initializeImpl() {
+        super.initializeImpl();
         setLabel(getTarget().getLabel());
         setState(getTarget().getState());
         setCheckboxGroup(getTarget().getCheckboxGroup());
--- a/jdk/src/macosx/classes/sun/lwawt/LWChoicePeer.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/classes/sun/lwawt/LWChoicePeer.java	Wed Jul 05 18:16:12 2017 +0200
@@ -55,8 +55,8 @@
     }
 
     @Override
-    public void initialize() {
-        super.initialize();
+    void initializeImpl() {
+        super.initializeImpl();
         final Choice choice = getTarget();
         final JComboBox<String> combo = getDelegate();
         synchronized (getDelegateLock()) {
--- a/jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java	Wed Jul 05 18:16:12 2017 +0200
@@ -81,19 +81,10 @@
     // lock is not used as there are many peers related ops
     // to be done on the toolkit thread, and we don't want to
     // depend on a public lock on this thread
-    private final static Object peerTreeLock =
+    private static final Object peerTreeLock =
             new StringBuilder("LWComponentPeer.peerTreeLock");
 
-    /**
-     * A custom tree-lock used for the hierarchy of the delegate Swing
-     * components.
-     * The lock synchronizes access to the delegate
-     * internal state. Think of it as a 'virtual EDT'.
-     */
-//    private final Object delegateTreeLock =
-//        new StringBuilder("LWComponentPeer.delegateTreeLock");
-
-    private T target;
+    private final T target;
 
     // Container peer. It may not be the peer of the target's direct
     // parent, for example, in the case of hw/lw mixing. However,
@@ -108,10 +99,10 @@
     // be updated when the component is reparented to another container
     private LWWindowPeer windowPeer;
 
-    private AtomicBoolean disposed = new AtomicBoolean(false);
+    private final AtomicBoolean disposed = new AtomicBoolean(false);
 
     // Bounds are relative to parent peer
-    private Rectangle bounds = new Rectangle();
+    private final Rectangle bounds = new Rectangle();
     private Region region;
 
     // Component state. Should be accessed under the state lock
@@ -122,9 +113,11 @@
     private Color foreground;
     private Font font;
 
-    // Paint area to coalesce all the paint events and store
-    // the target dirty area
-    private RepaintArea targetPaintArea;
+    /**
+     * Paint area to coalesce all the paint events and store the target dirty
+     * area.
+     */
+    private final RepaintArea targetPaintArea;
 
     //   private volatile boolean paintPending;
     private volatile boolean isLayouting;
@@ -137,7 +130,7 @@
     private int fNumDropTargets = 0;
     private CDropTarget fDropTarget = null;
 
-    private PlatformComponent platformComponent;
+    private final PlatformComponent platformComponent;
 
     private final class DelegateContainer extends Container {
         {
@@ -175,6 +168,7 @@
     }
 
     public LWComponentPeer(T target, PlatformComponent platformComponent) {
+        targetPaintArea = new LWRepaintArea();
         this.target = target;
         this.platformComponent = platformComponent;
 
@@ -201,10 +195,13 @@
                 synchronized (getDelegateLock()) {
                     delegate = createDelegate();
                     if (delegate != null) {
+                        delegate.setVisible(false);
                         delegateContainer = new DelegateContainer();
                         delegateContainer.add(delegate);
                         delegateContainer.addNotify();
                         delegate.addNotify();
+                        resetColorsAndFont(delegate);
+                        delegate.setOpaque(true);
                     } else {
                         return;
                     }
@@ -278,27 +275,28 @@
         return getDelegate();
     }
 
-    /*
-     * Initializes this peer by fetching all the properties from the target.
-     * The call to initialize() is not placed to LWComponentPeer ctor to
-     * let the subclass ctor to finish completely first. Instead, it's the
-     * LWToolkit object who is responsible for initialization.
+    /**
+     * Initializes this peer. The call to initialize() is not placed to
+     * LWComponentPeer ctor to let the subclass ctor to finish completely first.
+     * Instead, it's the LWToolkit object who is responsible for initialization.
+     * Note that we call setVisible() at the end of initialization.
      */
-    public void initialize() {
+    public final void initialize() {
         platformComponent.initialize(target, this, getPlatformWindow());
-        targetPaintArea = new LWRepaintArea();
-        if (getDelegate() != null) {
-            synchronized (getDelegateLock()) {
-                resetColorsAndFont(delegate);
-                getDelegate().setOpaque(true);
-            }
-        }
+        initializeImpl();
+        setVisible(target.isVisible());
+    }
+
+    /**
+     * Fetching general properties from the target. Should be overridden in
+     * subclasses to initialize specific peers properties.
+     */
+    void initializeImpl() {
         setBackground(target.getBackground());
         setForeground(target.getForeground());
         setFont(target.getFont());
         setBounds(target.getBounds());
         setEnabled(target.isEnabled());
-        setVisible(target.isVisible());
     }
 
     private static void resetColorsAndFont(final Container c) {
@@ -314,15 +312,18 @@
         return stateLock;
     }
 
-    // Synchronize all operations with the Swing delegates under
-    // AWT tree lock, using a new separate lock to synchronize
-    // access to delegates may lead deadlocks
+    /**
+     * Synchronize all operations with the Swing delegates under AWT tree lock,
+     * using a new separate lock to synchronize access to delegates may lead
+     * deadlocks. Think of it as a 'virtual EDT'.
+     *
+     * @return DelegateLock
+     */
     final Object getDelegateLock() {
-        //return delegateTreeLock;
         return getTarget().getTreeLock();
     }
 
-    protected final static Object getPeerTreeLock() {
+    protected static final Object getPeerTreeLock() {
         return peerTreeLock;
     }
 
@@ -758,14 +759,17 @@
     }
 
     @Override
-    public void setVisible(boolean v) {
+    public void setVisible(final boolean v) {
         synchronized (getStateLock()) {
             if (visible == v) {
                 return;
             }
             visible = v;
         }
+        setVisibleImpl(v);
+    }
 
+    protected void setVisibleImpl(final boolean v) {
         final D delegate = getDelegate();
 
         if (delegate != null) {
@@ -1355,7 +1359,7 @@
      *
      * @see #isVisible()
      */
-    protected boolean isShowing() {
+    protected final boolean isShowing() {
         synchronized (getPeerTreeLock()) {
             if (isVisible()) {
                 final LWContainerPeer container = getContainerPeer();
--- a/jdk/src/macosx/classes/sun/lwawt/LWLabelPeer.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/classes/sun/lwawt/LWLabelPeer.java	Wed Jul 05 18:16:12 2017 +0200
@@ -60,8 +60,8 @@
     }
 
     @Override
-    public void initialize() {
-        super.initialize();
+    void initializeImpl() {
+        super.initializeImpl();
         setText(getTarget().getText());
         setAlignment(getTarget().getAlignment());
     }
--- a/jdk/src/macosx/classes/sun/lwawt/LWListPeer.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/classes/sun/lwawt/LWListPeer.java	Wed Jul 05 18:16:12 2017 +0200
@@ -49,8 +49,8 @@
     }
 
     @Override
-    public void initialize() {
-        super.initialize();
+    void initializeImpl() {
+        super.initializeImpl();
         setMultipleMode(getTarget().isMultipleMode());
         final int[] selectedIndices = getTarget().getSelectedIndexes();
         synchronized (getDelegateLock()) {
--- a/jdk/src/macosx/classes/sun/lwawt/LWScrollBarPeer.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/classes/sun/lwawt/LWScrollBarPeer.java	Wed Jul 05 18:16:12 2017 +0200
@@ -54,8 +54,8 @@
     }
 
     @Override
-    public void initialize() {
-        super.initialize();
+    void initializeImpl() {
+        super.initializeImpl();
         final Scrollbar target = getTarget();
         setValues(target.getValue(), target.getVisibleAmount(),
                   target.getMinimum(), target.getMaximum());
--- a/jdk/src/macosx/classes/sun/lwawt/LWScrollPanePeer.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/classes/sun/lwawt/LWScrollPanePeer.java	Wed Jul 05 18:16:12 2017 +0200
@@ -70,8 +70,8 @@
     }
 
     @Override
-    public void initialize() {
-        super.initialize();
+    void initializeImpl() {
+        super.initializeImpl();
         final int policy = getTarget().getScrollbarDisplayPolicy();
         synchronized (getDelegateLock()) {
             getDelegate().getViewport().setScrollMode(JViewport.SIMPLE_SCROLL_MODE);
--- a/jdk/src/macosx/classes/sun/lwawt/LWTextAreaPeer.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/classes/sun/lwawt/LWTextAreaPeer.java	Wed Jul 05 18:16:12 2017 +0200
@@ -59,8 +59,8 @@
     }
 
     @Override
-    public void initialize() {
-        super.initialize();
+    void initializeImpl() {
+        super.initializeImpl();
         final int visibility = getTarget().getScrollbarVisibility();
         synchronized (getDelegateLock()) {
             setScrollBarVisibility(visibility);
--- a/jdk/src/macosx/classes/sun/lwawt/LWTextComponentPeer.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/classes/sun/lwawt/LWTextComponentPeer.java	Wed Jul 05 18:16:12 2017 +0200
@@ -63,8 +63,8 @@
     }
 
     @Override
-    public void initialize() {
-        super.initialize();
+    void initializeImpl() {
+        super.initializeImpl();
         synchronized (getDelegateLock()) {
             // This listener should be added before setText().
             getTextComponent().getDocument().addDocumentListener(this);
--- a/jdk/src/macosx/classes/sun/lwawt/LWTextFieldPeer.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/classes/sun/lwawt/LWTextFieldPeer.java	Wed Jul 05 18:16:12 2017 +0200
@@ -58,8 +58,8 @@
     }
 
     @Override
-    public void initialize() {
-        super.initialize();
+    void initializeImpl() {
+        super.initializeImpl();
         setEchoChar(getTarget().getEchoChar());
         synchronized (getDelegateLock()) {
             getDelegate().addActionListener(this);
--- a/jdk/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Wed Jul 05 18:16:12 2017 +0200
@@ -145,8 +145,6 @@
             // similar to what Apple's Java do.
             // Since JDK7 we should rely on setOpacity() only.
             // this.opacity = c.getAlpha();
-            // System.out.println("Delegate assigns alpha (we ignore setOpacity()):"
-            // +this.opacity);
         }
 
         if (!target.isForegroundSet()) {
@@ -159,23 +157,29 @@
     }
 
     @Override
-    public void initialize() {
+    void initializeImpl() {
+        super.initializeImpl();
         if (getTarget() instanceof Frame) {
-            setTitle(((Frame)getTarget()).getTitle());
-            setState(((Frame)getTarget()).getExtendedState());
+            setTitle(((Frame) getTarget()).getTitle());
+            setState(((Frame) getTarget()).getExtendedState());
         } else if (getTarget() instanceof Dialog) {
-            setTitle(((Dialog)getTarget()).getTitle());
+            setTitle(((Dialog) getTarget()).getTitle());
         }
 
         setAlwaysOnTop(getTarget().isAlwaysOnTop());
         updateMinimumSize();
 
-        setOpacity(getTarget().getOpacity());
+        final float opacity = getTarget().getOpacity();
+        if (opacity < 1.0f) {
+            setOpacity(opacity);
+        }
+
         setOpaque(getTarget().isOpaque());
 
-        super.initialize();
-
         updateInsets(platformWindow.getInsets());
+        if (getSurfaceData() == null) {
+            replaceSurfaceData();
+        }
     }
 
     // Just a helper method
@@ -213,50 +217,29 @@
     }
 
     @Override
-    public void setVisible(final boolean visible) {
-        if (getSurfaceData() == null) {
-            replaceSurfaceData();
-        }
-
-        if (isVisible() == visible) {
-            return;
-        }
-        super.setVisible(visible);
-
+    protected void setVisibleImpl(final boolean visible) {
+        super.setVisibleImpl(visible);
         // TODO: update graphicsConfig, see 4868278
-        // TODO: don't notify the delegate if our visibility is unchanged
+        platformWindow.setVisible(visible);
+        if (isSimpleWindow()) {
+            LWKeyboardFocusManagerPeer manager = LWKeyboardFocusManagerPeer.
+                getInstance(getAppContext());
 
-        // it is important to call this method on EDT
-        // to prevent the deadlocks during the painting of the lightweight delegates
-        //TODO: WHY? This is a native-system related call. Perhaps NOT calling
-        // the painting procedure right from the setVisible(), but rather relying
-        // on the native Expose event (or, scheduling the repainting asynchronously)
-        // is better?
-        SwingUtilities.invokeLater(new Runnable() {
-            @Override
-            public void run() {
-                platformWindow.setVisible(visible);
-                if (isSimpleWindow()) {
-                    LWKeyboardFocusManagerPeer manager = LWKeyboardFocusManagerPeer.
-                        getInstance(getAppContext());
-
-                    if (visible) {
-                        if (!getTarget().isAutoRequestFocus()) {
-                            return;
-                        } else {
-                            requestWindowFocus(CausedFocusEvent.Cause.ACTIVATION);
-                        }
-                    // Focus the owner in case this window is focused.
-                    } else if (manager.getCurrentFocusedWindow() == getTarget()) {
-                        // Transfer focus to the owner.
-                        LWWindowPeer owner = getOwnerFrameDialog(LWWindowPeer.this);
-                        if (owner != null) {
-                            owner.requestWindowFocus(CausedFocusEvent.Cause.ACTIVATION);
-                        }
-                    }
+            if (visible) {
+                if (!getTarget().isAutoRequestFocus()) {
+                    return;
+                } else {
+                    requestWindowFocus(CausedFocusEvent.Cause.ACTIVATION);
+                }
+            // Focus the owner in case this window is focused.
+            } else if (manager.getCurrentFocusedWindow() == getTarget()) {
+                // Transfer focus to the owner.
+                LWWindowPeer owner = getOwnerFrameDialog(LWWindowPeer.this);
+                if (owner != null) {
+                    owner.requestWindowFocus(CausedFocusEvent.Cause.ACTIVATION);
                 }
             }
-        });
+        }
     }
 
     @Override
@@ -983,6 +966,9 @@
                 try {
                     Rectangle r = getBounds();
                     g.setColor(getBackground());
+                    if (g instanceof Graphics2D) {
+                        ((Graphics2D) g).setComposite(AlphaComposite.Src);
+                    }
                     g.fillRect(0, 0, r.width, r.height);
                     if (oldBB != null) {
                         // Draw the old back buffer to the new one
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Wed Jul 05 18:16:12 2017 +0200
@@ -56,7 +56,6 @@
     private static native void nativePushNSWindowToBack(long nsWindowPtr);
     private static native void nativePushNSWindowToFront(long nsWindowPtr);
     private static native void nativeSetNSWindowTitle(long nsWindowPtr, String title);
-    private static native void nativeSetNSWindowAlpha(long nsWindowPtr, float alpha);
     private static native void nativeRevalidateNSWindowShadow(long nsWindowPtr);
     private static native void nativeSetNSWindowMinimizedIcon(long nsWindowPtr, long nsImage);
     private static native void nativeSetNSWindowRepresentedFilename(long nsWindowPtr, String representedFilename);
@@ -244,17 +243,6 @@
         // TODO: implement on top of JObjC bridged class
     //    NSWindow window = JObjC.getInstance().AppKit().NSWindow().getInstance(nativeWindowPtr, JObjCRuntime.getInstance());
 
-        // Since JDK7 we have standard way to set opacity, so we should not pick
-        // background's alpha.
-        // TODO: set appropriate opacity value
-        //        this.opacity = target.getOpacity();
-        //        this.setOpacity(this.opacity);
-
-        final float windowAlpha = target.getOpacity();
-        if (windowAlpha != 1.0f) {
-            nativeSetNSWindowAlpha(nativeWindowPtr, windowAlpha);
-        }
-
         if (target instanceof javax.swing.RootPaneContainer) {
             final javax.swing.JRootPane rootpane = ((javax.swing.RootPaneContainer)target).getRootPane();
             if (rootpane != null) rootpane.addPropertyChangeListener("ancestor", new PropertyChangeListener() {
@@ -419,15 +407,9 @@
         if (owner != null) {
             CWrapper.NSWindow.removeChildWindow(owner.getNSWindowPtr(), getNSWindowPtr());
         }
-        // Make sure window is ordered out before it is disposed, we could order it out right here or
-        // we could postpone the disposal, I think postponing is probably better.
-        EventQueue.invokeLater(new Runnable() {
-            public void run() {
-                contentView.dispose();
-                nativeDispose(getNSWindowPtr());
-                CPlatformWindow.super.dispose();
-            }
-        });
+        contentView.dispose();
+        nativeDispose(getNSWindowPtr());
+        CPlatformWindow.super.dispose();
     }
 
     @Override // PlatformWindow
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Wed Jul 05 18:16:12 2017 +0200
@@ -216,7 +216,6 @@
     @Override
     public SystemTrayPeer createSystemTray(SystemTray target) {
         SystemTrayPeer peer = new CSystemTray();
-        targetCreatedPeer(target, peer);
         return peer;
     }
 
--- a/jdk/src/macosx/native/jobjc/build.xml	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/native/jobjc/build.xml	Wed Jul 05 18:16:12 2017 +0200
@@ -140,8 +140,16 @@
     <!-- Compile PrimitiveCoder first to work around javac bug. -->
     <javac srcdir="${core.src}" destdir="${core.bin}" source="1.5" target="1.5" debug="${compile.debug}"
            includes="**/PrimitiveCoder.java"
-           includeantruntime="false" />
-    <javac srcdir="${core.src}" destdir="${core.bin}" source="1.5" target="1.5" debug="${compile.debug}" includeantruntime="false" />
+           includeantruntime="false">
+      <classpath>
+        <path location="${obj}/../langtools/dist/lib/classes.jar"/>
+      </classpath>
+    </javac>
+    <javac srcdir="${core.src}" destdir="${core.bin}" source="1.5" target="1.5" debug="${compile.debug}" includeantruntime="false">
+      <classpath>
+        <path location="${obj}/../langtools/dist/lib/classes.jar"/>
+      </classpath>
+    </javac>
 
     <exec executable="/usr/bin/perl" outputproperty="core.classes" failonerror="true">
       <arg value="${src}/extract_classes.pl"/>
--- a/jdk/src/macosx/native/jobjc/src/core/PrimitiveCoder.hs	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/native/jobjc/src/core/PrimitiveCoder.hs	Wed Jul 05 18:16:12 2017 +0200
@@ -2,7 +2,7 @@
 
 {-
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -196,6 +196,8 @@
 c2java ntype =
     unlines [
  "// native " ++ ntypeS ++ " -> java " ++ jprimS,
+ "/* No native methods here, but the constants are needed in the supporting JNI code */",
+ "@GenerateNativeHeader",
  "public static final class " ++ className ++ " extends PrimitiveCoder<" ++ jclassS ++ ">{",
  "\tpublic static final " ++ className ++ " INST = new " ++ className ++ "();",
  "\tpublic " ++ className ++ "(){ super("++ffitypeVal ntype++", \"" ++ [encoding ntype] ++ "\", "++jclassS++".class, "++jprimS++".class); }",
@@ -246,10 +248,13 @@
   putStrLn "package com.apple.jobjc;"
 
   putStrLn "import com.apple.jobjc.JObjCRuntime.Width;"
+  putStrLn "import javax.tools.annotation.GenerateNativeHeader;"
 
   putStrLn "// Auto generated by PrimitiveCoder.hs"
   putStrLn "// Do not edit by hand."
 
+  putStrLn "/* No native methods here, but the constants are needed in the supporting JNI code */"
+  putStrLn "@GenerateNativeHeader"
   putStrLn "public abstract class PrimitiveCoder<T> extends Coder<T>{"
 
   putStrLn "\tpublic PrimitiveCoder(int ffiTypeCode, String objCEncoding, Class jclass, Class jprim){"
--- a/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/CFType.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/CFType.java	Wed Jul 05 18:16:12 2017 +0200
@@ -24,6 +24,10 @@
  */
 package com.apple.jobjc;
 
+import javax.tools.annotation.GenerateNativeHeader;
+
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public class CFType extends Pointer<Void> {
     protected CFType(long ptr) { super(ptr); }
     protected CFType(Pointer<?> ptr) { super(ptr.ptr); }
--- a/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Coder.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Coder.java	Wed Jul 05 18:16:12 2017 +0200
@@ -35,6 +35,7 @@
 import com.apple.jobjc.PrimitiveCoder.SIntCoder;
 import com.apple.jobjc.PrimitiveCoder.SLongLongCoder;
 import com.apple.jobjc.PrimitiveCoder.SShortCoder;
+import javax.tools.annotation.GenerateNativeHeader;
 
 public abstract class Coder<T> {
     private static native long getNativeFFITypePtrForCode(final int code);
@@ -142,6 +143,8 @@
 
     //
 
+    /* No native methods here, but the constants are needed in the supporting JNI code */
+    @GenerateNativeHeader
     public static final class VoidCoder extends Coder<Object>{
         public static final VoidCoder INST = new VoidCoder();
         public VoidCoder(){ super(FFI_VOID, "v", Void.class, void.class); }
@@ -150,6 +153,8 @@
         @Override public void push(JObjCRuntime runtime, long addr, Object x) { throw new RuntimeException("Trying to push a Void."); }
     }
 
+    /* No native methods here, but the constants are needed in the supporting JNI code */
+    @GenerateNativeHeader
     public static final class UnknownCoder extends Coder<Object> {
         public static final UnknownCoder INST = new UnknownCoder();
         public UnknownCoder(){ super(-1, "?", null, null); }
@@ -158,6 +163,8 @@
         @Override public Object pop(JObjCRuntime runtime, long addr) { throw new RuntimeException("Coder not implemented"); }
     }
 
+    /* No native methods here, but the constants are needed in the supporting JNI code */
+    @GenerateNativeHeader
     public static final class PrimitivePointerCoder extends Coder<Long> {
         public static final PrimitivePointerCoder INST = new PrimitivePointerCoder();
         public PrimitivePointerCoder(){ super(Coder.FFI_PTR, "^?", Long.class, long.class); }
@@ -187,6 +194,8 @@
         @Override public void push(JObjCRuntime runtime, long addr, Long x) { push(runtime, addr, (long) x); }
     }
 
+    /* No native methods here, but the constants are needed in the supporting JNI code */
+    @GenerateNativeHeader
     public static final class PointerCoder extends Coder<Pointer> {
         public static final PointerCoder INST = new PointerCoder();
         public PointerCoder(){ super(FFI_PTR, "^?", Pointer.class); }
@@ -200,6 +209,8 @@
         }
     }
 
+    /* No native methods here, but the constants are needed in the supporting JNI code */
+    @GenerateNativeHeader
     public static final class SELCoder extends Coder<SEL> {
         public static final SELCoder INST = new SELCoder();
         public SELCoder(){ super(FFI_PTR, ":", SEL.class); }
@@ -213,6 +224,8 @@
         }
     }
 
+    /* No native methods here, but the constants are needed in the supporting JNI code */
+    @GenerateNativeHeader
     public static abstract class StructCoder extends Coder<Struct> {
         private final FFIType ffiType;
         final int sizeof;
@@ -254,6 +267,8 @@
         }
     }
 
+    /* No native methods here, but the constants are needed in the supporting JNI code */
+    @GenerateNativeHeader
     public static final class IDCoder extends Coder<ID>{
         public static final IDCoder INST = new IDCoder();
         public IDCoder(){ super(FFI_PTR, "@", ID.class); }
@@ -272,6 +287,8 @@
         }
     }
 
+    /* No native methods here, but the constants are needed in the supporting JNI code */
+    @GenerateNativeHeader
     public static final class NSClassCoder extends Coder<NSClass>{
         public static final NSClassCoder INST = new NSClassCoder();
         public NSClassCoder(){ super(FFI_PTR, "#", NSClass.class); }
--- a/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/FFIType.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/FFIType.java	Wed Jul 05 18:16:12 2017 +0200
@@ -26,6 +26,10 @@
 
 import com.apple.jobjc.Coder.PrimitivePointerCoder;
 
+import javax.tools.annotation.GenerateNativeHeader;
+
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 class FFIType{
     private static native void makeFFIType(long ffi_type_buf, long elements_buf);
     private static native int  getFFITypeSizeof();
--- a/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Function.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Function.java	Wed Jul 05 18:16:12 2017 +0200
@@ -24,6 +24,10 @@
  */
 package com.apple.jobjc;
 
+import javax.tools.annotation.GenerateNativeHeader;
+
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public class Function {
     private static native long getFxnPtrForFunctionName(final String functionName);
     private static native long getFxnPtrForFunctionNameAndLib(final long libPtr, final String functionName);
--- a/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/ID.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/ID.java	Wed Jul 05 18:16:12 2017 +0200
@@ -29,6 +29,10 @@
 import java.util.LinkedHashMap;
 import java.util.Map;
 
+import javax.tools.annotation.GenerateNativeHeader;
+
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public class ID extends Pointer<Void>{
     static native String getNativeDescription(final long objPtr);
 
--- a/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Invoke.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Invoke.java	Wed Jul 05 18:16:12 2017 +0200
@@ -30,12 +30,18 @@
 import com.apple.jobjc.Coder.SELCoder;
 import com.apple.jobjc.Coder.StructCoder;
 
+import javax.tools.annotation.GenerateNativeHeader;
+
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public abstract class Invoke {
     public abstract void invoke(NativeArgumentBuffer argBuf);
     public abstract void invoke(NativeArgumentBuffer buffer, Struct retvalStruct);
 
     //
 
+    /* No native methods here, but the constants are needed in the supporting JNI code */
+    @GenerateNativeHeader
     public static final class FunCall extends Invoke{
         static native void invoke(long cifPtr, long fxnPtr, long retValPtr, long argsPtr);
 
@@ -72,6 +78,8 @@
         }
     }
 
+    /* No native methods here, but the constants are needed in the supporting JNI code */
+    @GenerateNativeHeader
     public static final class MsgSend extends Invoke{
         static{ System.load("/usr/lib/libobjc.dylib"); }
 
@@ -157,6 +165,8 @@
         }
     }
 
+    /* No native methods here, but the constants are needed in the supporting JNI code */
+    @GenerateNativeHeader
     public static final class MsgSendSuper extends Invoke{
         static{ System.load("/usr/lib/libobjc.dylib"); }
 
--- a/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/JObjCRuntime.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/JObjCRuntime.java	Wed Jul 05 18:16:12 2017 +0200
@@ -31,10 +31,16 @@
 
 import sun.misc.Unsafe;
 
+import javax.tools.annotation.GenerateNativeHeader;
+
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public final class JObjCRuntime {
     static { System.loadLibrary("JObjC"); }
 
+    @GenerateNativeHeader
     public static enum Arch{ ppc, i386, x86_64 };
+    @GenerateNativeHeader
     public static enum Width{ W32, W64 };
 
     public static final Arch ARCH = getArch();
--- a/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/MacOSXFramework.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/MacOSXFramework.java	Wed Jul 05 18:16:12 2017 +0200
@@ -25,6 +25,10 @@
 package com.apple.jobjc;
 
 
+import javax.tools.annotation.GenerateNativeHeader;
+
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public class MacOSXFramework {
     private static native long retainFramework(final String frameworkName);
     private static native void releaseFramework(final long frameworkPtr);
--- a/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NSClass.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NSClass.java	Wed Jul 05 18:16:12 2017 +0200
@@ -27,7 +27,13 @@
 import java.lang.ref.WeakReference;
 import java.lang.reflect.Constructor;
 
+import javax.tools.annotation.GenerateNativeHeader;
+
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public class NSClass<T extends ID> extends ID {
+    /* No native methods here, but the constants are needed in the supporting JNI code */
+    @GenerateNativeHeader
     public static class NSClassNotFoundException extends RuntimeException{
         public NSClassNotFoundException(String m){ super(m); }
         public NSClassNotFoundException(String m, Throwable cause){ super(m, cause); }
--- a/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NativeArgumentBuffer.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NativeArgumentBuffer.java	Wed Jul 05 18:16:12 2017 +0200
@@ -28,6 +28,10 @@
 
 import com.apple.jobjc.Coder.PrimitivePointerCoder;
 
+import javax.tools.annotation.GenerateNativeHeader;
+
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public final class NativeArgumentBuffer{
     private static final ThreadLocal<NativeArgumentBuffer> threadLocal = new ThreadLocal<NativeArgumentBuffer>();
 
--- a/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NativeBuffer.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NativeBuffer.java	Wed Jul 05 18:16:12 2017 +0200
@@ -27,9 +27,13 @@
 import java.nio.ByteBuffer;
 import java.nio.ByteOrder;
 
+import javax.tools.annotation.GenerateNativeHeader;
+
 /**
  * A wrapper around a direct ByteBuffer and its native pointer. For documentation, @see java.nio.ByteBuffer
  */
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public class NativeBuffer {
     static native long getPtrOfBuffer(final ByteBuffer byteBuffer);
 
--- a/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NativeObjectLifecycleManager.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NativeObjectLifecycleManager.java	Wed Jul 05 18:16:12 2017 +0200
@@ -24,6 +24,10 @@
  */
 package com.apple.jobjc;
 
+import javax.tools.annotation.GenerateNativeHeader;
+
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public abstract class NativeObjectLifecycleManager {
     private static native void retainNativeObject(final long ptr);
     private static native void releaseNativeObject(final long ptr);
@@ -33,6 +37,8 @@
     abstract void end(final long ptr);
     boolean shouldPreRetain() { return false; }
 
+    /* No native methods here, but the constants are needed in the supporting JNI code */
+    @GenerateNativeHeader
     public static class CFRetainRelease extends NativeObjectLifecycleManager {
         public static final NativeObjectLifecycleManager INST = new CFRetainRelease();
         @Override void begin(final long ptr) { retainNativeObject(ptr); }
@@ -40,12 +46,16 @@
         @Override boolean shouldPreRetain() { return true; }
     }
 
+    /* No native methods here, but the constants are needed in the supporting JNI code */
+    @GenerateNativeHeader
     public static class Free extends NativeObjectLifecycleManager {
         public static final NativeObjectLifecycleManager INST = new Free();
         @Override void begin(final long ptr) { }
         @Override void end(final long ptr) { freeNativeObject(ptr); }
     }
 
+    /* No native methods here, but the constants are needed in the supporting JNI code */
+    @GenerateNativeHeader
     public static class Nothing extends NativeObjectLifecycleManager {
         public static final NativeObjectLifecycleManager INST = new Nothing();
         @Override void begin(final long ptr) { }
--- a/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Opaque.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Opaque.java	Wed Jul 05 18:16:12 2017 +0200
@@ -24,6 +24,10 @@
  */
 package com.apple.jobjc;
 
+import javax.tools.annotation.GenerateNativeHeader;
+
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public class Opaque extends Pointer<Void> {
     protected Opaque(long ptr) { super(ptr); }
     protected Opaque(Pointer<?> ptr) { super(ptr.ptr); }
--- a/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Pointer.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Pointer.java	Wed Jul 05 18:16:12 2017 +0200
@@ -24,6 +24,10 @@
  */
 package com.apple.jobjc;
 
+import javax.tools.annotation.GenerateNativeHeader;
+
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public class Pointer <T> implements Comparable<Pointer<T>>{
     long ptr;
 
--- a/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/PrimitiveCoder.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/PrimitiveCoder.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -24,8 +24,11 @@
  */
 package com.apple.jobjc;
 import com.apple.jobjc.JObjCRuntime.Width;
+import javax.tools.annotation.GenerateNativeHeader;
 // Auto generated by PrimitiveCoder.hs
 // Do not edit by hand.
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public abstract class PrimitiveCoder<T> extends Coder<T>{
     public PrimitiveCoder(int ffiTypeCode, String objCEncoding, Class jclass, Class jprim){
         super(ffiTypeCode, objCEncoding, jclass, jprim);
@@ -127,6 +130,8 @@
 
 
 // native BOOL -> java boolean
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public static final class BoolCoder extends PrimitiveCoder<Boolean>{
     public static final BoolCoder INST = new BoolCoder();
     public BoolCoder(){ super(FFI_SINT8, "B", Boolean.class, boolean.class); }
@@ -170,6 +175,8 @@
 }
 
 // native schar -> java byte
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public static final class SCharCoder extends PrimitiveCoder<Byte>{
     public static final SCharCoder INST = new SCharCoder();
     public SCharCoder(){ super(FFI_SINT8, "c", Byte.class, byte.class); }
@@ -213,6 +220,8 @@
 }
 
 // native uchar -> java byte
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public static final class UCharCoder extends PrimitiveCoder<Byte>{
     public static final UCharCoder INST = new UCharCoder();
     public UCharCoder(){ super(FFI_UINT8, "C", Byte.class, byte.class); }
@@ -256,6 +265,8 @@
 }
 
 // native sshort -> java short
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public static final class SShortCoder extends PrimitiveCoder<Short>{
     public static final SShortCoder INST = new SShortCoder();
     public SShortCoder(){ super(FFI_SINT16, "s", Short.class, short.class); }
@@ -299,6 +310,8 @@
 }
 
 // native ushort -> java short
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public static final class UShortCoder extends PrimitiveCoder<Short>{
     public static final UShortCoder INST = new UShortCoder();
     public UShortCoder(){ super(FFI_UINT16, "S", Short.class, short.class); }
@@ -342,6 +355,8 @@
 }
 
 // native sint -> java int
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public static final class SIntCoder extends PrimitiveCoder<Integer>{
     public static final SIntCoder INST = new SIntCoder();
     public SIntCoder(){ super(FFI_SINT32, "i", Integer.class, int.class); }
@@ -385,6 +400,8 @@
 }
 
 // native uint -> java int
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public static final class UIntCoder extends PrimitiveCoder<Integer>{
     public static final UIntCoder INST = new UIntCoder();
     public UIntCoder(){ super(FFI_UINT32, "I", Integer.class, int.class); }
@@ -428,6 +445,8 @@
 }
 
 // native slong -> java long
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public static final class SLongCoder extends PrimitiveCoder<Long>{
     public static final SLongCoder INST = new SLongCoder();
     public SLongCoder(){ super((JObjCRuntime.IS64 ? (FFI_SINT64) : (FFI_SINT32)), "l", Long.class, long.class); }
@@ -477,6 +496,8 @@
 }
 
 // native ulong -> java long
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public static final class ULongCoder extends PrimitiveCoder<Long>{
     public static final ULongCoder INST = new ULongCoder();
     public ULongCoder(){ super((JObjCRuntime.IS64 ? (FFI_UINT64) : (FFI_UINT32)), "L", Long.class, long.class); }
@@ -526,6 +547,8 @@
 }
 
 // native slonglong -> java long
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public static final class SLongLongCoder extends PrimitiveCoder<Long>{
     public static final SLongLongCoder INST = new SLongLongCoder();
     public SLongLongCoder(){ super(FFI_SINT64, "q", Long.class, long.class); }
@@ -569,6 +592,8 @@
 }
 
 // native ulonglong -> java long
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public static final class ULongLongCoder extends PrimitiveCoder<Long>{
     public static final ULongLongCoder INST = new ULongLongCoder();
     public ULongLongCoder(){ super(FFI_UINT64, "Q", Long.class, long.class); }
@@ -612,6 +637,8 @@
 }
 
 // native float -> java float
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public static final class FloatCoder extends PrimitiveCoder<Float>{
     public static final FloatCoder INST = new FloatCoder();
     public FloatCoder(){ super(FFI_FLOAT, "f", Float.class, float.class); }
@@ -655,6 +682,8 @@
 }
 
 // native double -> java double
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public static final class DoubleCoder extends PrimitiveCoder<Double>{
     public static final DoubleCoder INST = new DoubleCoder();
     public DoubleCoder(){ super(FFI_DOUBLE, "d", Double.class, double.class); }
--- a/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/SEL.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/SEL.java	Wed Jul 05 18:16:12 2017 +0200
@@ -24,6 +24,10 @@
  */
 package com.apple.jobjc;
 
+import javax.tools.annotation.GenerateNativeHeader;
+
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public class SEL {
     static native long getSelectorPtr(String selectorName);
     static native String getSelectorName(long ptr);
--- a/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Struct.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Struct.java	Wed Jul 05 18:16:12 2017 +0200
@@ -24,9 +24,13 @@
  */
 package com.apple.jobjc;
 
+import javax.tools.annotation.GenerateNativeHeader;
+
 /**
  * A struct is malloced on the C heap and accessed in Java through a ByteBuffer.
  */
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 public abstract class Struct{
     protected final NativeBuffer raw;
     private final JObjCRuntime runtime;
--- a/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Subclassing.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Subclassing.java	Wed Jul 05 18:16:12 2017 +0200
@@ -33,6 +33,10 @@
 import com.apple.jobjc.Coder.VoidCoder;
 import com.apple.jobjc.Invoke.MsgSend;
 
+import javax.tools.annotation.GenerateNativeHeader;
+
+/* No native methods here, but the constants are needed in the supporting JNI code */
+@GenerateNativeHeader
 final class Subclassing {
     static native long allocateClassPair(long superClass, String name);
     static native boolean addIVarForJObj(long clazz);
--- a/jdk/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/FrameworkClassFile.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/FrameworkClassFile.java	Wed Jul 05 18:16:12 2017 +0200
@@ -28,6 +28,7 @@
 import java.io.PrintStream;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.TreeSet;
 
 import com.apple.internal.jobjc.generator.FunctionGenerator;
 import com.apple.internal.jobjc.generator.Utils;
@@ -130,7 +131,11 @@
             }
         }
 
-        for (final Clazz clazz : framework.classes) {
+        /**
+         * Order classes to get stable output
+         */
+        TreeSet<Clazz> sortedClasses = new TreeSet<Clazz>(framework.classes);
+        for (final Clazz clazz : sortedClasses) {
             final String classClassName = clazz.name + "Class";
             out.println(JavaLang.makeSingleton("_" + classClassName, clazz.name, classClassName, "getRuntime()"));
         }
--- a/jdk/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/Clazz.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/Clazz.java	Wed Jul 05 18:16:12 2017 +0200
@@ -147,4 +147,8 @@
 
         return null;
     }
+
+    int compareTo(Clazz o) {
+      return toString().compareTo(o.toString());
+    }
 }
--- a/jdk/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/coders/ComplexCoderDescriptor.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/coders/ComplexCoderDescriptor.java	Wed Jul 05 18:16:12 2017 +0200
@@ -25,7 +25,7 @@
 package com.apple.internal.jobjc.generator.model.coders;
 
 import java.util.HashMap;
-import java.util.HashSet;
+import java.util.TreeSet;
 import java.util.Map;
 import java.util.Set;
 
@@ -40,7 +40,7 @@
  */
 public class ComplexCoderDescriptor extends CoderDescriptor {
     static Map<Pair<NType,NType>, ComplexCoderDescriptor> cache = new HashMap<Pair<NType,NType>, ComplexCoderDescriptor>();
-    static Set<MixedEncodingDescriptor> mixedEncodingDescriptors = new HashSet<MixedEncodingDescriptor>();
+    static Set<MixedEncodingDescriptor> mixedEncodingDescriptors = new TreeSet<MixedEncodingDescriptor>();
 
     public static Set<MixedEncodingDescriptor> getMixedEncoders() { return mixedEncodingDescriptors; }
 
@@ -76,7 +76,7 @@
     // ** Subclasses
     // -------------
 
-    public static class MixedEncodingDescriptor extends ComplexCoderDescriptor {
+    public static class MixedEncodingDescriptor extends ComplexCoderDescriptor implements java.lang.Comparable {
         protected final PrimitiveCoderDescriptor desc32;
 
         public MixedEncodingDescriptor(final PrimitiveCoderDescriptor desc32, final PrimitiveCoderDescriptor desc64) {
@@ -97,5 +97,6 @@
         }
 
         static String getBaseNameOfCoder(final String coderName) { return coderName.substring(0, coderName.indexOf("Coder")); }
+        public int compareTo(Object _o) { MixedEncodingDescriptor o = (MixedEncodingDescriptor)_o; return getMixedName().compareTo(o.getMixedName()); }
     }
 }
--- a/jdk/src/macosx/native/sun/awt/AWTWindow.m	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/macosx/native/sun/awt/AWTWindow.m	Wed Jul 05 18:16:12 2017 +0200
@@ -934,27 +934,6 @@
 
 /*
  * Class:     sun_lwawt_macosx_CPlatformWindow
- * Method:    nativeSetNSWindowAlpha
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeSetNSWindowAlpha
-(JNIEnv *env, jclass clazz, jlong windowPtr, jfloat alpha)
-{
-JNF_COCOA_ENTER(env);
-AWT_ASSERT_NOT_APPKIT_THREAD;
-
-    NSWindow *nsWindow = OBJC(windowPtr);
-    [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
-        AWT_ASSERT_APPKIT_THREAD;
-
-        [nsWindow setAlphaValue:alpha];
-    }];
-
-JNF_COCOA_EXIT(env);
-}
-
-/*
- * Class:     sun_lwawt_macosx_CPlatformWindow
  * Method:    nativeRevalidateNSWindowShadow
  * Signature: (J)V
  */
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java	Wed Jul 05 18:16:12 2017 +0200
@@ -796,9 +796,10 @@
             "Menu.margin", zeroInsets,
             "Menu.cancelMode", "hideMenuTree",
             "Menu.alignAcceleratorText", Boolean.FALSE,
+            "Menu.useMenuBarForTopLevelMenus", Boolean.TRUE,
 
 
-            "MenuBar.windowBindings", new Object[] {
+                "MenuBar.windowBindings", new Object[] {
                 "F10", "takeFocus" },
             "MenuBar.font", new FontLazyValue(Region.MENU_BAR),
 
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKStyleFactory.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKStyleFactory.java	Wed Jul 05 18:16:12 2017 +0200
@@ -92,7 +92,13 @@
                 boolean defaultCapable = btn.isDefaultCapable();
                 key = new ComplexKey(wt, toolButton, defaultCapable);
             }
+        } else if (id == Region.MENU) {
+            if (c instanceof JMenu && ((JMenu) c).isTopLevelMenu() &&
+                    UIManager.getBoolean("Menu.useMenuBarForTopLevelMenus")) {
+                wt = WidgetType.MENU_BAR;
+            }
         }
+
         if (key == null) {
             // Otherwise, just use the WidgetType as the key.
             key = wt;
--- a/jdk/src/share/classes/com/sun/jndi/cosnaming/CNCtx.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/share/classes/com/sun/jndi/cosnaming/CNCtx.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -58,8 +58,22 @@
 
     private final static boolean debug = false;
 
+    /*
+     * Implement one shared ORB among all CNCtx.  However, there is a public constructor
+     * accepting an ORB, so we need the option of using a given ORB.
+     */
+    private static ORB _defaultOrb;
     ORB _orb;                   // used by ExceptionMapper and RMI/IIOP factory
     public NamingContext _nc;   // public for accessing underlying NamingContext
+
+    private synchronized static ORB getDefaultOrb() {
+        if (_defaultOrb == null) {
+            _defaultOrb = CorbaUtils.getOrb(null, -1,
+               new Hashtable<String, java.lang.Object>());
+        }
+        return _defaultOrb;
+    }
+
     private NameComponent[] _name = null;
 
     Hashtable<String, java.lang.Object> _env; // used by ExceptionMapper
@@ -114,8 +128,9 @@
         // rest is the INS name
         // Return the parsed form to prevent subsequent lookup
         // from parsing the string as a composite name
-        // The caller should be aware that a toString() of the name
-        // will yield its INS syntax, rather than a composite syntax
+        // The caller should be aware that a toString() of the name,
+        // which came from the environment will yield its INS syntax,
+        // rather than a composite syntax
         return new ResolveResult(ctx, parser.parse(rest));
     }
 
@@ -135,10 +150,10 @@
             if (orb == null || nctx == null)
                 throw new ConfigurationException(
                     "Must supply ORB or NamingContext");
-            _orb = orb;
-            orbTracker = tracker;
-            if (orbTracker != null) {
-                orbTracker.incRefCount();
+            if (orb != null) {
+                _orb = orb;
+            } else {
+                _orb = getDefaultOrb();
             }
             _nc = nctx;
             _env = env;
@@ -212,10 +227,13 @@
         org.omg.CORBA.ORB inOrb = null;
         String ncIor = null;
 
-        if (env != null) {
+        if (inOrb == null && env != null) {
             inOrb = (org.omg.CORBA.ORB) env.get("java.naming.corba.orb");
         }
 
+        if (inOrb == null)
+            inOrb = getDefaultOrb(); // will create a default ORB if none exists
+
         // Extract PROVIDER_URL from environment
         String provUrl = null;
         if (env != null) {
@@ -226,13 +244,6 @@
             // Initialize the root naming context by using the IOR supplied
             // in the PROVIDER_URL
             ncIor = getStringifiedIor(provUrl);
-
-            if (inOrb == null) {
-
-                // no ORB instance specified; create one using env and defaults
-                inOrb = CorbaUtils.getOrb(null, -1, env);
-                orbTracker = new OrbReuseTracker(inOrb);
-            }
             setOrbAndRootContext(inOrb, ncIor);
         } else if (provUrl != null) {
             // Initialize the root naming context by using the URL supplied
@@ -258,14 +269,8 @@
             }
         } else {
             // No PROVIDER_URL supplied; initialize using defaults
-            if (inOrb == null) {
-
-                // No ORB instance specified; create one using env and defaults
-                inOrb = CorbaUtils.getOrb(null, -1, env);
-                orbTracker = new OrbReuseTracker(inOrb);
-                if (debug) {
-                    System.err.println("Getting default ORB: " + inOrb + env);
-                }
+            if (debug) {
+                System.err.println("Getting default ORB: " + inOrb + env);
             }
             setOrbAndRootContext(inOrb, (String)null);
         }
@@ -286,6 +291,10 @@
      */
     private String initUsingIiopUrl(ORB defOrb, String url, Hashtable<?,?> env)
         throws NamingException {
+
+        if (defOrb == null)
+            defOrb = getDefaultOrb();
+
         try {
             IiopUrl parsedUrl = new IiopUrl(url);
 
@@ -294,19 +303,17 @@
             for (IiopUrl.Address addr : parsedUrl.getAddresses()) {
 
                 try {
-                    if (defOrb != null) {
-                        try {
-                            String tmpUrl = "corbaloc:iiop:" + addr.host
-                                + ":" + addr.port + "/NameService";
-                            if (debug) {
-                                System.err.println("Using url: " + tmpUrl);
-                            }
-                            org.omg.CORBA.Object rootCtx =
-                                defOrb.string_to_object(tmpUrl);
-                            setOrbAndRootContext(defOrb, rootCtx);
-                            return parsedUrl.getStringName();
-                        } catch (Exception e) {} // keep going
-                    }
+                    try {
+                        String tmpUrl = "corbaloc:iiop:" + addr.host
+                            + ":" + addr.port + "/NameService";
+                        if (debug) {
+                            System.err.println("Using url: " + tmpUrl);
+                        }
+                        org.omg.CORBA.Object rootCtx =
+                            defOrb.string_to_object(tmpUrl);
+                        setOrbAndRootContext(defOrb, rootCtx);
+                        return parsedUrl.getStringName();
+                    } catch (Exception e) {} // keep going
 
                     // Get ORB
                     if (debug) {
@@ -314,12 +321,8 @@
                             + " and port " + addr.port);
                     }
 
-                    // Get ORB
-                    ORB orb = CorbaUtils.getOrb(addr.host, addr.port, env);
-                    orbTracker = new OrbReuseTracker(orb);
-
                     // Assign to fields
-                    setOrbAndRootContext(orb, (String)null);
+                    setOrbAndRootContext(defOrb, (String)null);
                     return parsedUrl.getStringName();
 
                 } catch (NamingException ne) {
@@ -341,18 +344,16 @@
      */
     private String initUsingCorbanameUrl(ORB orb, String url, Hashtable<?,?> env)
         throws NamingException {
+
+        if (orb == null)
+                orb = getDefaultOrb();
+
         try {
             CorbanameUrl parsedUrl = new CorbanameUrl(url);
 
             String corbaloc = parsedUrl.getLocation();
             String cosName = parsedUrl.getStringName();
 
-            if (orb == null) {
-
-                // No ORB instance specified; create one using env and defaults
-                orb = CorbaUtils.getOrb(null, -1, env);
-                orbTracker = new OrbReuseTracker(orb);
-            }
             setOrbAndRootContext(orb, corbaloc);
 
             return parsedUrl.getStringName();
@@ -1117,9 +1118,6 @@
     }
 
     synchronized public void incEnumCount() {
-        if (orbTracker == null) {
-            return;
-        }
         enumCount++;
         if (debug) {
             System.out.println("incEnumCount, new count:" + enumCount);
@@ -1128,9 +1126,6 @@
 
     synchronized public void decEnumCount()
             throws NamingException {
-        if (orbTracker == null) {
-            return;
-        }
         enumCount--;
         if (debug) {
             System.out.println("decEnumCount, new count:" + enumCount +
@@ -1142,14 +1137,15 @@
     }
 
     synchronized public void close() throws NamingException {
-        if (orbTracker == null) {
-            return;
-        }
+
         if (enumCount > 0) {
             isCloseCalled = true;
             return;
         }
-        orbTracker.decRefCount();
+
+        // Never destroy an orb in CNCtx.
+        // The orb we have is either the shared/default orb, or one passed in to a constructor
+        // from elsewhere, so that orb is somebody else's reponsibility.
     }
 
     protected void finalize() {
--- a/jdk/src/share/classes/com/sun/jndi/ldap/Connection.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/Connection.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -680,9 +680,11 @@
                         ldr = ldr.next;
                     }
                 }
-                parent.processConnectionClosure();
             }
         }
+        if (nparent) {
+            parent.processConnectionClosure();
+        }
     }
 
 
--- a/jdk/src/share/classes/com/sun/jndi/ldap/LdapClient.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/LdapClient.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -488,14 +488,16 @@
      */
     void processConnectionClosure() {
         // Notify listeners
-        if (unsolicited.size() > 0) {
-            String msg;
-            if (conn != null) {
-                msg = conn.host + ":" + conn.port + " connection closed";
-            } else {
-                msg = "Connection closed";
+        synchronized (unsolicited) {
+            if (unsolicited.size() > 0) {
+                String msg;
+                if (conn != null) {
+                    msg = conn.host + ":" + conn.port + " connection closed";
+                } else {
+                    msg = "Connection closed";
+                }
+                notifyUnsolicited(new CommunicationException(msg));
             }
-            notifyUnsolicited(new CommunicationException(msg));
         }
 
         // Remove from pool
--- a/jdk/src/share/classes/java/awt/image/DirectColorModel.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/share/classes/java/awt/image/DirectColorModel.java	Wed Jul 05 18:16:12 2017 +0200
@@ -27,7 +27,6 @@
 
 import java.awt.color.ColorSpace;
 import java.awt.Transparency;
-import javax.tools.annotation.GenerateNativeHeader;
 
 /**
  * The <code>DirectColorModel</code> class is a <code>ColorModel</code>
@@ -107,8 +106,6 @@
  * @see ColorModel#getRGBdefault
  *
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class DirectColorModel extends PackedColorModel {
     private int red_mask;
     private int green_mask;
--- a/jdk/src/share/classes/java/lang/Process.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/share/classes/java/lang/Process.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -26,6 +26,7 @@
 package java.lang;
 
 import java.io.*;
+import java.util.concurrent.TimeUnit;
 
 /**
  * The {@link ProcessBuilder#start()} and
@@ -91,7 +92,7 @@
      * @return the output stream connected to the normal input of the
      *         subprocess
      */
-    abstract public OutputStream getOutputStream();
+    public abstract OutputStream getOutputStream();
 
     /**
      * Returns the input stream connected to the normal output of the
@@ -117,7 +118,7 @@
      * @return the input stream connected to the normal output of the
      *         subprocess
      */
-    abstract public InputStream getInputStream();
+    public abstract InputStream getInputStream();
 
     /**
      * Returns the input stream connected to the error output of the
@@ -138,7 +139,7 @@
      * @return the input stream connected to the error output of
      *         the subprocess
      */
-    abstract public InputStream getErrorStream();
+    public abstract InputStream getErrorStream();
 
     /**
      * Causes the current thread to wait, if necessary, until the
@@ -156,7 +157,51 @@
      *         thread while it is waiting, then the wait is ended and
      *         an {@link InterruptedException} is thrown.
      */
-    abstract public int waitFor() throws InterruptedException;
+    public abstract int waitFor() throws InterruptedException;
+
+    /**
+     * Causes the current thread to wait, if necessary, until the
+     * subprocess represented by this {@code Process} object has
+     * terminated, or the specified waiting time elapses.
+     *
+     * <p>If the subprocess has already terminated then this method returns
+     * immediately with the value {@code true}.  If the process has not
+     * terminated and the timeout value is less than, or equal to, zero, then
+     * this method returns immediately with the value {@code false}.
+     *
+     * <p>The default implementation of this methods polls the {@code exitValue}
+     * to check if the process has terminated. Concrete implementations of this
+     * class are strongly encouraged to override this method with a more
+     * efficient implementation.
+     *
+     * @param timeout the maximum time to wait
+     * @param unit the time unit of the {@code timeout} argument
+     * @return {@code true} if the subprocess has exited and {@code false} if
+     *         the waiting time elapsed before the subprocess has exited.
+     * @throws InterruptedException if the current thread is interrupted
+     *         while waiting.
+     * @throws NullPointerException if unit is null
+     * @since 1.8
+     */
+    public boolean waitFor(long timeout, TimeUnit unit)
+        throws InterruptedException
+    {
+        long startTime = System.nanoTime();
+        long rem = unit.toNanos(timeout);
+
+        do {
+            try {
+                exitValue();
+                return true;
+            } catch(IllegalThreadStateException ex) {
+                if (rem > 0)
+                    Thread.sleep(
+                        Math.min(TimeUnit.NANOSECONDS.toMillis(rem) + 1, 100));
+            }
+            rem = unit.toNanos(timeout) - (System.nanoTime() - startTime);
+        } while (rem > 0);
+        return false;
+    }
 
     /**
      * Returns the exit value for the subprocess.
@@ -167,11 +212,54 @@
      * @throws IllegalThreadStateException if the subprocess represented
      *         by this {@code Process} object has not yet terminated
      */
-    abstract public int exitValue();
+    public abstract int exitValue();
+
+    /**
+     * Kills the subprocess. Whether the subprocess represented by this
+     * {@code Process} object is forcibly terminated or not is
+     * implementation dependent.
+     */
+    public abstract void destroy();
 
     /**
      * Kills the subprocess. The subprocess represented by this
      * {@code Process} object is forcibly terminated.
+     *
+     * <p>The default implementation of this method invokes {@link #destroy}
+     * and so may not forcibly terminate the process. Concrete implementations
+     * of this class are strongly encouraged to override this method with a
+     * compliant implementation.  Invoking this method on {@code Process}
+     * objects returned by {@link ProcessBuilder#start} and
+     * {@link Runtime#exec} will forcibly terminate the process.
+     *
+     * <p>Note: The subprocess may not terminate immediately.
+     * i.e. {@code isAlive()} may return true for a brief period
+     * after {@code destroyForcibly()} is called. This method
+     * may be chained to {@code waitFor()} if needed.
+     *
+     * @return the {@code Process} object representing the
+     *         subprocess to be forcibly destroyed.
+     * @since 1.8
      */
-    abstract public void destroy();
+    public Process destroyForcibly() {
+        destroy();
+        return this;
+    }
+
+    /**
+     * Tests whether the subprocess represented by this {@code Process} is
+     * alive.
+     *
+     * @return {@code true} if the subprocess represented by this
+     *         {@code Process} object has not yet terminated.
+     * @since 1.8
+     */
+    public boolean isAlive() {
+        try {
+            exitValue();
+            return false;
+        } catch(IllegalThreadStateException e) {
+            return true;
+        }
+    }
 }
--- a/jdk/src/share/classes/java/lang/String.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/share/classes/java/lang/String.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1921,17 +1921,17 @@
      * <blockquote><pre>
      * str.substring(begin,&nbsp;end)</pre></blockquote>
      *
-     * This method is defined so that the <tt>String</tt> class can implement
+     * This method is defined so that the {@code String} class can implement
      * the {@link CharSequence} interface. </p>
      *
-     * @param      beginIndex   the begin index, inclusive.
-     * @param      endIndex     the end index, exclusive.
-     * @return     the specified subsequence.
+     * @param   beginIndex   the begin index, inclusive.
+     * @param   endIndex     the end index, exclusive.
+     * @return  the specified subsequence.
      *
      * @throws  IndexOutOfBoundsException
-     *          if <tt>beginIndex</tt> or <tt>endIndex</tt> are negative,
-     *          if <tt>endIndex</tt> is greater than <tt>length()</tt>,
-     *          or if <tt>beginIndex</tt> is greater than <tt>startIndex</tt>
+     *          if {@code beginIndex} or {@code endIndex} is negative,
+     *          if {@code endIndex} is greater than {@code length()},
+     *          or if {@code beginIndex} is greater than {@code endIndex}
      *
      * @since 1.4
      * @spec JSR-51
--- a/jdk/src/share/classes/java/lang/StringBuffer.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/share/classes/java/lang/StringBuffer.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 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
@@ -39,29 +39,38 @@
  * that is consistent with the order of the method calls made by each of
  * the individual threads involved.
  * <p>
- * The principal operations on a <code>StringBuffer</code> are the
- * <code>append</code> and <code>insert</code> methods, which are
+ * The principal operations on a {@code StringBuffer} are the
+ * {@code append} and {@code insert} methods, which are
  * overloaded so as to accept data of any type. Each effectively
  * converts a given datum to a string and then appends or inserts the
  * characters of that string to the string buffer. The
- * <code>append</code> method always adds these characters at the end
- * of the buffer; the <code>insert</code> method adds the characters at
+ * {@code append} method always adds these characters at the end
+ * of the buffer; the {@code insert} method adds the characters at
  * a specified point.
  * <p>
- * For example, if <code>z</code> refers to a string buffer object
- * whose current contents are "<code>start</code>", then
- * the method call <code>z.append("le")</code> would cause the string
- * buffer to contain "<code>startle</code>", whereas
- * <code>z.insert(4, "le")</code> would alter the string buffer to
- * contain "<code>starlet</code>".
+ * For example, if {@code z} refers to a string buffer object
+ * whose current contents are {@code "start"}, then
+ * the method call {@code z.append("le")} would cause the string
+ * buffer to contain {@code "startle"}, whereas
+ * {@code z.insert(4, "le")} would alter the string buffer to
+ * contain {@code "starlet"}.
  * <p>
- * In general, if sb refers to an instance of a <code>StringBuffer</code>,
- * then <code>sb.append(x)</code> has the same effect as
- * <code>sb.insert(sb.length(),&nbsp;x)</code>.
+ * In general, if sb refers to an instance of a {@code StringBuffer},
+ * then {@code sb.append(x)} has the same effect as
+ * {@code sb.insert(sb.length(),&nbsp;x)}.
  * <p>
  * Whenever an operation occurs involving a source sequence (such as
- * appending or inserting from a source sequence) this class synchronizes
+ * appending or inserting from a source sequence), this class synchronizes
  * only on the string buffer performing the operation, not on the source.
+ * Note that while {@code StringBuffer} is designed to be safe to use
+ * concurrently from multiple threads, if the constructor or the
+ * {@code append} or {@code insert} operation is passed a source sequence
+ * that is shared across threads, the calling code must ensure
+ * that the operation has a consistent and unchanging view of the source
+ * sequence for the duration of the operation.
+ * This could be satisfied by the caller holding a lock during the
+ * operation's call, by using an immutable source sequence, or by not
+ * sharing the source sequence across threads.
  * <p>
  * Every string buffer has a capacity. As long as the length of the
  * character sequence contained in the string buffer does not exceed
@@ -101,8 +110,8 @@
      * the specified initial capacity.
      *
      * @param      capacity  the initial capacity.
-     * @exception  NegativeArraySizeException  if the <code>capacity</code>
-     *               argument is less than <code>0</code>.
+     * @exception  NegativeArraySizeException  if the {@code capacity}
+     *               argument is less than {@code 0}.
      */
     public StringBuffer(int capacity) {
         super(capacity);
@@ -111,10 +120,10 @@
     /**
      * Constructs a string buffer initialized to the contents of the
      * specified string. The initial capacity of the string buffer is
-     * <code>16</code> plus the length of the string argument.
+     * {@code 16} plus the length of the string argument.
      *
      * @param   str   the initial contents of the buffer.
-     * @exception NullPointerException if <code>str</code> is <code>null</code>
+     * @exception NullPointerException if {@code str} is {@code null}
      */
     public StringBuffer(String str) {
         super(str.length() + 16);
@@ -123,16 +132,16 @@
 
     /**
      * Constructs a string buffer that contains the same characters
-     * as the specified <code>CharSequence</code>. The initial capacity of
-     * the string buffer is <code>16</code> plus the length of the
-     * <code>CharSequence</code> argument.
+     * as the specified {@code CharSequence}. The initial capacity of
+     * the string buffer is {@code 16} plus the length of the
+     * {@code CharSequence} argument.
      * <p>
-     * If the length of the specified <code>CharSequence</code> is
+     * If the length of the specified {@code CharSequence} is
      * less than or equal to zero, then an empty buffer of capacity
-     * <code>16</code> is returned.
+     * {@code 16} is returned.
      *
      * @param      seq   the sequence to copy.
-     * @exception NullPointerException if <code>seq</code> is <code>null</code>
+     * @exception NullPointerException if {@code seq} is {@code null}
      * @since 1.5
      */
     public StringBuffer(CharSequence seq) {
@@ -253,10 +262,10 @@
      * the new character sequence is equal to the character at index <i>k</i>
      * in the old character sequence, if <i>k</i> is less than <i>n</i>;
      * otherwise, it is equal to the character at index <i>k-n</i> in the
-     * argument <code>sb</code>.
+     * argument {@code sb}.
      * <p>
-     * This method synchronizes on <code>this</code> (the destination)
-     * object but does not synchronize on the source (<code>sb</code>).
+     * This method synchronizes on {@code this}, the destination
+     * object, but does not synchronize on the source ({@code sb}).
      *
      * @param   sb   the <tt>StringBuffer</tt> to append.
      * @return  a reference to this object.
@@ -269,23 +278,23 @@
 
 
     /**
-     * Appends the specified <code>CharSequence</code> to this
+     * Appends the specified {@code CharSequence} to this
      * sequence.
      * <p>
-     * The characters of the <code>CharSequence</code> argument are appended,
+     * The characters of the {@code CharSequence} argument are appended,
      * in order, increasing the length of this sequence by the length of the
      * argument.
      *
      * <p>The result of this method is exactly the same as if it were an
      * invocation of this.append(s, 0, s.length());
      *
-     * <p>This method synchronizes on this (the destination)
-     * object but does not synchronize on the source (<code>s</code>).
+     * <p>This method synchronizes on {@code this}, the destination
+     * object, but does not synchronize on the source ({@code s}).
      *
-     * <p>If <code>s</code> is <code>null</code>, then the four characters
-     * <code>"null"</code> are appended.
+     * <p>If {@code s} is {@code null}, then the four characters
+     * {@code "null"} are appended.
      *
-     * @param   s the <code>CharSequence</code> to append.
+     * @param   s the {@code CharSequence} to append.
      * @return  a reference to this object.
      * @since 1.5
      */
--- a/jdk/src/share/classes/java/util/InvalidPropertiesFormatException.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/share/classes/java/util/InvalidPropertiesFormatException.java	Wed Jul 05 18:16:12 2017 +0200
@@ -44,6 +44,9 @@
  */
 
 public class InvalidPropertiesFormatException extends IOException {
+
+    private static final long serialVersionUID = 7763056076009360219L;
+
     /**
      * Constructs an InvalidPropertiesFormatException with the specified
      * cause.
--- a/jdk/src/share/classes/java/util/concurrent/PriorityBlockingQueue.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/share/classes/java/util/concurrent/PriorityBlockingQueue.java	Wed Jul 05 18:16:12 2017 +0200
@@ -35,7 +35,8 @@
 
 package java.util.concurrent;
 
-import java.util.concurrent.locks.*;
+import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.ReentrantLock;
 import java.util.*;
 
 /**
@@ -111,7 +112,7 @@
      * java.util.PriorityQueue operations within a lock, as was done
      * in a previous version of this class. To maintain
      * interoperability, a plain PriorityQueue is still used during
-     * serialization, which maintains compatibility at the espense of
+     * serialization, which maintains compatibility at the expense of
      * transiently doubling overhead.
      */
 
@@ -308,14 +309,13 @@
     /**
      * Mechanics for poll().  Call only while holding lock.
      */
-    private E extract() {
-        E result;
+    private E dequeue() {
         int n = size - 1;
         if (n < 0)
-            result = null;
+            return null;
         else {
             Object[] array = queue;
-            result = (E) array[0];
+            E result = (E) array[0];
             E x = (E) array[n];
             array[n] = null;
             Comparator<? super E> cmp = comparator;
@@ -324,8 +324,8 @@
             else
                 siftDownUsingComparator(0, x, array, n, cmp);
             size = n;
+            return result;
         }
-        return result;
     }
 
     /**
@@ -382,39 +382,43 @@
      */
     private static <T> void siftDownComparable(int k, T x, Object[] array,
                                                int n) {
-        Comparable<? super T> key = (Comparable<? super T>)x;
-        int half = n >>> 1;           // loop while a non-leaf
-        while (k < half) {
-            int child = (k << 1) + 1; // assume left child is least
-            Object c = array[child];
-            int right = child + 1;
-            if (right < n &&
-                ((Comparable<? super T>) c).compareTo((T) array[right]) > 0)
-                c = array[child = right];
-            if (key.compareTo((T) c) <= 0)
-                break;
-            array[k] = c;
-            k = child;
+        if (n > 0) {
+            Comparable<? super T> key = (Comparable<? super T>)x;
+            int half = n >>> 1;           // loop while a non-leaf
+            while (k < half) {
+                int child = (k << 1) + 1; // assume left child is least
+                Object c = array[child];
+                int right = child + 1;
+                if (right < n &&
+                    ((Comparable<? super T>) c).compareTo((T) array[right]) > 0)
+                    c = array[child = right];
+                if (key.compareTo((T) c) <= 0)
+                    break;
+                array[k] = c;
+                k = child;
+            }
+            array[k] = key;
         }
-        array[k] = key;
     }
 
     private static <T> void siftDownUsingComparator(int k, T x, Object[] array,
                                                     int n,
                                                     Comparator<? super T> cmp) {
-        int half = n >>> 1;
-        while (k < half) {
-            int child = (k << 1) + 1;
-            Object c = array[child];
-            int right = child + 1;
-            if (right < n && cmp.compare((T) c, (T) array[right]) > 0)
-                c = array[child = right];
-            if (cmp.compare(x, (T) c) <= 0)
-                break;
-            array[k] = c;
-            k = child;
+        if (n > 0) {
+            int half = n >>> 1;
+            while (k < half) {
+                int child = (k << 1) + 1;
+                Object c = array[child];
+                int right = child + 1;
+                if (right < n && cmp.compare((T) c, (T) array[right]) > 0)
+                    c = array[child = right];
+                if (cmp.compare(x, (T) c) <= 0)
+                    break;
+                array[k] = c;
+                k = child;
+            }
+            array[k] = x;
         }
-        array[k] = x;
     }
 
     /**
@@ -520,13 +524,11 @@
     public E poll() {
         final ReentrantLock lock = this.lock;
         lock.lock();
-        E result;
         try {
-            result = extract();
+            return dequeue();
         } finally {
             lock.unlock();
         }
-        return result;
     }
 
     public E take() throws InterruptedException {
@@ -534,7 +536,7 @@
         lock.lockInterruptibly();
         E result;
         try {
-            while ( (result = extract()) == null)
+            while ( (result = dequeue()) == null)
                 notEmpty.await();
         } finally {
             lock.unlock();
@@ -548,7 +550,7 @@
         lock.lockInterruptibly();
         E result;
         try {
-            while ( (result = extract()) == null && nanos > 0)
+            while ( (result = dequeue()) == null && nanos > 0)
                 nanos = notEmpty.awaitNanos(nanos);
         } finally {
             lock.unlock();
@@ -559,13 +561,11 @@
     public E peek() {
         final ReentrantLock lock = this.lock;
         lock.lock();
-        E result;
         try {
-            result = size > 0 ? (E) queue[0] : null;
+            return (size == 0) ? null : (E) queue[0];
         } finally {
             lock.unlock();
         }
-        return result;
     }
 
     /**
@@ -649,32 +649,28 @@
      * @return {@code true} if this queue changed as a result of the call
      */
     public boolean remove(Object o) {
-        boolean removed = false;
         final ReentrantLock lock = this.lock;
         lock.lock();
         try {
             int i = indexOf(o);
-            if (i != -1) {
-                removeAt(i);
-                removed = true;
-            }
+            if (i == -1)
+                return false;
+            removeAt(i);
+            return true;
         } finally {
             lock.unlock();
         }
-        return removed;
     }
 
-
     /**
      * Identity-based version for use in Itr.remove
      */
-    private void removeEQ(Object o) {
+    void removeEQ(Object o) {
         final ReentrantLock lock = this.lock;
         lock.lock();
         try {
             Object[] array = queue;
-            int n = size;
-            for (int i = 0; i < n; i++) {
+            for (int i = 0, n = size; i < n; i++) {
                 if (o == array[i]) {
                     removeAt(i);
                     break;
@@ -694,15 +690,13 @@
      * @return {@code true} if this queue contains the specified element
      */
     public boolean contains(Object o) {
-        int index;
         final ReentrantLock lock = this.lock;
         lock.lock();
         try {
-            index = indexOf(o);
+            return indexOf(o) != -1;
         } finally {
             lock.unlock();
         }
-        return index != -1;
     }
 
     /**
@@ -728,7 +722,6 @@
         }
     }
 
-
     public String toString() {
         final ReentrantLock lock = this.lock;
         lock.lock();
@@ -739,7 +732,7 @@
             StringBuilder sb = new StringBuilder();
             sb.append('[');
             for (int i = 0; i < n; ++i) {
-                E e = (E)queue[i];
+                Object e = queue[i];
                 sb.append(e == this ? "(this Collection)" : e);
                 if (i != n - 1)
                     sb.append(',').append(' ');
@@ -757,23 +750,7 @@
      * @throws IllegalArgumentException      {@inheritDoc}
      */
     public int drainTo(Collection<? super E> c) {
-        if (c == null)
-            throw new NullPointerException();
-        if (c == this)
-            throw new IllegalArgumentException();
-        final ReentrantLock lock = this.lock;
-        lock.lock();
-        try {
-            int n = 0;
-            E e;
-            while ( (e = extract()) != null) {
-                c.add(e);
-                ++n;
-            }
-            return n;
-        } finally {
-            lock.unlock();
-        }
+        return drainTo(c, Integer.MAX_VALUE);
     }
 
     /**
@@ -792,11 +769,10 @@
         final ReentrantLock lock = this.lock;
         lock.lock();
         try {
-            int n = 0;
-            E e;
-            while (n < maxElements && (e = extract()) != null) {
-                c.add(e);
-                ++n;
+            int n = Math.min(size, maxElements);
+            for (int i = 0; i < n; i++) {
+                c.add((E) queue[0]); // In this order, in case add() throws.
+                dequeue();
             }
             return n;
         } finally {
@@ -844,8 +820,7 @@
      * The following code can be used to dump the queue into a newly
      * allocated array of {@code String}:
      *
-     * <pre>
-     *     String[] y = x.toArray(new String[0]);</pre>
+     *  <pre> {@code String[] y = x.toArray(new String[0]);}</pre>
      *
      * Note that {@code toArray(new Object[0])} is identical in function to
      * {@code toArray()}.
@@ -898,7 +873,7 @@
      */
     final class Itr implements Iterator<E> {
         final Object[] array; // Array of all elements
-        int cursor;           // index of next element to return;
+        int cursor;           // index of next element to return
         int lastRet;          // index of last element, or -1 if no such
 
         Itr(Object[] array) {
@@ -926,17 +901,18 @@
     }
 
     /**
-     * Saves the state to a stream (that is, serializes it).  For
-     * compatibility with previous version of this class,
-     * elements are first copied to a java.util.PriorityQueue,
-     * which is then serialized.
+     * Saves this queue to a stream (that is, serializes it).
+     *
+     * For compatibility with previous version of this class, elements
+     * are first copied to a java.util.PriorityQueue, which is then
+     * serialized.
      */
     private void writeObject(java.io.ObjectOutputStream s)
         throws java.io.IOException {
         lock.lock();
         try {
-            int n = size; // avoid zero capacity argument
-            q = new PriorityQueue<E>(n == 0 ? 1 : n, comparator);
+            // avoid zero capacity argument
+            q = new PriorityQueue<E>(Math.max(size, 1), comparator);
             q.addAll(this);
             s.defaultWriteObject();
         } finally {
@@ -946,10 +922,7 @@
     }
 
     /**
-     * Reconstitutes the {@code PriorityBlockingQueue} instance from a stream
-     * (that is, deserializes it).
-     *
-     * @param s the stream
+     * Reconstitutes this queue from a stream (that is, deserializes it).
      */
     private void readObject(java.io.ObjectInputStream s)
         throws java.io.IOException, ClassNotFoundException {
--- a/jdk/src/share/classes/java/util/regex/Pattern.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/share/classes/java/util/regex/Pattern.java	Wed Jul 05 18:16:12 2017 +0200
@@ -2026,6 +2026,7 @@
         }
     }
 
+    @SuppressWarnings("fallthrough")
     /**
      * Parsing of sequences between alternations.
      */
@@ -2140,6 +2141,7 @@
         return head;
     }
 
+    @SuppressWarnings("fallthrough")
     /**
      * Parse and add a new Single or Slice.
      */
@@ -2978,6 +2980,7 @@
         return head;
     }
 
+    @SuppressWarnings("fallthrough")
     /**
      * Parses inlined match flags and set them appropriately.
      */
@@ -3019,6 +3022,7 @@
         }
     }
 
+    @SuppressWarnings("fallthrough")
     /**
      * Parses the second part of inlined match flags and turns off
      * flags appropriately.
--- a/jdk/src/share/classes/java/util/zip/GZIPInputStream.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/share/classes/java/util/zip/GZIPInputStream.java	Wed Jul 05 18:16:12 2017 +0200
@@ -252,7 +252,7 @@
      */
     private int readUShort(InputStream in) throws IOException {
         int b = readUByte(in);
-        return ((int)readUByte(in) << 8) | b;
+        return (readUByte(in) << 8) | b;
     }
 
     /*
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthMenuUI.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthMenuUI.java	Wed Jul 05 18:16:12 2017 +0200
@@ -299,7 +299,8 @@
      */
     @Override
     public void propertyChange(PropertyChangeEvent e) {
-        if (SynthLookAndFeel.shouldUpdateStyle(e)) {
+        if (SynthLookAndFeel.shouldUpdateStyle(e) ||
+                (e.getPropertyName().equals("ancestor") && UIManager.getBoolean("Menu.useMenuBarForTopLevelMenus"))) {
             updateStyle((JMenu)e.getSource());
         }
     }
--- a/jdk/src/share/classes/sun/awt/CharsetString.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/share/classes/sun/awt/CharsetString.java	Wed Jul 05 18:16:12 2017 +0200
@@ -24,10 +24,6 @@
  */
 package sun.awt;
 
-import javax.tools.annotation.GenerateNativeHeader;
-
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class CharsetString {
     /**
      * chars for this string.  See also offset, length.
--- a/jdk/src/share/classes/sun/java2d/pipe/RegionIterator.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/share/classes/sun/java2d/pipe/RegionIterator.java	Wed Jul 05 18:16:12 2017 +0200
@@ -27,14 +27,10 @@
 
 import java.awt.Rectangle;
 
-import javax.tools.annotation.GenerateNativeHeader;
-
 /**
  * This class defines the API for iterating through the bands
  * of a region object.
  */
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public class RegionIterator {
     Region region;
     int curIndex;
--- a/jdk/src/share/classes/sun/tools/jar/Main.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/share/classes/sun/tools/jar/Main.java	Wed Jul 05 18:16:12 2017 +0200
@@ -137,7 +137,7 @@
         File dir = file.getParentFile();
         if (dir == null)
             dir = new File(".");
-        return Files.createTempFile(dir.toPath(), "jartmp", null).toFile();
+        return File.createTempFile("jartmp", null, dir);
     }
 
     private boolean ok;
--- a/jdk/src/share/classes/sun/tools/native2ascii/Main.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/share/classes/sun/tools/native2ascii/Main.java	Wed Jul 05 18:16:12 2017 +0200
@@ -241,7 +241,9 @@
             if (tempDir == null)
                 tempDir = new File(System.getProperty("user.dir"));
 
-            tempFile = Files.createTempFile(tempDir.toPath(), "_N2A", ".TMP").toFile();
+            tempFile = File.createTempFile("_N2A",
+                                           ".TMP",
+                                            tempDir);
             tempFile.deleteOnExit();
 
             try {
@@ -291,7 +293,9 @@
             File tempDir = f.getParentFile();
             if (tempDir == null)
                 tempDir = new File(System.getProperty("user.dir"));
-            tempFile =  Files.createTempFile(tempDir.toPath(), "_N2A", ".TMP").toFile();
+            tempFile =  File.createTempFile("_N2A",
+                                            ".TMP",
+                                            tempDir);
             tempFile.deleteOnExit();
 
             try {
--- a/jdk/src/share/lib/security/java.security	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/share/lib/security/java.security	Wed Jul 05 18:16:12 2017 +0200
@@ -1,6 +1,28 @@
 #
 # This is the "master security properties file".
 #
+# An alternate java.security properties file may be specified
+# from the command line via the system property
+#
+#    -Djava.security.properties=<URL>
+#
+# This properties file appends to the master security properties file.
+# If both properties files specify values for the same key, the value
+# from the command-line properties file is selected, as it is the last
+# one loaded.
+#
+# Also, if you specify
+#
+#    -Djava.security.properties==<URL> (2 equals),
+#
+# then that properties file completely overrides the master security
+# properties file.
+#
+# To disable the ability to specify an additional properties file from
+# the command line, set the key security.overridePropertiesFile
+# to false in the master security properties file. It is set to true
+# by default.
+
 # In this file, various security properties are set for use by
 # java.security classes. This is where users can statically register
 # Cryptography Package Providers ("providers" for short). The term
--- a/jdk/src/share/lib/security/java.security-macosx	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/share/lib/security/java.security-macosx	Wed Jul 05 18:16:12 2017 +0200
@@ -1,6 +1,28 @@
 #
 # This is the "master security properties file".
 #
+# An alternate java.security properties file may be specified
+# from the command line via the system property
+#
+#    -Djava.security.properties=<URL>
+#
+# This properties file appends to the master security properties file.
+# If both properties files specify values for the same key, the value
+# from the command-line properties file is selected, as it is the last
+# one loaded.
+#
+# Also, if you specify
+#
+#    -Djava.security.properties==<URL> (2 equals),
+#
+# then that properties file completely overrides the master security
+# properties file.
+#
+# To disable the ability to specify an additional properties file from
+# the command line, set the key security.overridePropertiesFile
+# to false in the master security properties file. It is set to true
+# by default.
+
 # In this file, various security properties are set for use by
 # java.security classes. This is where users can statically register
 # Cryptography Package Providers ("providers" for short). The term
--- a/jdk/src/share/lib/security/java.security-solaris	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/share/lib/security/java.security-solaris	Wed Jul 05 18:16:12 2017 +0200
@@ -1,6 +1,28 @@
 #
 # This is the "master security properties file".
 #
+# An alternate java.security properties file may be specified
+# from the command line via the system property
+#
+#    -Djava.security.properties=<URL>
+#
+# This properties file appends to the master security properties file.
+# If both properties files specify values for the same key, the value
+# from the command-line properties file is selected, as it is the last
+# one loaded.
+#
+# Also, if you specify
+#
+#    -Djava.security.properties==<URL> (2 equals),
+#
+# then that properties file completely overrides the master security
+# properties file.
+#
+# To disable the ability to specify an additional properties file from
+# the command line, set the key security.overridePropertiesFile
+# to false in the master security properties file. It is set to true
+# by default.
+
 # In this file, various security properties are set for use by
 # java.security classes. This is where users can statically register
 # Cryptography Package Providers ("providers" for short). The term
--- a/jdk/src/share/lib/security/java.security-windows	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/share/lib/security/java.security-windows	Wed Jul 05 18:16:12 2017 +0200
@@ -1,6 +1,28 @@
 #
 # This is the "master security properties file".
 #
+# An alternate java.security properties file may be specified
+# from the command line via the system property
+#
+#    -Djava.security.properties=<URL>
+#
+# This properties file appends to the master security properties file.
+# If both properties files specify values for the same key, the value
+# from the command-line properties file is selected, as it is the last
+# one loaded.
+#
+# Also, if you specify
+#
+#    -Djava.security.properties==<URL> (2 equals),
+#
+# then that properties file completely overrides the master security
+# properties file.
+#
+# To disable the ability to specify an additional properties file from
+# the command line, set the key security.overridePropertiesFile
+# to false in the master security properties file. It is set to true
+# by default.
+
 # In this file, various security properties are set for use by
 # java.security classes. This is where users can statically register
 # Cryptography Package Providers ("providers" for short). The term
--- a/jdk/src/share/native/sun/awt/image/cvutils/img_globals.c	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/share/native/sun/awt/image/cvutils/img_globals.c	Wed Jul 05 18:16:12 2017 +0200
@@ -31,7 +31,6 @@
 #include "img_globals.h"
 
 #include "java_awt_image_IndexColorModel.h"
-#include "java_awt_image_DirectColorModel.h"
 #include "java_awt_Transparency.h"
 
 /*
--- a/jdk/src/solaris/classes/java/lang/UNIXProcess.java.bsd	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/solaris/classes/java/lang/UNIXProcess.java.bsd	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -38,6 +38,7 @@
 import java.util.concurrent.Executors;
 import java.util.concurrent.Executor;
 import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.TimeUnit;
 import java.security.AccessController;
 import static java.security.AccessController.doPrivileged;
 import java.security.PrivilegedAction;
@@ -211,6 +212,24 @@
         }
         return exitcode;
     }
+    
+    @Override
+    public synchronized boolean waitFor(long timeout, TimeUnit unit) 
+        throws InterruptedException 
+    {
+        if (hasExited) return true;
+        if (timeout <= 0) return false;	
+
+        long timeoutAsNanos = unit.toNanos(timeout);
+        long startTime = System.nanoTime();
+        long rem = timeoutAsNanos;
+
+        while (!hasExited && (rem > 0)) {
+            wait(Math.max(TimeUnit.NANOSECONDS.toMillis(rem), 1));
+            rem = timeoutAsNanos - (System.nanoTime() - startTime);
+        }
+        return hasExited;
+    }
 
     public synchronized int exitValue() {
         if (!hasExited) {
@@ -219,8 +238,8 @@
         return exitcode;
     }
 
-    private static native void destroyProcess(int pid);
-    public void destroy() {
+    private static native void destroyProcess(int pid, boolean force);
+    private void destroy(boolean force) {
         // There is a risk that pid will be recycled, causing us to
         // kill the wrong process!  So we only terminate processes
         // that appear to still be running.  Even with this check,
@@ -229,13 +248,28 @@
         // soon, so this is quite safe.
         synchronized (this) {
             if (!hasExited)
-                destroyProcess(pid);
+                destroyProcess(pid, force);
         }
         try { stdin.close();  } catch (IOException ignored) {}
         try { stdout.close(); } catch (IOException ignored) {}
         try { stderr.close(); } catch (IOException ignored) {}
     }
 
+    public void destroy() {
+        destroy(false);
+    }
+
+    @Override
+    public Process destroyForcibly() {
+        destroy(true);
+        return this;
+    }
+
+    @Override
+    public synchronized boolean isAlive() {
+        return !hasExited;
+    }
+
     /* This routine initializes JNI field offsets for the class */
     private static native void initIDs();
 
--- a/jdk/src/solaris/classes/java/lang/UNIXProcess.java.linux	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/solaris/classes/java/lang/UNIXProcess.java.linux	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -38,6 +38,7 @@
 import java.util.concurrent.Executors;
 import java.util.concurrent.Executor;
 import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.TimeUnit;
 import java.security.AccessController;
 import static java.security.AccessController.doPrivileged;
 import java.security.PrivilegedAction;
@@ -212,6 +213,24 @@
         return exitcode;
     }
 
+    @Override
+    public synchronized boolean waitFor(long timeout, TimeUnit unit)
+        throws InterruptedException
+    {
+        if (hasExited) return true;
+        if (timeout <= 0) return false;
+
+        long timeoutAsNanos = unit.toNanos(timeout);
+        long startTime = System.nanoTime();
+        long rem = timeoutAsNanos;
+
+        while (!hasExited && (rem > 0)) {
+            wait(Math.max(TimeUnit.NANOSECONDS.toMillis(rem), 1));
+            rem = timeoutAsNanos - (System.nanoTime() - startTime);
+        }
+        return hasExited;
+    }
+
     public synchronized int exitValue() {
         if (!hasExited) {
             throw new IllegalThreadStateException("process hasn't exited");
@@ -219,8 +238,8 @@
         return exitcode;
     }
 
-    private static native void destroyProcess(int pid);
-    public void destroy() {
+    private static native void destroyProcess(int pid, boolean force);
+    private void destroy(boolean force) {
         // There is a risk that pid will be recycled, causing us to
         // kill the wrong process!  So we only terminate processes
         // that appear to still be running.  Even with this check,
@@ -229,13 +248,28 @@
         // soon, so this is quite safe.
         synchronized (this) {
             if (!hasExited)
-                destroyProcess(pid);
+                destroyProcess(pid, force);
         }
         try { stdin.close();  } catch (IOException ignored) {}
         try { stdout.close(); } catch (IOException ignored) {}
         try { stderr.close(); } catch (IOException ignored) {}
     }
 
+    public void destroy() {
+        destroy(false);
+    }
+
+    @Override
+    public Process destroyForcibly() {
+        destroy(true);
+        return this;
+    }
+
+    @Override
+    public synchronized boolean isAlive() {
+        return !hasExited;
+    }
+
     /* This routine initializes JNI field offsets for the class */
     private static native void initIDs();
 
--- a/jdk/src/solaris/classes/java/lang/UNIXProcess.java.solaris	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/solaris/classes/java/lang/UNIXProcess.java.solaris	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -26,6 +26,7 @@
 package java.lang;
 
 import java.io.*;
+import java.util.concurrent.TimeUnit;
 
 /* java.lang.Process subclass in the UNIX environment.
  *
@@ -158,6 +159,24 @@
         return exitcode;
     }
 
+    @Override
+    public synchronized boolean waitFor(long timeout, TimeUnit unit)
+        throws InterruptedException
+    {
+        if (hasExited) return true;
+        if (timeout <= 0) return false;
+
+        long timeoutAsNanos = unit.toNanos(timeout);
+        long startTime = System.nanoTime();
+        long rem = timeoutAsNanos;
+
+        while (!hasExited && (rem > 0)) {
+            wait(Math.max(TimeUnit.NANOSECONDS.toMillis(rem), 1));
+            rem = timeoutAsNanos - (System.nanoTime() - startTime);
+        }
+        return hasExited;
+    }
+
     public synchronized int exitValue() {
         if (!hasExited) {
             throw new IllegalThreadStateException("process hasn't exited");
@@ -165,8 +184,8 @@
         return exitcode;
     }
 
-    private static native void destroyProcess(int pid);
-    public synchronized void destroy() {
+    private static native void destroyProcess(int pid, boolean force);
+    private synchronized void destroy(boolean force) {
         // There is a risk that pid will be recycled, causing us to
         // kill the wrong process!  So we only terminate processes
         // that appear to still be running.  Even with this check,
@@ -174,7 +193,7 @@
         // is very small, and OSes try hard to not recycle pids too
         // soon, so this is quite safe.
         if (!hasExited)
-            destroyProcess(pid);
+            destroyProcess(pid, force);
         try {
             stdin_stream.close();
             if (stdout_inner_stream != null)
@@ -187,6 +206,21 @@
         }
     }
 
+    public void destroy() {
+        destroy(false);
+    }
+
+    @Override
+    public Process destroyForcibly() {
+        destroy(true);
+        return this;
+    }
+
+    @Override
+    public synchronized boolean isAlive() {
+        return !hasExited;
+    }
+
     // A FileInputStream that supports the deferment of the actual close
     // operation until the last pending I/O operation on the stream has
     // finished.  This is required on Solaris because we must close the stdin
--- a/jdk/src/solaris/native/java/lang/UNIXProcess_md.c	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/solaris/native/java/lang/UNIXProcess_md.c	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -955,7 +955,11 @@
 }
 
 JNIEXPORT void JNICALL
-Java_java_lang_UNIXProcess_destroyProcess(JNIEnv *env, jobject junk, jint pid)
+Java_java_lang_UNIXProcess_destroyProcess(JNIEnv *env,
+                                          jobject junk,
+                                          jint pid,
+                                          jboolean force)
 {
-    kill(pid, SIGTERM);
+    int sig = (force == JNI_TRUE) ? SIGKILL : SIGTERM;
+    kill(pid, sig);
 }
--- a/jdk/src/solaris/native/sun/awt/fontpath.c	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/solaris/native/sun/awt/fontpath.c	Wed Jul 05 18:16:12 2017 +0200
@@ -1240,7 +1240,7 @@
                                             FC_CHARSET, 0, &charset);
             if (result != FcResultMatch) {
                 free(family);
-                free(family);
+                free(fullname);
                 free(styleStr);
                 free(file);
                 (*FcPatternDestroy)(pattern);
--- a/jdk/src/windows/classes/java/lang/ProcessImpl.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/windows/classes/java/lang/ProcessImpl.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -37,6 +37,7 @@
 import java.lang.ProcessBuilder.Redirect;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import java.util.concurrent.TimeUnit;
 
 /* This class is for the exclusive use of ProcessBuilder.start() to
  * create new processes.
@@ -254,11 +255,44 @@
             throw new InterruptedException();
         return exitValue();
     }
+
     private static native void waitForInterruptibly(long handle);
 
+    @Override
+    public boolean waitFor(long timeout, TimeUnit unit)
+        throws InterruptedException
+    {
+        if (getExitCodeProcess(handle) != STILL_ACTIVE) return true;
+        if (timeout <= 0) return false;
+
+        long msTimeout = unit.toMillis(timeout);
+
+        waitForTimeoutInterruptibly(handle, msTimeout);
+        if (Thread.interrupted())
+            throw new InterruptedException();
+        return (getExitCodeProcess(handle) != STILL_ACTIVE);
+    }
+
+    private static native void waitForTimeoutInterruptibly(
+        long handle, long timeout);
+
     public void destroy() { terminateProcess(handle); }
+
+    @Override
+    public Process destroyForcibly() {
+        destroy();
+        return this;
+    }
+
     private static native void terminateProcess(long handle);
 
+    @Override
+    public boolean isAlive() {
+        return isProcessAlive(handle);
+    }
+
+    private static native boolean isProcessAlive(long handle);
+
     /**
      * Create a process using the win32 function CreateProcess.
      *
--- a/jdk/src/windows/native/java/lang/ProcessImpl_md.c	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/windows/native/java/lang/ProcessImpl_md.c	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -299,18 +299,45 @@
 
     if (WaitForMultipleObjects(sizeof(events)/sizeof(events[0]), events,
                                FALSE,    /* Wait for ANY event */
-                               INFINITE) /* Wait forever */
+                               INFINITE)  /* Wait forever */
         == WAIT_FAILED)
         win32Error(env, "WaitForMultipleObjects");
 }
 
 JNIEXPORT void JNICALL
+Java_java_lang_ProcessImpl_waitForTimeoutInterruptibly(JNIEnv *env,
+                                                       jclass ignored,
+                                                       jlong handle,
+                                                       jlong timeout)
+{
+    HANDLE events[2];
+    DWORD dwTimeout = (DWORD)timeout;
+    DWORD result;
+    events[0] = (HANDLE) handle;
+    events[1] = JVM_GetThreadInterruptEvent();
+    result = WaitForMultipleObjects(sizeof(events)/sizeof(events[0]), events,
+                                    FALSE,    /* Wait for ANY event */
+                                    dwTimeout);  /* Wait for dwTimeout */
+
+    if (result == WAIT_FAILED)
+        win32Error(env, "WaitForMultipleObjects");
+}
+
+JNIEXPORT void JNICALL
 Java_java_lang_ProcessImpl_terminateProcess(JNIEnv *env, jclass ignored, jlong handle)
 {
     TerminateProcess((HANDLE) handle, 1);
 }
 
 JNIEXPORT jboolean JNICALL
+Java_java_lang_ProcessImpl_isProcessAlive(JNIEnv *env, jclass ignored, jlong handle)
+{
+    DWORD dwExitStatus;
+    GetExitCodeProcess(handle, &dwExitStatus);
+    return dwExitStatus == STILL_ACTIVE;
+}
+
+JNIEXPORT jboolean JNICALL
 Java_java_lang_ProcessImpl_closeHandle(JNIEnv *env, jclass ignored, jlong handle)
 {
     return CloseHandle((HANDLE) handle);
--- a/jdk/src/windows/native/sun/font/lcdglyph.c	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/windows/native/sun/font/lcdglyph.c	Wed Jul 05 18:16:12 2017 +0200
@@ -409,7 +409,7 @@
      */
     imageSize = bytesWidth*height;
     glyphInfo = (GlyphInfo*)malloc(sizeof(GlyphInfo)+imageSize);
-    if (malloc == NULL) {
+    if (glyphInfo == NULL) {
         FREE_AND_RETURN;
     }
     glyphInfo->cellInfo = NULL;
--- a/jdk/src/windows/native/sun/windows/awt_Component.cpp	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/windows/native/sun/windows/awt_Component.cpp	Wed Jul 05 18:16:12 2017 +0200
@@ -1474,9 +1474,7 @@
           ::GetClientRect( GetHWnd(), &r );
           mr = WmSize(static_cast<UINT>(wParam), r.right - r.left, r.bottom - r.top);
           //mr = WmSize(wParam, LOWORD(lParam), HIWORD(lParam));
-          if (ImmGetContext() != NULL) {
-              SetCompositionWindow(r);
-          }
+          SetCompositionWindow(r);
           break;
       }
       case WM_SIZING:
@@ -1535,7 +1533,10 @@
               // When the window is deactivated, send WM_IME_ENDCOMPOSITION
               // message to deactivate the composition window so that
               // it won't receive keyboard input focus.
-              if (ImmGetContext() != NULL) {
+              HIMC hIMC;
+              HWND hwnd = ImmGetHWnd();
+              if ((hIMC = ImmGetContext(hwnd)) != NULL) {
+                  ImmReleaseContext(hwnd, hIMC);
                   DefWindowProc(WM_IME_ENDCOMPOSITION, 0, 0);
               }
           }
@@ -1718,11 +1719,9 @@
       case WM_IME_SETCONTEXT:
           // lParam is passed as pointer and it can be modified.
           mr = WmImeSetContext(static_cast<BOOL>(wParam), &lParam);
-          CallProxyDefWindowProc(message, wParam, lParam, retValue, mr);
           break;
       case WM_IME_NOTIFY:
           mr = WmImeNotify(wParam, lParam);
-          CallProxyDefWindowProc(message, wParam, lParam, retValue, mr);
           break;
       case WM_IME_STARTCOMPOSITION:
           mr = WmImeStartComposition();
@@ -3723,12 +3722,14 @@
 // support IME Composition messages
 void AwtComponent::SetCompositionWindow(RECT& r)
 {
-    HIMC hIMC = ImmGetContext();
+    HWND hwnd = ImmGetHWnd();
+    HIMC hIMC = ImmGetContext(hwnd);
     if (hIMC == NULL) {
         return;
     }
     COMPOSITIONFORM cf = {CFS_DEFAULT, {0, 0}, {0, 0, 0, 0}};
     ImmSetCompositionWindow(hIMC, &cf);
+    ImmReleaseContext(hwnd, hIMC);
 }
 
 void AwtComponent::OpenCandidateWindow(int x, int y)
@@ -3742,16 +3743,16 @@
             SetCandidateWindow(iCandType, x-rc.left, y-rc.top);
     }
     if (m_bitsCandType != 0) {
-        HWND proxy = GetProxyFocusOwner();
         // REMIND: is there any chance GetProxyFocusOwner() returns NULL here?
-        ::DefWindowProc((proxy != NULL) ? proxy : GetHWnd(),
+        ::DefWindowProc(ImmGetHWnd(),
                         WM_IME_NOTIFY, IMN_OPENCANDIDATE, m_bitsCandType);
     }
 }
 
 void AwtComponent::SetCandidateWindow(int iCandType, int x, int y)
 {
-    HIMC hIMC = ImmGetContext();
+    HWND hwnd = ImmGetHWnd();
+    HIMC hIMC = ImmGetContext(hwnd);
     CANDIDATEFORM cf;
     cf.dwIndex = iCandType;
     cf.dwStyle = CFS_CANDIDATEPOS;
@@ -3759,17 +3760,20 @@
     cf.ptCurrentPos.y = y;
 
     ImmSetCandidateWindow(hIMC, &cf);
+    ImmReleaseContext(hwnd, hIMC);
 }
 
 MsgRouting AwtComponent::WmImeSetContext(BOOL fSet, LPARAM *lplParam)
 {
     // If the Windows input context is disabled, do not let Windows
     // display any UIs.
-    HIMC hIMC = ImmGetContext();
+    HWND hwnd = ImmGetHWnd();
+    HIMC hIMC = ImmGetContext(hwnd);
     if (hIMC == NULL) {
         *lplParam = 0;
         return mrDoDefault;
     }
+    ImmReleaseContext(hwnd, hIMC);
 
     if (fSet) {
         LPARAM lParam = *lplParam;
@@ -3824,11 +3828,13 @@
     AwtInputTextInfor* textInfor = NULL;
 
     try {
-        HIMC hIMC = ImmGetContext();
+        HWND hwnd = ImmGetHWnd();
+        HIMC hIMC = ImmGetContext(hwnd);
         DASSERT(hIMC!=0);
 
         textInfor = new AwtInputTextInfor;
         textInfor->GetContextData(hIMC, flags);
+        ImmReleaseContext(hwnd, hIMC);
 
         jstring jtextString = textInfor->GetText();
         /* The conditions to send the input method event to AWT EDT are:
@@ -4012,16 +4018,15 @@
     DASSERT(!safe_ExceptionOccurred(env));
 }
 
-HIMC AwtComponent::ImmGetContext()
+HWND AwtComponent::ImmGetHWnd()
 {
     HWND proxy = GetProxyFocusOwner();
-    return ::ImmGetContext((proxy != NULL) ? proxy : GetHWnd());
+    return (proxy != NULL) ? proxy : GetHWnd();
 }
 
 HIMC AwtComponent::ImmAssociateContext(HIMC himc)
 {
-    HWND proxy = GetProxyFocusOwner();
-    return ::ImmAssociateContext((proxy != NULL) ? proxy : GetHWnd(), himc);
+    return ::ImmAssociateContext(ImmGetHWnd(), himc);
 }
 
 HWND AwtComponent::GetProxyFocusOwner()
--- a/jdk/src/windows/native/sun/windows/awt_Component.h	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/windows/native/sun/windows/awt_Component.h	Wed Jul 05 18:16:12 2017 +0200
@@ -464,7 +464,7 @@
                               int caretPos, int visiblePos);
     void InquireCandidatePosition();
     INLINE LPARAM GetCandidateType() { return m_bitsCandType; }
-    HIMC ImmGetContext();
+    HWND ImmGetHWnd();
     HIMC ImmAssociateContext(HIMC himc);
     HWND GetProxyFocusOwner();
 
--- a/jdk/src/windows/native/sun/windows/awt_FileDialog.cpp	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/windows/native/sun/windows/awt_FileDialog.cpp	Wed Jul 05 18:16:12 2017 +0200
@@ -156,6 +156,7 @@
             HIMC hIMC = ::ImmGetContext(hdlg);
             if (hIMC != NULL) {
                 ::ImmNotifyIME(hIMC, NI_COMPOSITIONSTR, CPS_CANCEL, 0);
+                ::ImmReleaseContext(hdlg, hIMC);
             }
 
             WNDPROC lpfnWndProc = (WNDPROC)(::GetProp(parent, NativeDialogWndProcProp));
--- a/jdk/src/windows/native/sun/windows/awt_Frame.cpp	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/windows/native/sun/windows/awt_Frame.cpp	Wed Jul 05 18:16:12 2017 +0200
@@ -319,8 +319,6 @@
         case WM_IME_STARTCOMPOSITION:
         case WM_IME_ENDCOMPOSITION:
         case WM_IME_COMPOSITION:
-        case WM_IME_SETCONTEXT:
-        case WM_IME_NOTIFY:
         case WM_IME_CONTROL:
         case WM_IME_COMPOSITIONFULL:
         case WM_IME_SELECT:
--- a/jdk/src/windows/native/sun/windows/awt_TextComponent.cpp	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/src/windows/native/sun/windows/awt_TextComponent.cpp	Wed Jul 05 18:16:12 2017 +0200
@@ -336,7 +336,8 @@
 //im --- override to over the spot composition
 void AwtTextComponent::SetCompositionWindow(RECT& rc)
 {
-    HIMC hIMC = ImmGetContext();
+    HWND hwnd = ImmGetHWnd();
+    HIMC hIMC = ImmGetContext(hwnd);
     // rc is not used for text component.
     COMPOSITIONFORM cf = { CFS_FORCE_POSITION, {0,0}, {0,0,0,0} };
     GetCaretPos(&(cf.ptCurrentPos));
@@ -348,6 +349,7 @@
     LOGFONT lf;
     GetObject(m_hFont, sizeof(LOGFONT), &lf);
     ImmSetCompositionFont(hIMC, &lf);
+    ImmReleaseContext(hwnd, hIMC);
 }
 //im --- end
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Frame/7024749/bug7024749.java	Wed Jul 05 18:16:12 2017 +0200
@@ -0,0 +1,59 @@
+/*
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 7024749
+ * @summary JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
+ * @library ../../../regtesthelpers
+ * @build Util
+ * @author Oleg Pekhovskiy: area=awt.toplevel
+   @run main bug7024749
+ */
+
+import java.awt.*;
+import test.java.awt.regtesthelpers.Util;
+
+public class bug7024749 {
+    public static void main(String[] args) {
+        final Frame f = new Frame("F");
+        f.setBounds(0,0,200,200);
+        f.setEnabled(false); // <- disable the top-level
+        f.setVisible(true);
+
+        Window w = new Window(f);
+        w.setBounds(300,300,300,300);
+        w.add(new TextField(20));
+        w.setVisible(true);
+
+        Robot robot = Util.createRobot();
+        robot.setAutoDelay(1000);
+        Util.waitForIdle(robot);
+        robot.delay(1000);
+        Util.clickOnTitle(f, robot);
+        Util.waitForIdle(robot);
+
+        f.dispose();
+        System.out.println("Test passed!");
+    }
+}
--- a/jdk/test/java/lang/ProcessBuilder/Basic.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/test/java/lang/ProcessBuilder/Basic.java	Wed Jul 05 18:16:12 2017 +0200
@@ -26,7 +26,7 @@
  * @bug 4199068 4738465 4937983 4930681 4926230 4931433 4932663 4986689
  *      5026830 5023243 5070673 4052517 4811767 6192449 6397034 6413313
  *      6464154 6523983 6206031 4960438 6631352 6631966 6850957 6850958
- *      4947220 7018606 7034570
+ *      4947220 7018606 7034570 4244896
  * @summary Basic tests for Process and Environment Variable code
  * @run main/othervm/timeout=300 Basic
  * @author Martin Buchholz
@@ -38,6 +38,7 @@
 import java.io.*;
 import java.util.*;
 import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
 import java.security.*;
 import java.util.regex.Pattern;
 import java.util.regex.Matcher;
@@ -636,6 +637,44 @@
         static boolean is() { return is; }
     }
 
+    static class DelegatingProcess extends Process {
+        final Process p;
+
+        DelegatingProcess(Process p) {
+            this.p = p;
+        }
+
+        @Override
+        public void destroy() {
+            p.destroy();
+        }
+
+        @Override
+        public int exitValue() {
+            return p.exitValue();
+        }
+
+        @Override
+        public int waitFor() throws InterruptedException {
+            return p.waitFor();
+        }
+
+        @Override
+        public OutputStream getOutputStream() {
+            return p.getOutputStream();
+        }
+
+        @Override
+        public InputStream getInputStream() {
+            return p.getInputStream();
+        }
+
+        @Override
+        public InputStream getErrorStream() {
+            return p.getErrorStream();
+        }
+    }
+
     private static boolean matches(String str, String regex) {
         return Pattern.compile(regex).matcher(str).find();
     }
@@ -2090,6 +2129,112 @@
         policy.setPermissions(new RuntimePermission("setSecurityManager"));
         System.setSecurityManager(null);
 
+        //----------------------------------------------------------------
+        // Check that Process.isAlive() &
+        // Process.waitFor(0, TimeUnit.MILLISECONDS) work as expected.
+        //----------------------------------------------------------------
+        try {
+            List<String> childArgs = new ArrayList<String>(javaChildArgs);
+            childArgs.add("sleep");
+            final Process p = new ProcessBuilder(childArgs).start();
+            long start = System.nanoTime();
+            if (!p.isAlive() || p.waitFor(0, TimeUnit.MILLISECONDS)) {
+                fail("Test failed: Process exited prematurely");
+            }
+            long end = System.nanoTime();
+            // give waitFor(timeout) a wide berth (100ms)
+            if ((end - start) > 100000000)
+                fail("Test failed: waitFor took too long");
+
+            p.destroy();
+            p.waitFor();
+
+            if (p.isAlive() ||
+                !p.waitFor(0, TimeUnit.MILLISECONDS))
+            {
+                fail("Test failed: Process still alive - please terminate " +
+                    p.toString() + " manually");
+            }
+        } catch (Throwable t) { unexpected(t); }
+
+        //----------------------------------------------------------------
+        // Check that Process.waitFor(timeout, TimeUnit.MILLISECONDS)
+        // works as expected.
+        //----------------------------------------------------------------
+        try {
+            List<String> childArgs = new ArrayList<String>(javaChildArgs);
+            childArgs.add("sleep");
+            final Process p = new ProcessBuilder(childArgs).start();
+            long start = System.nanoTime();
+
+            p.waitFor(1000, TimeUnit.MILLISECONDS);
+
+            long end = System.nanoTime();
+            if ((end - start) < 500000000)
+                fail("Test failed: waitFor didn't take long enough");
+
+            p.destroy();
+
+            start = System.nanoTime();
+            p.waitFor(1000, TimeUnit.MILLISECONDS);
+            end = System.nanoTime();
+            if ((end - start) > 100000000)
+                fail("Test failed: waitFor took too long on a dead process.");
+        } catch (Throwable t) { unexpected(t); }
+
+        //----------------------------------------------------------------
+        // Check that Process.waitFor(timeout, TimeUnit.MILLISECONDS)
+        // interrupt works as expected.
+        //----------------------------------------------------------------
+        try {
+            List<String> childArgs = new ArrayList<String>(javaChildArgs);
+            childArgs.add("sleep");
+            final Process p = new ProcessBuilder(childArgs).start();
+            final long start = System.nanoTime();
+
+            final Thread thread = new Thread() {
+                public void run() {
+                    try {
+                        try {
+                            p.waitFor(10000, TimeUnit.MILLISECONDS);
+                        } catch (InterruptedException e) {
+                            return;
+                        }
+                        fail("waitFor() wasn't interrupted");
+                    } catch (Throwable t) { unexpected(t); }}};
+
+            thread.start();
+            Thread.sleep(1000);
+            thread.interrupt();
+            p.destroy();
+        } catch (Throwable t) { unexpected(t); }
+
+        //----------------------------------------------------------------
+        // Check the default implementation for
+        // Process.waitFor(long, TimeUnit)
+        //----------------------------------------------------------------
+        try {
+            List<String> childArgs = new ArrayList<String>(javaChildArgs);
+            childArgs.add("sleep");
+            final Process proc = new ProcessBuilder(childArgs).start();
+            DelegatingProcess p = new DelegatingProcess(proc);
+            long start = System.nanoTime();
+
+            p.waitFor(1000, TimeUnit.MILLISECONDS);
+
+            long end = System.nanoTime();
+            if ((end - start) < 500000000)
+                fail("Test failed: waitFor didn't take long enough");
+
+            p.destroy();
+
+            start = System.nanoTime();
+            p.waitFor(1000, TimeUnit.MILLISECONDS);
+            end = System.nanoTime();
+            // allow for the less accurate default implementation
+            if ((end - start) > 200000000)
+                fail("Test failed: waitFor took too long on a dead process.");
+        } catch (Throwable t) { unexpected(t); }
     }
 
     static void closeStreams(Process p) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/ProcessBuilder/DestroyTest.java	Wed Jul 05 18:16:12 2017 +0200
@@ -0,0 +1,172 @@
+/*
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4244896
+ * @summary Test for the various platform specific implementations of
+ *          destroyForcibly.
+ */
+
+import java.io.*;
+import java.util.ArrayList;
+import java.util.concurrent.TimeUnit;
+
+abstract class ProcessTest implements Runnable {
+    ProcessBuilder bldr;
+    Process p;
+
+    public Process killProc(boolean force) throws Exception {
+        if (force) {
+            p.destroyForcibly();
+        } else {
+            p.destroy();
+        }
+        return p;
+    }
+
+    public boolean isAlive() {
+        return p.isAlive();
+    }
+
+    public void run() {
+        try {
+            String line;
+            BufferedReader is =
+                new BufferedReader(new InputStreamReader(p.getInputStream()));
+            while ((line = is.readLine()) != null)
+                System.err.println("ProcessTrap: " + line);
+        } catch(IOException e) {
+            if (!e.getMessage().matches("[Ss]tream [Cc]losed")) {
+                throw new RuntimeException(e);
+            }
+        }
+    }
+
+    public abstract void runTest() throws Exception;
+}
+
+class UnixTest extends ProcessTest {
+    public UnixTest(File script) throws IOException {
+        script.deleteOnExit();
+        createScript(script);
+        bldr = new ProcessBuilder(script.getCanonicalPath());
+        bldr.redirectErrorStream(true);
+        bldr.directory(new File("."));
+        p = bldr.start();
+    }
+
+    void createScript(File processTrapScript) throws IOException {
+        processTrapScript.deleteOnExit();
+        FileWriter fstream = new FileWriter(processTrapScript);
+        try (BufferedWriter out = new BufferedWriter(fstream)) {
+            out.write("#!/bin/bash\n" +
+                "echo \\\"ProcessTrap.sh started: trapping SIGTERM/SIGINT\\\"\n" +
+                "trap bashtrap SIGTERM SIGINT\n" +
+                "bashtrap()\n" +
+                "{\n" +
+                "    echo \\\"SIGTERM/SIGINT detected!\\\"\n" +
+                "}\n" +
+                "\n" +
+                "while :\n" +
+                "do\n" +
+                "    sleep 1;\n" +
+                "done\n");
+        }
+        processTrapScript.setExecutable(true, true);
+    }
+
+    @Override
+    public void runTest() throws Exception {
+        killProc(false);
+        Thread.sleep(1000);
+        if (!p.isAlive())
+            throw new RuntimeException("Process terminated prematurely.");
+        killProc(true).waitFor();
+        if (p.isAlive())
+            throw new RuntimeException("Problem terminating the process.");
+    }
+}
+
+class MacTest extends UnixTest {
+    public MacTest(File script) throws IOException {
+        super(script);
+    }
+
+    @Override
+    public void runTest() throws Exception {
+        // On Mac, it appears that when we close the processes streams
+        // after a destroy() call, the process terminates with a
+        // SIGPIPE even if it was trapping the SIGTERM, so as with
+        // windows, we skip the trap test and go straight to destroyForcibly().
+        killProc(true).waitFor();
+        if (p.isAlive())
+            throw new RuntimeException("Problem terminating the process.");
+    }
+}
+
+class WindowsTest extends ProcessTest {
+    public WindowsTest() throws IOException {
+        bldr = new ProcessBuilder("ftp");
+        bldr.redirectErrorStream(true);
+        bldr.directory(new File("."));
+        p = bldr.start();
+    }
+
+    @Override
+    public void runTest() throws Exception {
+        killProc(true).waitFor();
+    }
+}
+
+public class DestroyTest {
+
+    public static ProcessTest getTest() throws Exception {
+        String osName = System.getProperty("os.name");
+        if (osName.startsWith("Windows")) {
+            return new WindowsTest();
+        } else if (osName.startsWith("Linux") == true) {
+            return new UnixTest(
+                File.createTempFile("ProcessTrap-", ".sh",null));
+        } else if (osName.startsWith("Mac OS")) {
+            return new MacTest(
+                File.createTempFile("ProcessTrap-", ".sh",null));
+        } else if (osName.equals("SunOS")) {
+            return new UnixTest(
+                File.createTempFile("ProcessTrap-", ".sh",null));
+        }
+        return null;
+    }
+
+    public static void main(String args[]) throws Exception {
+        ProcessTest test = getTest();
+        if (test == null) {
+            throw new RuntimeException("Unrecognised OS");
+        } else {
+            new Thread(test).start();
+            Thread.sleep(1000);
+            test.runTest();
+        }
+    }
+}
+
--- a/jdk/test/java/util/concurrent/BlockingQueue/LastElement.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/test/java/util/concurrent/BlockingQueue/LastElement.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 6215625
+ * @bug 6215625 7161229
  * @summary Check correct behavior when last element is removed.
  * @author Martin Buchholz
  */
@@ -38,9 +38,7 @@
         testQueue(new ArrayBlockingQueue<Integer>(10, true));
         testQueue(new ArrayBlockingQueue<Integer>(10, false));
         testQueue(new LinkedTransferQueue<Integer>());
-
-        System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
-        if (failed > 0) throw new Exception("Some tests failed");
+        testQueue(new PriorityBlockingQueue<Integer>());
     }
 
     void testQueue(BlockingQueue<Integer> q) throws Throwable {
@@ -59,6 +57,7 @@
         try {check(q.take() == three);}
         catch (Throwable t) {unexpected(t);}
         check(q.isEmpty() && q.size() == 0);
+        check(noRetention(q));
 
         // iterator().remove()
         q.clear();
@@ -77,6 +76,26 @@
         check(q.isEmpty() && q.size() == 0);
     }
 
+    boolean noRetention(BlockingQueue<?> q) {
+        if (q instanceof PriorityBlockingQueue) {
+            PriorityBlockingQueue<?> pbq = (PriorityBlockingQueue) q;
+            try {
+                java.lang.reflect.Field queue =
+                    PriorityBlockingQueue.class.getDeclaredField("queue");
+                queue.setAccessible(true);
+                Object[] a = (Object[]) queue.get(pbq);
+                return a[0] == null;
+            }
+            catch (NoSuchFieldException e) {
+                unexpected(e);
+            }
+            catch (IllegalAccessException e) {
+                // ignore - security manager must be installed
+            }
+        }
+        return true;
+    }
+
     //--------------------- Infrastructure ---------------------------
     volatile int passed = 0, failed = 0;
     void pass() {passed++;}
--- a/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLEngineImpl/SSLEngineBadBufferArrayAccess.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLEngineImpl/SSLEngineBadBufferArrayAccess.java	Wed Jul 05 18:16:12 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -287,18 +287,27 @@
                     if (serverClose) {
                         serverEngine.closeOutbound();
                     }
+                }
+
+                if (closed && isEngineClosed(serverEngine)) {
                     serverIn.flip();
 
                     /*
                      * A sanity check to ensure we got what was sent.
                      */
                     if (serverIn.remaining() != clientMsg.length) {
-                        throw new Exception("Client:  Data length error");
+                        throw new Exception("Client: Data length error -" +
+                            " IF THIS FAILS, PLEASE REPORT THIS TO THE" +
+                            " SECURITY TEAM.  WE HAVE BEEN UNABLE TO" +
+                            " RELIABLY DUPLICATE.");
                     }
 
                     for (int i = 0; i < clientMsg.length; i++) {
                         if (clientMsg[i] != serverIn.get()) {
-                            throw new Exception("Client:  Data content error");
+                            throw new Exception("Client: Data content error -" +
+                            " IF THIS FAILS, PLEASE REPORT THIS TO THE" +
+                            " SECURITY TEAM.  WE HAVE BEEN UNABLE TO" +
+                            " RELIABLY DUPLICATE.");
                         }
                     }
                     serverIn.compact();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/tools/native2ascii/Permission.java	Wed Jul 05 18:16:12 2017 +0200
@@ -0,0 +1,85 @@
+/*
+ * 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.
+ */
+
+/**
+ * @test
+ * @bug 7177216
+ * @summary resulting file of native2ascii should have normal permission
+ */
+
+import java.io.*;
+import java.nio.file.*;
+import java.nio.file.attribute.*;
+import sun.tools.native2ascii.Main;
+
+public class Permission {
+
+    private static void cleanup(String... fnames) throws Throwable {
+        for (String fname : fnames) {
+            Files.deleteIfExists(Paths.get(fname));
+        }
+    }
+
+    public static void realMain(String[] args) throws Throwable {
+        if (!System.getProperty("os.name").startsWith("Windows")) {
+            String src = "native2ascii_permtest_src";
+            String dst = "native2ascii_permtest_dst";
+
+            cleanup(src, dst);
+            try {
+                try (FileOutputStream fos = new FileOutputStream(src)) {
+                    fos.write('a'); fos.write('b'); fos.write('c');
+                }
+                String[] n2aArgs = new String[] {"-encoding", "utf8", src, dst};
+                if (!new Main().convert(n2aArgs)) {
+                    fail("n2a failed.");
+                }
+                equal(Files.getPosixFilePermissions(Paths.get(src)),
+                      Files.getPosixFilePermissions(Paths.get(dst)));
+                String[] a2nArgs = new String[] {"-reverse", "-encoding", "utf8", dst, src};
+                if (!new Main().convert(a2nArgs)) {
+                    fail("a2n failed.");
+                }
+                equal(Files.getPosixFilePermissions(Paths.get(src)),
+                      Files.getPosixFilePermissions(Paths.get(dst)));
+            } finally {
+                cleanup(src, dst);
+            }
+        }
+    }
+
+    //--------------------- Infrastructure ---------------------------
+    static volatile int passed = 0, failed = 0;
+    static void pass() {passed++;}
+    static void fail() {failed++; Thread.dumpStack();}
+    static void fail(String msg) {System.out.println(msg); fail();}
+    static void unexpected(Throwable t) {failed++; t.printStackTrace();}
+    static void check(boolean cond) {if (cond) pass(); else fail();}
+    static void equal(Object x, Object y) {
+        if (x == null ? y == null : x.equals(y)) pass();
+        else fail(x + " not equal to " + y);}
+    public static void main(String[] args) throws Throwable {
+        try {realMain(args);} catch (Throwable t) {unexpected(t);}
+        System.out.println("\nPassed = " + passed + " failed = " + failed);
+        if (failed > 0) throw new AssertionError("Some tests failed");}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/tools/jar/UpdateJar.java	Wed Jul 05 18:16:12 2017 +0200
@@ -0,0 +1,86 @@
+/*
+ * 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.
+ */
+
+/**
+ * @test
+ * @bug 7175845
+ * @summary jar -uf should not change file permission
+ */
+
+import java.io.*;
+import java.nio.file.*;
+import java.nio.file.attribute.*;
+import java.util.Set;
+import sun.tools.jar.Main;
+
+public class UpdateJar {
+
+    private static void cleanup(String... fnames) throws Throwable {
+        for (String fname : fnames) {
+            Files.deleteIfExists(Paths.get(fname));
+        }
+    }
+
+    public static void realMain(String[] args) throws Throwable {
+        if (!System.getProperty("os.name").startsWith("Windows")) {
+            String jar = "testUpdateJar.jar";
+            String e0  = "testUpdateJar_entry0.txt";
+            String e1  = "testUpdateJar_entry1.txt";
+            cleanup(jar, e0, e1);
+            try {
+                try (FileOutputStream fos0 = new FileOutputStream(e0);
+                     FileOutputStream fos1 = new FileOutputStream(e1)) {
+                    fos0.write(0);
+                    fos1.write(0);
+                }
+                String[] jarArgs = new String[] {"cfM0", jar, e0};
+                if (!new Main(System.out, System.err, "jar").run(jarArgs)) {
+                    fail("Could not create jar file.");
+                }
+                Set<PosixFilePermission> pm = Files.getPosixFilePermissions(Paths.get(jar));
+                jarArgs = new String[] {"uf", jar, e1};
+                if (!new Main(System.out, System.err, "jar").run(jarArgs)) {
+                    fail("Could not create jar file.");
+                }
+                equal(pm, Files.getPosixFilePermissions(Paths.get(jar)));
+            } finally {
+                cleanup(jar, e0, e1);
+            }
+        }
+    }
+
+    //--------------------- Infrastructure ---------------------------
+    static volatile int passed = 0, failed = 0;
+    static void pass() {passed++;}
+    static void fail() {failed++; Thread.dumpStack();}
+    static void fail(String msg) {System.out.println(msg); fail();}
+    static void unexpected(Throwable t) {failed++; t.printStackTrace();}
+    static void check(boolean cond) {if (cond) pass(); else fail();}
+    static void equal(Object x, Object y) {
+        if (x == null ? y == null : x.equals(y)) pass();
+        else fail(x + " not equal to " + y);}
+    public static void main(String[] args) throws Throwable {
+        try {realMain(args);} catch (Throwable t) {unexpected(t);}
+        System.out.println("\nPassed = " + passed + " failed = " + failed);
+        if (failed > 0) throw new AssertionError("Some tests failed");}
+}
--- a/langtools/.hgtags	Wed Jul 05 18:15:28 2017 +0200
+++ b/langtools/.hgtags	Wed Jul 05 18:16:12 2017 +0200
@@ -167,3 +167,4 @@
 f8c64d835b2806293b8e924b44f0e32b20657ed3 jdk8-b43
 59cbead12ff46dbb397120bd26635bcd7d41ff21 jdk8-b44
 e111e4587ccada8eb93f72e834e378c76256f4b7 jdk8-b45
+4ca5994971724731233735f055f33d4936fd11d3 jdk8-b46
--- a/langtools/make/tools/genstubs/GenStubs.java	Wed Jul 05 18:15:28 2017 +0200
+++ b/langtools/make/tools/genstubs/GenStubs.java	Wed Jul 05 18:16:12 2017 +0200
@@ -201,7 +201,7 @@
          */
         public void visitTopLevel(JCCompilationUnit tree) {
             super.visitTopLevel(tree);
-            tree.docComments = Collections.emptyMap();
+            tree.docComments = null;
         }
 
         /**