common/autoconf/generated-configure.sh
author chegar
Wed, 03 Dec 2014 14:20:21 +0000
changeset 27560 adc258b13e2c
parent 27331 3947187af23d
child 27602 236555ddac42
permissions -rw-r--r--
8049367: Modular Run-Time Images Reviewed-by: chegar, dfuchs, ihse, joehw, mullan, psandoz, wetmore Contributed-by: alan.bateman@oracle.com, alex.buckley@oracle.com, bradford.wetmore@oracle.com, chris.hegarty@oracle.com, erik.joelsson@oracle.com, james.laskey@oracle.com, jonathan.gibbons@oracle.com, karen.kinnear@oracle.com, magnus.ihse.bursie@oracle.com, mandy.chung@oracle.com, mark.reinhold@oracle.com, paul.sandoz@oracle.com, sundararajan.athijegannathan@oracle.com

#!/bin/bash
#
# ##########################################################
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
# ##########################################################
#
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
#
# Report bugs to <build-dev@openjdk.java.net>.
#
#
# Copyright (C) 1992-1996, 1998-2012 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.
as_myself=
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

# Use a proper internal environment variable to ensure we don't fall
  # into an infinite loop, continuously re-executing ourselves.
  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
    _as_can_reexec=no; export _as_can_reexec;
    # 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.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
case $- in # ((((
  *v*x* | *x*v* ) as_opts=-vx ;;
  *v* ) as_opts=-v ;;
  *x* ) as_opts=-x ;;
  * ) as_opts= ;;
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
as_fn_exit 255
  fi
  # We don't want this to propagate to other subprocesses.
          { _as_can_reexec=; unset _as_can_reexec;}
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
test -x / || 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 :
  export CONFIG_SHELL
             # 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.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
case $- in # ((((
  *v*x* | *x*v* ) as_opts=-vx ;;
  *v* ) as_opts=-v ;;
  *x* ) as_opts=-x ;;
  * ) as_opts= ;;
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
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_executable_p FILE
# -----------------------
# Test if FILE is an executable regular file.
as_fn_executable_p ()
{
  test -f "$1" && test -x "$1"
} # as_fn_executable_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; }

  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
  # already done that, so ensure we don't try to do so again and fall
  # in an infinite loop.  This has already happened in practice.
  _as_can_reexec=no; export _as_can_reexec
  # 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 -pR'.
    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
      as_ln_s='cp -pR'
  elif ln conf$$.file conf$$ 2>/dev/null; then
    as_ln_s=ln
  else
    as_ln_s='cp -pR'
  fi
else
  as_ln_s='cp -pR'
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

as_test_x='test -x'
as_executable_p=as_fn_executable_p

# 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='jdk9'
PACKAGE_STRING='OpenJDK jdk9'
PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
PACKAGE_URL='http://openjdk.java.net'

# 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
SJAVAC_SERVER_DIR
ENABLE_SJAVAC
SJAVAC_SERVER_JAVA_FLAGS
SJAVAC_SERVER_JAVA
JAVA_TOOL_FLAGS_SMALL
JAVA_FLAGS_SMALL
JAVA_FLAGS_BIG
JAVA_FLAGS
JOBS
MEMORY_SIZE
NUM_CORES
ENABLE_INTREE_EC
SALIB_NAME
HOTSPOT_MAKE_ARGS
MSVCR_DLL
LIBCXX
LLVM_LIBS
LLVM_LDFLAGS
LLVM_CFLAGS
LLVM_CONFIG
LIBFFI_LIBS
LIBFFI_CFLAGS
STATIC_CXX_SETTING
LIBDL
LIBM
LIBZIP_CAN_USE_MMAP
USE_EXTERNAL_LIBZ
USE_EXTERNAL_LIBPNG
PNG_LIBS
PNG_CFLAGS
USE_EXTERNAL_LCMS
LCMS_LIBS
LCMS_CFLAGS
USE_EXTERNAL_LIBGIF
USE_EXTERNAL_LIBJPEG
ALSA_LIBS
ALSA_CFLAGS
FREETYPE_BUNDLE_LIB_PATH
FREETYPE_LIBS
FREETYPE_CFLAGS
CUPS_CFLAGS
X_EXTRA_LIBS
X_LIBS
X_PRE_LIBS
X_CFLAGS
XMKMF
FIXPATH
ZIP_DEBUGINFO_FILES
ENABLE_DEBUG_SYMBOLS
CFLAGS_WARNINGS_ARE_ERRORS
COMPILER_SUPPORTS_TARGET_BITS_FLAG
ZERO_ARCHFLAG
LDFLAGS_CXX_JDK
LDFLAGS_JDKEXE_SUFFIX
LDFLAGS_JDKLIB_SUFFIX
LDFLAGS_JDKEXE
LDFLAGS_JDKLIB
CXXFLAGS_JDKEXE
CXXFLAGS_JDKLIB
CFLAGS_JDKEXE
CFLAGS_JDKLIB
MACOSX_VERSION_MIN
LEGACY_EXTRA_LDFLAGS
LEGACY_EXTRA_CXXFLAGS
LEGACY_EXTRA_CFLAGS
CXX_O_FLAG_NONE
CXX_O_FLAG_DEBUG
CXX_O_FLAG_NORM
CXX_O_FLAG_HI
CXX_O_FLAG_HIGHEST
C_O_FLAG_NONE
C_O_FLAG_DEBUG
C_O_FLAG_NORM
C_O_FLAG_HI
C_O_FLAG_HIGHEST
CXXFLAGS_DEBUG_OPTIONS
CFLAGS_DEBUG_OPTIONS
CXXFLAGS_DEBUG_SYMBOLS
CFLAGS_DEBUG_SYMBOLS
CXX_FLAG_DEPS
C_FLAG_DEPS
SET_SHARED_LIBRARY_MAPFILE
SET_SHARED_LIBRARY_NAME
SET_SHARED_LIBRARY_ORIGIN
SET_EXECUTABLE_ORIGIN
SHARED_LIBRARY_FLAGS
CXX_FLAG_REORDER
C_FLAG_REORDER
SYSROOT_LDFLAGS
SYSROOT_CFLAGS
RC_FLAGS
AR_OUT_OPTION
LD_OUT_OPTION
EXE_OUT_OPTION
CC_OUT_OPTION
POST_MCS_CMD
POST_STRIP_CMD
ARFLAGS
COMPILER_TARGET_BITS_FLAG
JT_HOME
JTREGEXE
USING_BROKEN_SUSE_LD
PACKAGE_PATH
LDEXECXX
LDEXE
USE_CLANG
HOTSPOT_LD
HOTSPOT_CXX
HOTSPOT_RC
HOTSPOT_MT
BUILD_LD
BUILD_CXX
BUILD_CC
ac_ct_OBJDUMP
OBJDUMP
ac_ct_OBJCOPY
OBJCOPY
ac_ct_NM
ac_ct_STRIP
MCS
GNM
NM
STRIP
MSBUILD
DUMPBIN
RC
MT
LIPO
ac_ct_OBJC
OBJCFLAGS
OBJC
ac_ct_AR
AR
AS
LDCXX
LD
CXXCPP
CPP
ac_ct_CXX
CXXFLAGS
CXX
ac_ct_PROPER_COMPILER_CXX
PROPER_COMPILER_CXX
TOOLCHAIN_PATH_CXX
POTENTIAL_CXX
OBJEXT
EXEEXT
ac_ct_CC
CPPFLAGS
LDFLAGS
CFLAGS
CC
ac_ct_PROPER_COMPILER_CC
PROPER_COMPILER_CC
TOOLCHAIN_PATH_CC
POTENTIAL_CC
VS_LIB
VS_INCLUDE
VS_PATH
CYGWIN_LINK
EXE_SUFFIX
OBJ_SUFFIX
STATIC_LIBRARY
SHARED_LIBRARY
STATIC_LIBRARY_SUFFIX
SHARED_LIBRARY_SUFFIX
LIBRARY_PREFIX
TOOLCHAIN_TYPE
BUILD_HOTSPOT
HOTSPOT_DIST
BUILD_OUTPUT
OVERRIDE_SRC_ROOT
ADD_SRC_ROOT
JDK_TOPDIR
NASHORN_TOPDIR
HOTSPOT_TOPDIR
JAXWS_TOPDIR
JAXP_TOPDIR
CORBA_TOPDIR
LANGTOOLS_TOPDIR
JAVAC_FLAGS
BOOT_JDK_SOURCETARGET
JARSIGNER
NATIVE2ASCII
JAR
JAVAH
JAVAC
JAVA
BOOT_JDK
JAVA_CHECK
JAVAC_CHECK
COOKED_BUILD_NUMBER
JDK_VERSION
COPYRIGHT_YEAR
MACOSX_BUNDLE_ID_BASE
MACOSX_BUNDLE_NAME_BASE
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
USER_RELEASE_SUFFIX
COMPRESS_JARS
RMICONNECTOR_IIOP
UNLIMITED_CRYPTO
CACERTS_FILE
TEST_IN_BUILD
BUILD_HEADLESS
SUPPORT_HEADFUL
SUPPORT_HEADLESS
BDEPS_FTP
BDEPS_UNZIP
OS_VERSION_MICRO
OS_VERSION_MINOR
OS_VERSION_MAJOR
PKG_CONFIG
CODESIGN
XATTR
DSYMUTIL
IS_GNU_TIME
TIME
STAT
HG
READELF
OTOOL
LDD
ZIP
UNZIP
FIND_DELETE
OUTPUT_SYNC
OUTPUT_SYNC_SUPPORTED
MAKE
CHECK_TOOLSDIR_MAKE
CHECK_TOOLSDIR_GMAKE
CHECK_MAKE
CHECK_GMAKE
PKGHANDLER
OUTPUT_ROOT
CONF_NAME
SPEC
SDKROOT
XCODEBUILD
BUILD_VARIANT_RELEASE
DEBUG_CLASSFILES
FASTDEBUG
VARIANT
DEBUG_LEVEL
MACOSX_UNIVERSAL
INCLUDE_SA
JVM_VARIANT_CORE
JVM_VARIANT_ZEROSHARK
JVM_VARIANT_ZERO
JVM_VARIANT_KERNEL
JVM_VARIANT_MINIMAL1
JVM_VARIANT_CLIENT
JVM_VARIANT_SERVER
JVM_VARIANTS
JVM_INTERPRETER
JDK_VARIANT
SET_OPENJDK
BUILD_LOG_WRAPPER
BUILD_LOG_PREVIOUS
BUILD_LOG
TOPDIR
PATH_SEP
ZERO_ARCHDEF
DEFINE_CROSS_COMPILE_ARCH
LP64
OPENJDK_TARGET_OS_EXPORT_DIR
OPENJDK_TARGET_OS_API_DIR
OPENJDK_TARGET_CPU_JLI_CFLAGS
OPENJDK_TARGET_CPU_OSARCH
OPENJDK_TARGET_CPU_ISADIR
OPENJDK_TARGET_CPU_LIBDIR
OPENJDK_TARGET_CPU_LEGACY_LIB
OPENJDK_TARGET_CPU_LEGACY
REQUIRED_OS_VERSION
REQUIRED_OS_NAME
COMPILE_TYPE
OPENJDK_TARGET_CPU_ENDIAN
OPENJDK_TARGET_CPU_BITS
OPENJDK_TARGET_CPU_ARCH
OPENJDK_TARGET_CPU
OPENJDK_TARGET_OS_ENV
OPENJDK_TARGET_OS_API
OPENJDK_TARGET_OS
OPENJDK_BUILD_CPU_ENDIAN
OPENJDK_BUILD_CPU_BITS
OPENJDK_BUILD_CPU_ARCH
OPENJDK_BUILD_CPU
OPENJDK_BUILD_OS_ENV
OPENJDK_BUILD_OS_API
OPENJDK_BUILD_OS
OPENJDK_BUILD_AUTOCONF_NAME
OPENJDK_TARGET_AUTOCONF_NAME
target_os
target_vendor
target_cpu
target
host_os
host_vendor
host_cpu
host
build_os
build_vendor
build_cpu
build
CPIO
SETFILE
DF
READLINK
CYGPATH
SED
FGREP
EGREP
GREP
AWK
XARGS
WHICH
WC
UNIQ
UNAME
TR
TOUCH
TEE
TAR
TAIL
SORT
SH
RM
PRINTF
NAWK
MV
MKTEMP
MKDIR
LS
LN
HEAD
FIND
FILE
EXPR
ECHO
DIRNAME
DIFF
DATE
CUT
CP
COMM
CMP
CHMOD
CAT
BASH
BASENAME
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_target_bits
enable_openjdk_only
with_custom_make_dir
with_jdk_variant
with_jvm_interpreter
with_jvm_variants
enable_debug
with_debug_level
with_devkit
with_sys_root
with_sysroot
with_tools_dir
with_toolchain_path
with_extra_path
with_sdk_name
with_conf_name
with_output_sync
with_builddeps_conf
with_builddeps_server
with_builddeps_dir
with_builddeps_group
enable_headful
enable_hotspot_test_in_build
with_cacerts_file
enable_unlimited_crypto
enable_rmiconnector_iiop
with_milestone
with_update_version
with_user_release_suffix
with_build_number
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_nashorn
with_override_jdk
with_import_hotspot
with_toolchain_type
with_jtreg
with_extra_cflags
with_extra_cxxflags
with_extra_ldflags
enable_debug_symbols
enable_zip_debug_info
with_x
with_cups
with_cups_include
with_freetype
with_freetype_include
with_freetype_lib
with_freetype_src
enable_freetype_bundling
with_alsa
with_alsa_include
with_alsa_lib
with_libjpeg
with_giflib
with_lcms
with_libpng
with_zlib
with_stdc__lib
with_msvcr_dll
with_dxsdk
with_dxsdk_lib
with_dxsdk_include
with_num_cores
with_memory_size
with_jobs
with_boot_jdk_jvmargs
with_sjavac_server_java
enable_sjavac
enable_precompiled_headers
enable_ccache
with_ccache_dir
'
      ac_precious_vars='build_alias
host_alias
target_alias
BASENAME
BASH
CAT
CHMOD
CMP
COMM
CP
CUT
DATE
DIFF
DIRNAME
ECHO
EXPR
FILE
FIND
HEAD
LN
LS
MKDIR
MKTEMP
MV
NAWK
PRINTF
RM
SH
SORT
TAIL
TAR
TEE
TOUCH
TR
UNAME
UNIQ
WC
WHICH
XARGS
AWK
GREP
EGREP
FGREP
SED
CYGPATH
READLINK
DF
SETFILE
CPIO
UNZIP
ZIP
LDD
OTOOL
READELF
HG
STAT
TIME
DSYMUTIL
XATTR
CODESIGN
PKG_CONFIG
JAVA
JAVAC
JAVAH
JAR
NATIVE2ASCII
JARSIGNER
CC
CFLAGS
LDFLAGS
LIBS
CPPFLAGS
CXX
CXXFLAGS
CCC
CPP
CXXCPP
AS
AR
OBJC
OBJCFLAGS
LIPO
STRIP
NM
GNM
MCS
OBJCOPY
OBJDUMP
BUILD_CC
BUILD_CXX
BUILD_LD
JTREGEXE
XMKMF
FREETYPE_CFLAGS
FREETYPE_LIBS
ALSA_CFLAGS
ALSA_LIBS
LCMS_CFLAGS
LCMS_LIBS
PNG_CFLAGS
PNG_LIBS
LIBFFI_CFLAGS
LIBFFI_LIBS
CCACHE'


# 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
  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 jdk9 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 jdk9:";;
   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   suppress building custom source even if present
                          [disabled]
  --enable-debug          set the debug level to fastdebug (shorthand for
                          --with-debug-level=fastdebug) [disabled]
  --disable-headful       disable building headful support (graphical UI
                          support) [enabled]
  --enable-hotspot-test-in-build
                          run the Queens test after Hotspot build [disabled]
  --enable-unlimited-crypto
                          Enable unlimited crypto policy [disabled]
  --enable-rmiconnector-iiop
                          enable the JMX RMIConnector iiop transport
                          [disabled]
  --disable-debug-symbols disable generation of debug symbols [enabled]
  --disable-zip-debug-info
                          disable zipping of debug-info files [enabled]
  --disable-freetype-bundling
                          disable bundling of the freetype library with the
                          build result [enabled on Windows or when using
                          --with-freetype, disabled otherwise]
  --enable-sjavac         use sjavac to do fast incremental compiles
                          [disabled]
  --disable-precompiled-headers
                          disable using precompiled headers when compiling C++
                          [enabled]
  --enable-ccache         enable using ccache to speed up recompilations
                          [disabled]

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
                          support it), e.g. --with-target-bits=32 [guessed]
  --with-custom-make-dir  Deprecated. Option is kept for backwards
                          compatibility and is ignored
  --with-jdk-variant      JDK variant to build (normal) [normal]
  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
  --with-jvm-variants     JVM variants (separated by commas) to build (server,
                          client, minimal1, kernel, zero, zeroshark, core)
                          [server]
  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
                          optimized (HotSpot build only)) [release]
  --with-devkit           use this devkit for compilers, tools and resources
  --with-sys-root         alias for --with-sysroot for backwards compatability
  --with-sysroot          use this directory as sysroot
  --with-tools-dir        alias for --with-toolchain-path for backwards
                          compatibility
  --with-toolchain-path   prepend these directories when searching for
                          toolchain binaries (compilers etc)
  --with-extra-path       prepend these directories to the default path
  --with-sdk-name         use the platform SDK of the given name. [macosx]
  --with-conf-name        use this as the name of the configuration [generated
                          from important configuration options]
  --with-output-sync      set make output sync type if supported by make.
                          [recurse]
  --with-builddeps-conf   use this configuration file for the builddeps
  --with-builddeps-server download and use build dependencies from this server
                          url
  --with-builddeps-dir    store downloaded build dependencies here
                          [/localhome/builddeps]
  --with-builddeps-group  chgrp the downloaded build dependencies to this
                          group
  --with-cacerts-file     specify alternative cacerts file
  --with-milestone        Set milestone value for build [internal]
  --with-update-version   Set update version value for build [b00]
  --with-user-release-suffix
                          Add a custom string to the version string if build
                          number is not set.[username_builddateb00]
  --with-build-number     Set build number value for build [b00]
  --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-nashorn use this nashorn dir for the build
  --with-override-jdk     use this jdk dir for the build
  --with-import-hotspot   import hotspot binaries from this jdk image or
                          hotspot build dist dir instead of building from
                          source
  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
                          to show possible values [platform dependent]
  --with-jtreg            Regression Test Harness [probed]
  --with-extra-cflags     extra flags to be used when compiling jdk c-files
  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
  --with-extra-ldflags    extra flags to be used when linking jdk
  --with-x                use the X Window System
  --with-cups             specify prefix directory for the cups package
                          (expecting the headers under PATH/include)
  --with-cups-include     specify directory for the cups include files
  --with-freetype         specify prefix directory for the freetype package
                          (expecting the libraries under PATH/lib and the
                          headers under PATH/include)
  --with-freetype-include specify directory for the freetype include files
  --with-freetype-lib     specify directory for the freetype library
  --with-freetype-src     specify directory with freetype sources to
                          automatically build the library (experimental,
                          Windows-only)
  --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-libjpeg          use libjpeg from build system or OpenJDK source
                          (system, bundled) [bundled]
  --with-giflib           use giflib from build system or OpenJDK source
                          (system, bundled) [bundled]
  --with-lcms             use lcms2 from build system or OpenJDK source
                          (system, bundled) [bundled]
  --with-libpng           use libpng from build system or OpenJDK source
                          (system, bundled) [bundled]
  --with-zlib             use zlib from build system or OpenJDK source
                          (system, bundled) [bundled]
  --with-stdc++lib=<static>,<dynamic>,<default>
                          force linking of the C++ runtime on Linux to either
                          static or dynamic, default is static with dynamic as
                          fallback
  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
                          only) [probed]
  --with-dxsdk            Deprecated. Option is kept for backwards
                          compatibility and is ignored
  --with-dxsdk-lib        Deprecated. Option is kept for backwards
                          compatibility and is ignored
  --with-dxsdk-include    Deprecated. Option is kept for backwards
                          compatibility and is ignored
  --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-jobs             number of parallel jobs to let make run [calculated
                          based on cores and memory]
  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
                          invocations of boot JDK, overriding the default
                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
                          -enableassertions"
  --with-sjavac-server-java
                          use this java binary for running the sjavac
                          background server [Boot JDK java]
  --with-ccache-dir       where to store ccache files [~/.ccache]

Some influential environment variables:
  BASENAME    Override default value for BASENAME
  BASH        Override default value for BASH
  CAT         Override default value for CAT
  CHMOD       Override default value for CHMOD
  CMP         Override default value for CMP
  COMM        Override default value for COMM
  CP          Override default value for CP
  CUT         Override default value for CUT
  DATE        Override default value for DATE
  DIFF        Override default value for DIFF
  DIRNAME     Override default value for DIRNAME
  ECHO        Override default value for ECHO
  EXPR        Override default value for EXPR
  FILE        Override default value for FILE
  FIND        Override default value for FIND
  HEAD        Override default value for HEAD
  LN          Override default value for LN
  LS          Override default value for LS
  MKDIR       Override default value for MKDIR
  MKTEMP      Override default value for MKTEMP
  MV          Override default value for MV
  NAWK        Override default value for NAWK
  PRINTF      Override default value for PRINTF
  RM          Override default value for RM
  SH          Override default value for SH
  SORT        Override default value for SORT
  TAIL        Override default value for TAIL
  TAR         Override default value for TAR
  TEE         Override default value for TEE
  TOUCH       Override default value for TOUCH
  TR          Override default value for TR
  UNAME       Override default value for UNAME
  UNIQ        Override default value for UNIQ
  WC          Override default value for WC
  WHICH       Override default value for WHICH
  XARGS       Override default value for XARGS
  AWK         Override default value for AWK
  GREP        Override default value for GREP
  EGREP       Override default value for EGREP
  FGREP       Override default value for FGREP
  SED         Override default value for SED
  CYGPATH     Override default value for CYGPATH
  READLINK    Override default value for READLINK
  DF          Override default value for DF
  SETFILE     Override default value for SETFILE
  CPIO        Override default value for CPIO
  UNZIP       Override default value for UNZIP
  ZIP         Override default value for ZIP
  LDD         Override default value for LDD
  OTOOL       Override default value for OTOOL
  READELF     Override default value for READELF
  HG          Override default value for HG
  STAT        Override default value for STAT
  TIME        Override default value for TIME
  DSYMUTIL    Override default value for DSYMUTIL
  XATTR       Override default value for XATTR
  CODESIGN    Override default value for CODESIGN
  PKG_CONFIG  path to pkg-config utility
  JAVA        Override default value for JAVA
  JAVAC       Override default value for JAVAC
  JAVAH       Override default value for JAVAH
  JAR         Override default value for JAR
  NATIVE2ASCII
              Override default value for NATIVE2ASCII
  JARSIGNER   Override default value for JARSIGNER
  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
  CPP         C preprocessor
  CXXCPP      C++ preprocessor
  AS          Override default value for AS
  AR          Override default value for AR
  OBJC        Objective C compiler command
  OBJCFLAGS   Objective C compiler flags
  LIPO        Override default value for LIPO
  STRIP       Override default value for STRIP
  NM          Override default value for NM
  GNM         Override default value for GNM
  MCS         Override default value for MCS
  OBJCOPY     Override default value for OBJCOPY
  OBJDUMP     Override default value for OBJDUMP
  BUILD_CC    Override default value for BUILD_CC
  BUILD_CXX   Override default value for BUILD_CXX
  BUILD_LD    Override default value for BUILD_LD
  JTREGEXE    Override default value for JTREGEXE
  XMKMF       Path to xmkmf, Makefile generator for X Window System
  FREETYPE_CFLAGS
              C compiler flags for FREETYPE, overriding pkg-config
  FREETYPE_LIBS
              linker flags for FREETYPE, overriding pkg-config
  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
  PNG_LIBS    linker flags for PNG, overriding pkg-config
  LIBFFI_CFLAGS
              C compiler flags for LIBFFI, overriding pkg-config
  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
  CCACHE      Override default value for CCACHE

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>.
OpenJDK home page: <http://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 jdk9
generated by GNU Autoconf 2.69

Copyright (C) 2012 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; ${as_lineno_stack:+:} 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; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_cxx_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; ${as_lineno_stack:+:} 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; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_cxx_try_cpp

# 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; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_objc_try_compile

# ac_fn_c_try_link LINENO
# -----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_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_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext && {
	 test "$cross_compiling" = yes ||
	 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; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_c_try_link

# 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 \${$3+:} false; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
if eval \${$3+:} false; 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 \${$3+:} false; 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; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_cxx_check_header_mongrel

# 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; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_cxx_try_run

# 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 \${$3+:} false; 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; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_cxx_check_header_compile

# 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 test_array [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 test_array [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 test_array [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 test_array [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 test_array [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; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_cxx_compute_int

# 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 ||
	 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; ${as_lineno_stack:+:} 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 \${$3+:} false; 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; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_cxx_check_func

# ac_fn_c_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_c_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 \${$3+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
#include <$2>
_ACEOF
if ac_fn_c_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; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_c_check_header_compile
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by OpenJDK $as_me jdk9, which was
generated by GNU Autoconf 2.69.  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



ac_aux_dir=
for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/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 $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/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 (c) 2012, 2013, 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 © 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, 2014, 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.
#

# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
# If so, then append $1 to $2 \
# Also set JVM_ARG_OK to true/false depending on outcome.


# Appends a string to a path variable, only adding the : when needed.


# Prepends a string to a path variable, only adding the : when needed.


# This will make sure the given variable points to a full and proper
# path. This means:
# 1) There will be no spaces in the path. On posix platforms,
#    spaces in the path will result in an error. On Windows,
#    the path will be rewritten using short-style to be space-free.
# 2) The path will be absolute, and it will be in unix-style (on
#     cygwin).
# $1: The name of the variable to fix


# This will make sure the given variable points to a executable
# with a full and proper path. This means:
# 1) There will be no spaces in the path. On posix platforms,
#    spaces in the path will result in an error. On Windows,
#    the path will be rewritten using short-style to be space-free.
# 2) The path will be absolute, and it will be in unix-style (on
#     cygwin).
# Any arguments given to the executable is preserved.
# If the input variable does not have a directory specification, then
# it need to be in the PATH.
# $1: The name of the variable to fix




# Register a --with argument but mark it as deprecated
# $1: The name of the with argument to deprecate, not including --with-


# Register a --enable argument but mark it as deprecated
# $1: The name of the with argument to deprecate, not including --enable-
# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)




# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
# $1: variable to check


# Check that there are no unprocessed overridden variables left.
# If so, they are an incorrect argument and we will exit with an error.


# Setup a tool for the given variable. If correctly specified by the user,
# use that value, otherwise search for the tool using the supplied code snippet.
# $1: variable to set
# $2: code snippet to call to look for the tool


# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
# $1: variable to set
# $2: executable name (or list of names) to look for


# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
# $1: variable to set
# $2: executable name (or list of names) to look for


# Like BASIC_PATH_PROGS but fails if no tool was found.
# $1: variable to set
# $2: executable name (or list of names) to look for


# Like BASIC_SETUP_TOOL but fails if no tool was found.
# $1: variable to set
# $2: autoconf macro to call to look for the special tool


# Setup the most fundamental tools that relies on not much else to set up,
# but is used by much of the early bootstrap code.


# Setup basic configuration paths, and platform-specific stuff related to PATHs.









#%%% Simple tools %%%

# Check if we have found a usable version of make
# $1: the path to a potential make binary (or empty)
# $2: the description on how we found this




# Goes looking for a usable version of GNU make.






# Check if build directory is on local disk. If not possible to determine,
# we prefer to claim it's local.
# Argument 1: directory to test
# Argument 2: what to do if it is on local disk
# Argument 3: what to do otherwise (remote disk or failure)


# Check that source files have basic read permissions set. This might
# not be the case in cygwin in certain conditions.




#
# 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.
#





# Helper function which possibly converts a path using DOS-style short mode.
# If so, the updated path is stored in $new_path.
# $1: The path to check


# Helper function which possibly converts a path using DOS-style short mode.
# If so, the updated path is stored in $new_path.
# $1: The path to check


# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
# and could probably be heavily simplified. However, all changes in this
# area tend to need lot of testing in different scenarios, and in lack of
# proper unit testing, cleaning this up has not been deemed worth the effort
# at the moment.









# Setup basic configuration paths, and platform-specific stuff related to PATHs.




#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.  Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#











# ... then the rest
#
# Copyright (c) 2011, 2014, 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 handles detection of the Boot JDK. The Boot JDK detection
# process has been developed as a response to solve a complex real-world
# problem. Initially, it was simple, but it has grown as platform after
# platform, idiosyncracy after idiosyncracy has been supported.
#
# The basic idea is this:
# 1) You need an acceptable *) JDK to use as a Boot JDK
# 2) There are several ways to locate a JDK, that are mostly platform
#    dependent **)
# 3) You can have multiple JDKs installed
# 4) If possible, configure should try to dig out an acceptable JDK
#    automatically, without having to resort to command-line options
#
# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
#     javac) and not a JRE, etc.
#
# **) On Windows we typically use a well-known path.
#     On MacOSX we typically use the tool java_home.
#     On Linux we typically find javac in the $PATH, and then follow a
#     chain of symlinks that often ends up in a real JDK.
#
# This leads to the code where we check in different ways to locate a
# JDK, and if one is found, check if it is acceptable. If not, we print
# our reasons for rejecting it (useful when debugging non-working
# configure situations) and continue checking the next one.
########################################################################

# Execute the check given as argument, and verify the result
# If the Boot JDK was previously found, do nothing
# $1 A command line (typically autoconf macro) to execute


# Test: Is bootjdk explicitely set by command line arguments?


# Test: Is bootjdk available from builddeps?


# Test: Is $JAVA_HOME set?


# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?


# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
# $1: Argument to the java_home binary (optional)


# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?


# Look for a jdk in the given path. If there are multiple, try to select the newest.
# If found, set BOOT_JDK and BOOT_JDK_FOUND.
# $1 = Path to directory containing jdk installations.
# $2 = String to append to the found JDK directory to get the proper JDK home


# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
# environmental variable as base for where to look.
# $1 Name of an environmal variable, assumed to point to the Program Files directory.


# Test: Is there a JDK installed in default, well-known locations?


# Check that a command-line tool in the Boot JDK is correct
# $1 = name of variable to assign
# $2 = name of binary


###############################################################################
#
# 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, 2014, 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.
#





# Documentation on common flags used for solstudio in 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.
#
# -fns: Use non-standard floating point mode (not IEEE 754)
# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
# -fsingle: Use single precision floating point with 'float'
# -xalias_level=basic: 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)
# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
#   (If you expect perfect errno behavior, do not use this)
# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
# -xrestrict: 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)
# -xlibmil: Inline some library routines
#   (If you expect perfect errno behavior, do not use this)
# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
#   (If you expect perfect errno behavior, do not use this)
#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now

    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
    # Bug?
    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
    #fi





# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
#                                   [RUN-IF-FALSE])
# ------------------------------------------------------------
# Check that the c and c++ compilers support an argument


# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
#                                    [RUN-IF-FALSE])
# ------------------------------------------------------------
# Check that the linker support an argument




#
# Copyright (c) 2011, 2014, 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.
#





cygwin_help() {
  case $1 in
    unzip)
      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
      ;;
    zip)
      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
      ;;
    make)
      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
      ;;
    freetype)
      HELP_MSG="
The freetype library can now be build during the configure process.
Download the freetype sources and unpack them into an arbitrary directory:

wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
tar -xzf freetype-2.5.3.tar.gz

Then run configure with '--with-freetype-src=<freetype_src>'. This will
automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
builds or into '<freetype_src>/lib32' for 32-bit builds.
Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
      ;;
  esac
}

msys_help() {
  PKGHANDLER_COMMAND=""
}

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" ;;
    freetype)
      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 libxt-dev" ;;
    ccache)
      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
  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" ;;
    freetype)
      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
    pulse)
      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
    x11)
      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
    ccache)
      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
  esac
}

port_help() {
  PKGHANDLER_COMMAND=""
}

pkgutil_help() {
  PKGHANDLER_COMMAND=""
}

pkgadd_help() {
  PKGHANDLER_COMMAND=""
}

# This function will check if we're called from the "configure" wrapper while
# printing --help. If so, we will print out additional information that can
# only be extracted within the autoconf script, and then exit. This must be
# called at the very beginning in configure.ac.




#
# Copyright (c) 2011, 2014, 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.
#










###############################################################################
#
# Should we build only OpenJDK even if closed sources are present?
#




###############################################################################
#
# Setup version numbers
#






#
# Copyright (c) 2011, 2014, 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.
#

# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
# Converts autoconf style CPU name to OpenJDK style, into
# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.


# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
# Converts autoconf style OS name to OpenJDK style, into
# VAR_OS and VAR_OS_API.


# 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, OPENJDK_TARGET_CPU,
# OPENJDK_BUILD_OS, etc.


# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
# accordingly. Must be done after setting up build and target system, but before
# doing anything else with these values.


# Setup the legacy variables, for controlling the old makefiles.
#




#%%% Build and target systems %%%




# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
# Add -mX to various FLAGS variables.






#
# 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, 2014, 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 is responsible for detecting, verifying and setting up the
# toolchain, i.e. the compiler, linker and related utilities. It will setup
# proper paths to the binaries, but it will not setup any flags.
#
# The binaries used is determined by the toolchain type, which is the family of
# compilers and related tools that are used.
########################################################################


# All valid toolchains, regardless of platform (used by help.m4)
VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"

# These toolchains are valid on different platforms
VALID_TOOLCHAINS_linux="gcc clang"
VALID_TOOLCHAINS_solaris="solstudio"
VALID_TOOLCHAINS_macosx="gcc clang"
VALID_TOOLCHAINS_aix="xlc"
VALID_TOOLCHAINS_windows="microsoft"

# Toolchain descriptions
TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"

# Setup a number of variables describing how native output files are
# named on this platform/toolchain.


# Determine which toolchain type to use, and make sure it is valid for this
# platform. Setup various information about the selected toolchain.


# Before we start detecting the toolchain executables, we might need some
# special setup, e.g. additional paths etc.


# Restore path, etc


# Check if a compiler is of the toolchain type we expect, and save the version
# information from it. If the compiler does not match the expected type,
# this function will abort using AC_MSG_ERROR. If it matches, the version will
# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
#
# $1 = compiler to test (CC or CXX)
# $2 = human readable name of compiler (C or C++)


# Try to locate the given C or C++ compiler in the path, or otherwise.
#
# $1 = compiler to test (CC or CXX)
# $2 = human readable name of compiler (C or C++)
# $3 = list of compiler names to search for


# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
# archiver (AR). Verify that the compilers are correct according to the
# toolchain type.


# Setup additional tools that is considered a part of the toolchain, but not the
# core part. Many of these are highly platform-specific and do not exist,
# and/or are not needed on all platforms.


# Setup the build tools (i.e, the compiler and linker used to build programs
# that should be run on the build platform, not the target platform, as a build
# helper). Since the non-cross-compile case uses the normal, target compilers
# for this, we can only do this after these have been setup.


# Setup legacy variables that are still needed as alternative ways to refer to
# parts of the toolchain.


# Do some additional checks on the detected tools.


# Setup the JTReg Regression Test Harness.


#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.  Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#







# Check if the VS env variables were setup prior to running configure.
# If not, then find vcvarsall.bat and run it automatically, and integrate
# the set env variables into the spec file.











# This line needs to be here, verbatim, after all includes and the dummy hook
# definitions. It is replaced with custom functionality when building
# custom sources.
#CUSTOM_AUTOCONF_INCLUDE

# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1416999037

###############################################################################
#
# Initialization / Boot-strapping
#
# The bootstrapping process needs to solve the "chicken or the egg" problem,
# thus it jumps back and forth, each time gaining something needed later on.
#
###############################################################################

# If we are requested to print additional help, do that and then exit.
# This must be the very first call.

  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
    $PRINTF "Which are valid to use depends on the build platform.\n"
    for toolchain in $VALID_TOOLCHAINS_all; do
      # Use indirect variable referencing
      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
    done

    # And now exit directly
    exit 0
  fi


# Basic initialization that must happen first of all in the normal process.

  # Save the original command line. This is passed to us by the wrapper configure script.

  DATE_WHEN_CONFIGURED=`LANG=C date`

  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}


  # Start with tools that do not need have cross compilation support
  # and can be expected to be found in the default PATH. These tools are
  # used by configure. Nor are these tools expected to be found in the
  # devkit from the builddeps server either, since they are
  # needed to download the devkit.

  # First are all the simple required tools.



  # Publish this variable in the help.


  if test "x$BASENAME" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in basename
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 ${ac_cv_path_BASENAME+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $BASENAME in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_BASENAME="$BASENAME" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_BASENAME="$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
BASENAME=$ac_cv_path_BASENAME
if test -n "$BASENAME"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
$as_echo "$BASENAME" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$BASENAME" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !BASENAME! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xBASENAME" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in basename
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 ${ac_cv_path_BASENAME+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $BASENAME in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_BASENAME="$BASENAME" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_BASENAME="$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
BASENAME=$ac_cv_path_BASENAME
if test -n "$BASENAME"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
$as_echo "$BASENAME" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$BASENAME" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$BASENAME"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_BASENAME+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $BASENAME in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_BASENAME="$BASENAME" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_BASENAME="$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
BASENAME=$ac_cv_path_BASENAME
if test -n "$BASENAME"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
$as_echo "$BASENAME" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$BASENAME" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
$as_echo_n "checking for BASENAME... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$BASENAME" = x; then
    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$BASH" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in bash
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_BASH+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $BASH in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
BASH=$ac_cv_path_BASH
if test -n "$BASH"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
$as_echo "$BASH" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$BASH" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !BASH! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xBASH" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in bash
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_BASH+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $BASH in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
BASH=$ac_cv_path_BASH
if test -n "$BASH"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
$as_echo "$BASH" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$BASH" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$BASH"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_BASH+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $BASH in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
BASH=$ac_cv_path_BASH
if test -n "$BASH"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
$as_echo "$BASH" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$BASH" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
$as_echo_n "checking for BASH... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$BASH" = x; then
    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$CAT" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in cat
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 ${ac_cv_path_CAT+:} false; 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 as_fn_executable_p "$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 -n "$CAT" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !CAT! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xCAT" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in cat
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 ${ac_cv_path_CAT+:} false; 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 as_fn_executable_p "$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 -n "$CAT" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$CAT"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_CAT+:} false; 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 as_fn_executable_p "$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


        if test "x$CAT" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
$as_echo_n "checking for CAT... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$CAT" = x; then
    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$CHMOD" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in chmod
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 ${ac_cv_path_CHMOD+:} false; 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 as_fn_executable_p "$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 -n "$CHMOD" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !CHMOD! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xCHMOD" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in chmod
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 ${ac_cv_path_CHMOD+:} false; 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 as_fn_executable_p "$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 -n "$CHMOD" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$CHMOD"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_CHMOD+:} false; 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 as_fn_executable_p "$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


        if test "x$CHMOD" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
$as_echo_n "checking for CHMOD... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$CHMOD" = x; then
    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$CMP" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in cmp
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 ${ac_cv_path_CMP+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $CMP in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CMP="$CMP" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_CMP="$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
CMP=$ac_cv_path_CMP
if test -n "$CMP"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
$as_echo "$CMP" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$CMP" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !CMP! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xCMP" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in cmp
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 ${ac_cv_path_CMP+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $CMP in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CMP="$CMP" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_CMP="$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
CMP=$ac_cv_path_CMP
if test -n "$CMP"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
$as_echo "$CMP" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$CMP" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$CMP"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_CMP+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $CMP in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CMP="$CMP" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_CMP="$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
CMP=$ac_cv_path_CMP
if test -n "$CMP"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
$as_echo "$CMP" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$CMP" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
$as_echo_n "checking for CMP... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$CMP" = x; then
    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$COMM" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in comm
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 ${ac_cv_path_COMM+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $COMM in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_COMM="$COMM" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_COMM="$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
COMM=$ac_cv_path_COMM
if test -n "$COMM"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
$as_echo "$COMM" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$COMM" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !COMM! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xCOMM" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in comm
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 ${ac_cv_path_COMM+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $COMM in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_COMM="$COMM" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_COMM="$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
COMM=$ac_cv_path_COMM
if test -n "$COMM"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
$as_echo "$COMM" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$COMM" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$COMM"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_COMM+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $COMM in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_COMM="$COMM" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_COMM="$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
COMM=$ac_cv_path_COMM
if test -n "$COMM"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
$as_echo "$COMM" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$COMM" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
$as_echo_n "checking for COMM... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$COMM" = x; then
    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$CP" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in cp
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 ${ac_cv_path_CP+:} false; 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 as_fn_executable_p "$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 -n "$CP" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !CP! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xCP" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in cp
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 ${ac_cv_path_CP+:} false; 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 as_fn_executable_p "$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 -n "$CP" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$CP"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_CP+:} false; 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 as_fn_executable_p "$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


        if test "x$CP" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
$as_echo_n "checking for CP... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$CP" = x; then
    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$CUT" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in cut
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 ${ac_cv_path_CUT+:} false; 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 as_fn_executable_p "$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 -n "$CUT" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !CUT! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xCUT" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in cut
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 ${ac_cv_path_CUT+:} false; 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 as_fn_executable_p "$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 -n "$CUT" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$CUT"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_CUT+:} false; 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 as_fn_executable_p "$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


        if test "x$CUT" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
$as_echo_n "checking for CUT... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$CUT" = x; then
    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$DATE" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in date
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 ${ac_cv_path_DATE+:} false; 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 as_fn_executable_p "$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 -n "$DATE" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !DATE! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xDATE" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in date
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 ${ac_cv_path_DATE+:} false; 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 as_fn_executable_p "$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 -n "$DATE" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$DATE"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_DATE+:} false; 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 as_fn_executable_p "$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


        if test "x$DATE" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
$as_echo_n "checking for DATE... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$DATE" = x; then
    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$DIFF" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in gdiff diff
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 ${ac_cv_path_DIFF+:} false; 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 as_fn_executable_p "$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 -n "$DIFF" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !DIFF! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xDIFF" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in gdiff diff
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 ${ac_cv_path_DIFF+:} false; 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 as_fn_executable_p "$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 -n "$DIFF" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$DIFF"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_DIFF+:} false; 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 as_fn_executable_p "$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


        if test "x$DIFF" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
$as_echo_n "checking for DIFF... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$DIFF" = x; then
    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$DIRNAME" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in dirname
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_DIRNAME+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $DIRNAME in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
DIRNAME=$ac_cv_path_DIRNAME
if test -n "$DIRNAME"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
$as_echo "$DIRNAME" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$DIRNAME" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !DIRNAME! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xDIRNAME" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in dirname
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_DIRNAME+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $DIRNAME in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
DIRNAME=$ac_cv_path_DIRNAME
if test -n "$DIRNAME"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
$as_echo "$DIRNAME" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$DIRNAME" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$DIRNAME"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_DIRNAME+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $DIRNAME in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
DIRNAME=$ac_cv_path_DIRNAME
if test -n "$DIRNAME"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
$as_echo "$DIRNAME" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$DIRNAME" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
$as_echo_n "checking for DIRNAME... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$DIRNAME" = x; then
    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$ECHO" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in echo
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 ${ac_cv_path_ECHO+:} false; 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 as_fn_executable_p "$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 -n "$ECHO" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !ECHO! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xECHO" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in echo
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 ${ac_cv_path_ECHO+:} false; 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 as_fn_executable_p "$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 -n "$ECHO" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$ECHO"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_ECHO+:} false; 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 as_fn_executable_p "$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


        if test "x$ECHO" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
$as_echo_n "checking for ECHO... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$ECHO" = x; then
    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$EXPR" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in expr
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 ${ac_cv_path_EXPR+:} false; 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 as_fn_executable_p "$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 -n "$EXPR" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !EXPR! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xEXPR" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in expr
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 ${ac_cv_path_EXPR+:} false; 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 as_fn_executable_p "$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 -n "$EXPR" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$EXPR"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_EXPR+:} false; 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 as_fn_executable_p "$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


        if test "x$EXPR" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
$as_echo_n "checking for EXPR... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$EXPR" = x; then
    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$FILE" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in file
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 ${ac_cv_path_FILE+:} false; 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 as_fn_executable_p "$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 -n "$FILE" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !FILE! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xFILE" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in file
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 ${ac_cv_path_FILE+:} false; 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 as_fn_executable_p "$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 -n "$FILE" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$FILE"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_FILE+:} false; 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 as_fn_executable_p "$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


        if test "x$FILE" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
$as_echo_n "checking for FILE... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$FILE" = x; then
    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$FIND" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in find
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 ${ac_cv_path_FIND+:} false; 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 as_fn_executable_p "$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 -n "$FIND" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !FIND! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xFIND" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in find
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 ${ac_cv_path_FIND+:} false; 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 as_fn_executable_p "$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 -n "$FIND" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$FIND"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_FIND+:} false; 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 as_fn_executable_p "$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


        if test "x$FIND" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
$as_echo_n "checking for FIND... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$FIND" = x; then
    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$HEAD" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in head
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 ${ac_cv_path_HEAD+:} false; 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 as_fn_executable_p "$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 -n "$HEAD" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !HEAD! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xHEAD" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in head
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 ${ac_cv_path_HEAD+:} false; 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 as_fn_executable_p "$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 -n "$HEAD" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$HEAD"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_HEAD+:} false; 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 as_fn_executable_p "$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


        if test "x$HEAD" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
$as_echo_n "checking for HEAD... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$HEAD" = x; then
    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$LN" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in ln
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 ${ac_cv_path_LN+:} false; 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 as_fn_executable_p "$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 -n "$LN" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !LN! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xLN" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in ln
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 ${ac_cv_path_LN+:} false; 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 as_fn_executable_p "$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 -n "$LN" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$LN"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_LN+:} false; 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 as_fn_executable_p "$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


        if test "x$LN" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
$as_echo_n "checking for LN... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$LN" = x; then
    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$LS" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in ls
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 ${ac_cv_path_LS+:} false; 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 as_fn_executable_p "$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 -n "$LS" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !LS! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xLS" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in ls
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 ${ac_cv_path_LS+:} false; 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 as_fn_executable_p "$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 -n "$LS" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$LS"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_LS+:} false; 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 as_fn_executable_p "$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


        if test "x$LS" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
$as_echo_n "checking for LS... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$LS" = x; then
    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$MKDIR" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in mkdir
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 ${ac_cv_path_MKDIR+:} false; 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 as_fn_executable_p "$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 -n "$MKDIR" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !MKDIR! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xMKDIR" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in mkdir
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 ${ac_cv_path_MKDIR+:} false; 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 as_fn_executable_p "$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 -n "$MKDIR" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$MKDIR"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_MKDIR+:} false; 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 as_fn_executable_p "$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


        if test "x$MKDIR" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
$as_echo_n "checking for MKDIR... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$MKDIR" = x; then
    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$MKTEMP" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in mktemp
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_MKTEMP+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $MKTEMP in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
MKTEMP=$ac_cv_path_MKTEMP
if test -n "$MKTEMP"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
$as_echo "$MKTEMP" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$MKTEMP" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !MKTEMP! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xMKTEMP" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in mktemp
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_MKTEMP+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $MKTEMP in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
MKTEMP=$ac_cv_path_MKTEMP
if test -n "$MKTEMP"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
$as_echo "$MKTEMP" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$MKTEMP" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$MKTEMP"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_MKTEMP+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $MKTEMP in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
MKTEMP=$ac_cv_path_MKTEMP
if test -n "$MKTEMP"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
$as_echo "$MKTEMP" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$MKTEMP" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
$as_echo_n "checking for MKTEMP... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$MKTEMP" = x; then
    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$MV" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in mv
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 ${ac_cv_path_MV+:} false; 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 as_fn_executable_p "$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 -n "$MV" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !MV! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xMV" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in mv
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 ${ac_cv_path_MV+:} false; 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 as_fn_executable_p "$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 -n "$MV" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$MV"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_MV+:} false; 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 as_fn_executable_p "$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


        if test "x$MV" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
$as_echo_n "checking for MV... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$MV" = x; then
    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$NAWK" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    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 ${ac_cv_path_NAWK+:} false; 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 as_fn_executable_p "$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

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !NAWK! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xNAWK" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      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 ${ac_cv_path_NAWK+:} false; 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 as_fn_executable_p "$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

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$NAWK"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_NAWK+:} false; 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 as_fn_executable_p "$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


        if test "x$NAWK" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
$as_echo_n "checking for NAWK... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$NAWK" = x; then
    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$PRINTF" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in printf
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 ${ac_cv_path_PRINTF+:} false; 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 as_fn_executable_p "$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 -n "$PRINTF" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !PRINTF! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xPRINTF" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in printf
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 ${ac_cv_path_PRINTF+:} false; 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 as_fn_executable_p "$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 -n "$PRINTF" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$PRINTF"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PRINTF+:} false; 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 as_fn_executable_p "$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


        if test "x$PRINTF" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
$as_echo_n "checking for PRINTF... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$PRINTF" = x; then
    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$RM" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in rm
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_RM+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
RM=$ac_cv_path_RM
if test -n "$RM"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
$as_echo "$RM" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$RM" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !RM! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xRM" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in rm
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_RM+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
RM=$ac_cv_path_RM
if test -n "$RM"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
$as_echo "$RM" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$RM" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$RM"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_RM+:} false; 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 as_fn_executable_p "$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


        if test "x$RM" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
$as_echo_n "checking for RM... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$RM" = x; then
    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$SH" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in sh
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 ${ac_cv_path_SH+:} false; 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 as_fn_executable_p "$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 -n "$SH" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !SH! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xSH" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in sh
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 ${ac_cv_path_SH+:} false; 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 as_fn_executable_p "$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 -n "$SH" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$SH"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_SH+:} false; 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 as_fn_executable_p "$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


        if test "x$SH" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
$as_echo_n "checking for SH... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$SH" = x; then
    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$SORT" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in sort
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 ${ac_cv_path_SORT+:} false; 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 as_fn_executable_p "$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 -n "$SORT" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !SORT! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xSORT" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in sort
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 ${ac_cv_path_SORT+:} false; 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 as_fn_executable_p "$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 -n "$SORT" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$SORT"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_SORT+:} false; 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 as_fn_executable_p "$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


        if test "x$SORT" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
$as_echo_n "checking for SORT... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$SORT" = x; then
    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$TAIL" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in tail
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 ${ac_cv_path_TAIL+:} false; 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 as_fn_executable_p "$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 -n "$TAIL" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !TAIL! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xTAIL" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in tail
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 ${ac_cv_path_TAIL+:} false; 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 as_fn_executable_p "$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 -n "$TAIL" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$TAIL"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_TAIL+:} false; 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 as_fn_executable_p "$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


        if test "x$TAIL" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
$as_echo_n "checking for TAIL... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$TAIL" = x; then
    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$TAR" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in tar
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 ${ac_cv_path_TAR+:} false; 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 as_fn_executable_p "$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 -n "$TAR" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !TAR! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xTAR" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in tar
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 ${ac_cv_path_TAR+:} false; 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 as_fn_executable_p "$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 -n "$TAR" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$TAR"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_TAR+:} false; 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 as_fn_executable_p "$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


        if test "x$TAR" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
$as_echo_n "checking for TAR... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$TAR" = x; then
    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$TEE" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in tee
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 ${ac_cv_path_TEE+:} false; 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 as_fn_executable_p "$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 -n "$TEE" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !TEE! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xTEE" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in tee
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 ${ac_cv_path_TEE+:} false; 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 as_fn_executable_p "$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 -n "$TEE" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$TEE"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_TEE+:} false; 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 as_fn_executable_p "$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


        if test "x$TEE" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
$as_echo_n "checking for TEE... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$TEE" = x; then
    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$TOUCH" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in touch
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 ${ac_cv_path_TOUCH+:} false; 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 as_fn_executable_p "$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 -n "$TOUCH" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !TOUCH! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xTOUCH" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in touch
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 ${ac_cv_path_TOUCH+:} false; 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 as_fn_executable_p "$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 -n "$TOUCH" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$TOUCH"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_TOUCH+:} false; 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 as_fn_executable_p "$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


        if test "x$TOUCH" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
$as_echo_n "checking for TOUCH... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$TOUCH" = x; then
    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$TR" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in tr
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 ${ac_cv_path_TR+:} false; 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 as_fn_executable_p "$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 -n "$TR" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !TR! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xTR" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in tr
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 ${ac_cv_path_TR+:} false; 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 as_fn_executable_p "$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 -n "$TR" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$TR"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_TR+:} false; 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 as_fn_executable_p "$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


        if test "x$TR" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
$as_echo_n "checking for TR... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$TR" = x; then
    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$UNAME" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in uname
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_UNAME+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $UNAME in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
UNAME=$ac_cv_path_UNAME
if test -n "$UNAME"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
$as_echo "$UNAME" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$UNAME" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !UNAME! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xUNAME" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in uname
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_UNAME+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $UNAME in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
UNAME=$ac_cv_path_UNAME
if test -n "$UNAME"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
$as_echo "$UNAME" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$UNAME" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$UNAME"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_UNAME+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $UNAME in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
UNAME=$ac_cv_path_UNAME
if test -n "$UNAME"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
$as_echo "$UNAME" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$UNAME" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
$as_echo_n "checking for UNAME... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$UNAME" = x; then
    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$UNIQ" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in uniq
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 ${ac_cv_path_UNIQ+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $UNIQ in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_UNIQ="$UNIQ" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_UNIQ="$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
UNIQ=$ac_cv_path_UNIQ
if test -n "$UNIQ"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
$as_echo "$UNIQ" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$UNIQ" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !UNIQ! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xUNIQ" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in uniq
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 ${ac_cv_path_UNIQ+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $UNIQ in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_UNIQ="$UNIQ" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_UNIQ="$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
UNIQ=$ac_cv_path_UNIQ
if test -n "$UNIQ"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
$as_echo "$UNIQ" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$UNIQ" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$UNIQ"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_UNIQ+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $UNIQ in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_UNIQ="$UNIQ" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_UNIQ="$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
UNIQ=$ac_cv_path_UNIQ
if test -n "$UNIQ"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
$as_echo "$UNIQ" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$UNIQ" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
$as_echo_n "checking for UNIQ... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$UNIQ" = x; then
    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$WC" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in wc
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 ${ac_cv_path_WC+:} false; 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 as_fn_executable_p "$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 -n "$WC" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !WC! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xWC" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in wc
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 ${ac_cv_path_WC+:} false; 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 as_fn_executable_p "$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 -n "$WC" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$WC"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_WC+:} false; 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 as_fn_executable_p "$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


        if test "x$WC" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
$as_echo_n "checking for WC... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$WC" = x; then
    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$WHICH" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in which
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_WHICH+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $WHICH in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
WHICH=$ac_cv_path_WHICH
if test -n "$WHICH"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
$as_echo "$WHICH" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$WHICH" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !WHICH! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xWHICH" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in which
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_WHICH+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $WHICH in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
WHICH=$ac_cv_path_WHICH
if test -n "$WHICH"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
$as_echo "$WHICH" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$WHICH" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$WHICH"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_WHICH+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $WHICH in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
WHICH=$ac_cv_path_WHICH
if test -n "$WHICH"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
$as_echo "$WHICH" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$WHICH" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
$as_echo_n "checking for WHICH... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$WHICH" = x; then
    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$XARGS" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in xargs
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 ${ac_cv_path_XARGS+:} false; 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 as_fn_executable_p "$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 -n "$XARGS" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !XARGS! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xXARGS" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in xargs
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 ${ac_cv_path_XARGS+:} false; 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 as_fn_executable_p "$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 -n "$XARGS" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$XARGS"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_XARGS+:} false; 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 as_fn_executable_p "$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


        if test "x$XARGS" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
$as_echo_n "checking for XARGS... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$XARGS" = x; then
    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
  fi



  # Then required tools that require some special treatment.


  # Publish this variable in the help.


  if test "x$AWK" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    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 ${ac_cv_prog_AWK+:} false; 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 as_fn_executable_p "$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

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !AWK! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xAWK" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      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 ${ac_cv_prog_AWK+:} false; 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 as_fn_executable_p "$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

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$AWK"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_AWK+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $AWK in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_AWK="$AWK" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_AWK="$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
AWK=$ac_cv_path_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


        if test "x$AWK" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
$as_echo_n "checking for AWK... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi


  if test "x$AWK" = x; then
    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
  fi




  # Publish this variable in the help.


  if test "x$GREP" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    { $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 ${ac_cv_path_GREP+:} false; 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"
      as_fn_executable_p "$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"


  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !GREP! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xGREP" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      { $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 ${ac_cv_path_GREP+:} false; 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"
      as_fn_executable_p "$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"


    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$GREP"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_GREP+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $GREP in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_GREP="$GREP" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_GREP="$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
GREP=$ac_cv_path_GREP
if test -n "$GREP"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
$as_echo "$GREP" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$GREP" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
$as_echo_n "checking for GREP... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi


  if test "x$GREP" = x; then
    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
  fi




  # Publish this variable in the help.


  if test "x$EGREP" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
$as_echo_n "checking for egrep... " >&6; }
if ${ac_cv_path_EGREP+:} false; 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"
      as_fn_executable_p "$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"


  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !EGREP! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xEGREP" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
$as_echo_n "checking for egrep... " >&6; }
if ${ac_cv_path_EGREP+:} false; 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"
      as_fn_executable_p "$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"


    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$EGREP"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_EGREP+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $EGREP in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_EGREP="$EGREP" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_EGREP="$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
EGREP=$ac_cv_path_EGREP
if test -n "$EGREP"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
$as_echo "$EGREP" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$EGREP" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
$as_echo_n "checking for EGREP... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi


  if test "x$EGREP" = x; then
    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
  fi




  # Publish this variable in the help.


  if test "x$FGREP" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
$as_echo_n "checking for fgrep... " >&6; }
if ${ac_cv_path_FGREP+:} false; 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"
      as_fn_executable_p "$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"


  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !FGREP! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xFGREP" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
$as_echo_n "checking for fgrep... " >&6; }
if ${ac_cv_path_FGREP+:} false; 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"
      as_fn_executable_p "$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"


    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$FGREP"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_FGREP+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $FGREP in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_FGREP="$FGREP" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_FGREP="$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
FGREP=$ac_cv_path_FGREP
if test -n "$FGREP"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
$as_echo "$FGREP" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$FGREP" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
$as_echo_n "checking for FGREP... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi


  if test "x$FGREP" = x; then
    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
  fi




  # Publish this variable in the help.


  if test "x$SED" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    { $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 ${ac_cv_path_SED+:} false; 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"
      as_fn_executable_p "$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

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !SED! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xSED" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      { $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 ${ac_cv_path_SED+:} false; 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"
      as_fn_executable_p "$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

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$SED"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_SED+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $SED in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_SED="$SED" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_SED="$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
SED=$ac_cv_path_SED
if test -n "$SED"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
$as_echo "$SED" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$SED" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
$as_echo_n "checking for SED... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi


  if test "x$SED" = x; then
    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
  fi



  # Always force rm.
  RM="$RM -f"

  # pwd behaves differently on various platforms and some don't support the -L flag.
  # Always use the bash builtin pwd to get uniform behavior.
  THEPWDCMD=pwd

  # These are not required on all platforms


  # Publish this variable in the help.


  if test "x$CYGPATH" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in cygpath
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 ${ac_cv_path_CYGPATH+:} false; 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 as_fn_executable_p "$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


  test -n "$CYGPATH" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !CYGPATH! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xCYGPATH" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in cygpath
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 ${ac_cv_path_CYGPATH+:} false; 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 as_fn_executable_p "$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


  test -n "$CYGPATH" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$CYGPATH"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_CYGPATH+:} false; 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 as_fn_executable_p "$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


        if test "x$CYGPATH" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
$as_echo_n "checking for CYGPATH... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi




  # Publish this variable in the help.


  if test "x$READLINK" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in greadlink readlink
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 ${ac_cv_path_READLINK+:} false; 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 as_fn_executable_p "$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


  test -n "$READLINK" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !READLINK! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xREADLINK" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in greadlink readlink
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 ${ac_cv_path_READLINK+:} false; 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 as_fn_executable_p "$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


  test -n "$READLINK" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$READLINK"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_READLINK+:} false; 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 as_fn_executable_p "$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" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
$as_echo_n "checking for READLINK... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi




  # Publish this variable in the help.


  if test "x$DF" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in df
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_DF+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
DF=$ac_cv_path_DF
if test -n "$DF"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
$as_echo "$DF" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$DF" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !DF! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xDF" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in df
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_DF+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
DF=$ac_cv_path_DF
if test -n "$DF"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
$as_echo "$DF" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$DF" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$DF"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_DF+:} false; 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 as_fn_executable_p "$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


        if test "x$DF" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
$as_echo_n "checking for DF... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi




  # Publish this variable in the help.


  if test "x$SETFILE" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in SetFile
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 ${ac_cv_path_SETFILE+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $SETFILE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
SETFILE=$ac_cv_path_SETFILE
if test -n "$SETFILE"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
$as_echo "$SETFILE" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$SETFILE" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !SETFILE! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xSETFILE" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in SetFile
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 ${ac_cv_path_SETFILE+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $SETFILE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
SETFILE=$ac_cv_path_SETFILE
if test -n "$SETFILE"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
$as_echo "$SETFILE" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$SETFILE" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$SETFILE"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_SETFILE+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $SETFILE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
SETFILE=$ac_cv_path_SETFILE
if test -n "$SETFILE"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
$as_echo "$SETFILE" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$SETFILE" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
$as_echo_n "checking for SETFILE... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi




  # Publish this variable in the help.


  if test "x$CPIO" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in cpio bsdcpio
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 ${ac_cv_path_CPIO+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
CPIO=$ac_cv_path_CPIO
if test -n "$CPIO"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
$as_echo "$CPIO" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$CPIO" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !CPIO! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xCPIO" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in cpio bsdcpio
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 ${ac_cv_path_CPIO+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
CPIO=$ac_cv_path_CPIO
if test -n "$CPIO"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
$as_echo "$CPIO" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$CPIO" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$CPIO"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_CPIO+:} false; 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 as_fn_executable_p "$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


        if test "x$CPIO" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
$as_echo_n "checking for CPIO... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi




# Now we can determine OpenJDK build and target platforms. This is required to
# have early on.
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
$as_echo_n "checking build system type... " >&6; }
if ${ac_cv_build+:} false; 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 ${ac_cv_host+:} false; 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 ${ac_cv_target+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test "x$target_alias" = x; then
  ac_cv_target=$ac_cv_host
else
  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
$as_echo "$ac_cv_target" >&6; }
case $ac_cv_target in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
esac
target=$ac_cv_target
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_target
shift
target_cpu=$1
target_vendor=$2
shift; shift
# Remember, the first character of IFS is used to create $*,
# except with old shells:
target_os=$*
IFS=$ac_save_IFS
case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac


# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
test -n "$target_alias" &&
  test "$program_prefix$program_suffix$program_transform_name" = \
    NONENONEs,x,x, &&
  program_prefix=${target_alias}-

  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
  # to use the configure naming style.





  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
  OPENJDK_TARGET_AUTOCONF_NAME="$host"
  OPENJDK_BUILD_AUTOCONF_NAME="$build"



  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.

  case "$build_os" in
    *linux*)
      VAR_OS=linux
      VAR_OS_API=posix
      VAR_OS_ENV=linux
      ;;
    *solaris*)
      VAR_OS=solaris
      VAR_OS_API=posix
      VAR_OS_ENV=solaris
      ;;
    *darwin*)
      VAR_OS=macosx
      VAR_OS_API=posix
      VAR_OS_ENV=macosx
      ;;
    *bsd*)
      VAR_OS=bsd
      VAR_OS_API=posix
      VAR_OS_ENV=bsd
      ;;
    *cygwin*)
      VAR_OS=windows
      VAR_OS_API=winapi
      VAR_OS_ENV=windows.cygwin
      ;;
    *mingw*)
      VAR_OS=windows
      VAR_OS_API=winapi
      VAR_OS_ENV=windows.msys
      ;;
    *aix*)
      VAR_OS=aix
      VAR_OS_API=posix
      VAR_OS_ENV=aix
      ;;
    *)
      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
      ;;
  esac


  # First argument is the cpu name from the trip/quad
  case "$build_cpu" in
    x86_64)
      VAR_CPU=x86_64
      VAR_CPU_ARCH=x86
      VAR_CPU_BITS=64
      VAR_CPU_ENDIAN=little
      ;;
    i?86)
      VAR_CPU=x86
      VAR_CPU_ARCH=x86
      VAR_CPU_BITS=32
      VAR_CPU_ENDIAN=little
      ;;
    arm*)
      VAR_CPU=arm
      VAR_CPU_ARCH=arm
      VAR_CPU_BITS=32
      VAR_CPU_ENDIAN=little
      ;;
    powerpc)
      VAR_CPU=ppc
      VAR_CPU_ARCH=ppc
      VAR_CPU_BITS=32
      VAR_CPU_ENDIAN=big
      ;;
    powerpc64)
      VAR_CPU=ppc64
      VAR_CPU_ARCH=ppc
      VAR_CPU_BITS=64
      VAR_CPU_ENDIAN=big
      ;;
    powerpc64le)
      VAR_CPU=ppc64
      VAR_CPU_ARCH=ppc
      VAR_CPU_BITS=64
      VAR_CPU_ENDIAN=little
      ;;
    s390)
      VAR_CPU=s390
      VAR_CPU_ARCH=s390
      VAR_CPU_BITS=32
      VAR_CPU_ENDIAN=big
      ;;
    s390x)
      VAR_CPU=s390x
      VAR_CPU_ARCH=s390
      VAR_CPU_BITS=64
      VAR_CPU_ENDIAN=big
      ;;
    sparc)
      VAR_CPU=sparc
      VAR_CPU_ARCH=sparc
      VAR_CPU_BITS=32
      VAR_CPU_ENDIAN=big
      ;;
    sparcv9|sparc64)
      VAR_CPU=sparcv9
      VAR_CPU_ARCH=sparc
      VAR_CPU_BITS=64
      VAR_CPU_ENDIAN=big
      ;;
    *)
      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
      ;;
  esac

  # ..and setup our own variables. (Do this explicitely to facilitate searching)
  OPENJDK_BUILD_OS="$VAR_OS"
  OPENJDK_BUILD_OS_API="$VAR_OS_API"
  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
  OPENJDK_BUILD_CPU="$VAR_CPU"
  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"








  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
$as_echo_n "checking openjdk-build os-cpu... " >&6; }
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }

  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.

  case "$host_os" in
    *linux*)
      VAR_OS=linux
      VAR_OS_API=posix
      VAR_OS_ENV=linux
      ;;
    *solaris*)
      VAR_OS=solaris
      VAR_OS_API=posix
      VAR_OS_ENV=solaris
      ;;
    *darwin*)
      VAR_OS=macosx
      VAR_OS_API=posix
      VAR_OS_ENV=macosx
      ;;
    *bsd*)
      VAR_OS=bsd
      VAR_OS_API=posix
      VAR_OS_ENV=bsd
      ;;
    *cygwin*)
      VAR_OS=windows
      VAR_OS_API=winapi
      VAR_OS_ENV=windows.cygwin
      ;;
    *mingw*)
      VAR_OS=windows
      VAR_OS_API=winapi
      VAR_OS_ENV=windows.msys
      ;;
    *aix*)
      VAR_OS=aix
      VAR_OS_API=posix
      VAR_OS_ENV=aix
      ;;
    *)
      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
      ;;
  esac


  # First argument is the cpu name from the trip/quad
  case "$host_cpu" in
    x86_64)
      VAR_CPU=x86_64
      VAR_CPU_ARCH=x86
      VAR_CPU_BITS=64
      VAR_CPU_ENDIAN=little
      ;;
    i?86)
      VAR_CPU=x86
      VAR_CPU_ARCH=x86
      VAR_CPU_BITS=32
      VAR_CPU_ENDIAN=little
      ;;
    arm*)
      VAR_CPU=arm
      VAR_CPU_ARCH=arm
      VAR_CPU_BITS=32
      VAR_CPU_ENDIAN=little
      ;;
    powerpc)
      VAR_CPU=ppc
      VAR_CPU_ARCH=ppc
      VAR_CPU_BITS=32
      VAR_CPU_ENDIAN=big
      ;;
    powerpc64)
      VAR_CPU=ppc64
      VAR_CPU_ARCH=ppc
      VAR_CPU_BITS=64
      VAR_CPU_ENDIAN=big
      ;;
    powerpc64le)
      VAR_CPU=ppc64
      VAR_CPU_ARCH=ppc
      VAR_CPU_BITS=64
      VAR_CPU_ENDIAN=little
      ;;
    s390)
      VAR_CPU=s390
      VAR_CPU_ARCH=s390
      VAR_CPU_BITS=32
      VAR_CPU_ENDIAN=big
      ;;
    s390x)
      VAR_CPU=s390x
      VAR_CPU_ARCH=s390
      VAR_CPU_BITS=64
      VAR_CPU_ENDIAN=big
      ;;
    sparc)
      VAR_CPU=sparc
      VAR_CPU_ARCH=sparc
      VAR_CPU_BITS=32
      VAR_CPU_ENDIAN=big
      ;;
    sparcv9|sparc64)
      VAR_CPU=sparcv9
      VAR_CPU_ARCH=sparc
      VAR_CPU_BITS=64
      VAR_CPU_ENDIAN=big
      ;;
    *)
      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
      ;;
  esac

  # ... and setup our own variables. (Do this explicitely to facilitate searching)
  OPENJDK_TARGET_OS="$VAR_OS"
  OPENJDK_TARGET_OS_API="$VAR_OS_API"
  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
  OPENJDK_TARGET_CPU="$VAR_CPU"
  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"








  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
$as_echo_n "checking openjdk-target os-cpu... " >&6; }
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }



# Check whether --with-target-bits was given.
if test "${with_target_bits+set}" = set; then :
  withval=$with_target_bits;
fi


  # We have three types of compiles:
  # native  == normal compilation, target system == build system
  # cross   == traditional cross compilation, target system != build system; special toolchain needed
  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
  #
  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
    # We're doing a proper cross-compilation
    COMPILE_TYPE="cross"
  else
    COMPILE_TYPE="native"
  fi

  if test "x$with_target_bits" != x; then
    if test "x$COMPILE_TYPE" = "xcross"; then
      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
    fi

    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
      # A reduced build is requested
      COMPILE_TYPE="reduced"
      OPENJDK_TARGET_CPU_BITS=32
      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
        OPENJDK_TARGET_CPU=x86
      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
        OPENJDK_TARGET_CPU=sparc
      else
        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
      fi
    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
      as_fn_error $? "It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead." "$LINENO" 5
    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
    else
      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
    fi
  fi


  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
$as_echo_n "checking compilation type... " >&6; }
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
$as_echo "$COMPILE_TYPE" >&6; }


  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
    REQUIRED_OS_NAME=SunOS
    REQUIRED_OS_VERSION=5.10
  fi
  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
    REQUIRED_OS_NAME=Linux
    REQUIRED_OS_VERSION=2.6
  fi
  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
    REQUIRED_OS_NAME=Windows
    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
      REQUIRED_OS_VERSION=5.2
    else
      REQUIRED_OS_VERSION=5.1
    fi
  fi
  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
    REQUIRED_OS_NAME=Darwin
    REQUIRED_OS_VERSION=11.2
  fi





  # Also store the legacy naming of the cpu.
  # Ie i586 and amd64 instead of x86 and x86_64
  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
  if test "x$OPENJDK_TARGET_CPU" = xx86; then
    OPENJDK_TARGET_CPU_LEGACY="i586"
  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
    # On all platforms except MacOSX replace x86_64 with amd64.
    OPENJDK_TARGET_CPU_LEGACY="amd64"
  fi


  # And the second legacy naming of the cpu.
  # Ie i386 and amd64 instead of x86 and x86_64.
  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
  if test "x$OPENJDK_TARGET_CPU" = xx86; then
    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
  fi


  # This is the name of the cpu (but using i386 and amd64 instead of
  # x86 and x86_64, respectively), preceeded by a /, to be used when
  # locating libraries. On macosx, it's empty, though.
  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
    OPENJDK_TARGET_CPU_LIBDIR=""
  fi


  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
  OPENJDK_TARGET_CPU_ISADIR=""
  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
      OPENJDK_TARGET_CPU_ISADIR="/amd64"
    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
    fi
  fi


  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
    # On linux only, we replace x86 with i386.
    OPENJDK_TARGET_CPU_OSARCH="i386"
  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
    # On all platforms except macosx, we replace x86_64 with amd64.
    OPENJDK_TARGET_CPU_OSARCH="amd64"
  fi


  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
  if test "x$OPENJDK_TARGET_CPU" = xx86; then
    OPENJDK_TARGET_CPU_JLI="i386"
  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
    # On all platforms except macosx, we replace x86_64 with amd64.
    OPENJDK_TARGET_CPU_JLI="amd64"
  fi
  # Now setup the -D flags for building libjli.
  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
    fi
  fi


  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
    OPENJDK_TARGET_OS_API_DIR="unix"
  fi
  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
    OPENJDK_TARGET_OS_API_DIR="windows"
  fi


  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
  else
      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
  fi


  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
    A_LP64="LP64:="
    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
    # unpack200.exe
    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
      ADD_LP64="-D_LP64=1"
    fi
  fi
  LP64=$A_LP64


  if test "x$COMPILE_TYPE" = "xcross"; then
    # FIXME: ... or should this include reduced builds..?
    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
  else
    DEFINE_CROSS_COMPILE_ARCH=""
  fi


  # ZERO_ARCHDEF is used to enable architecture-specific code
  case "${OPENJDK_TARGET_CPU}" in
    ppc*)    ZERO_ARCHDEF=PPC   ;;
    s390*)   ZERO_ARCHDEF=S390  ;;
    sparc*)  ZERO_ARCHDEF=SPARC ;;
    x86_64*) ZERO_ARCHDEF=AMD64 ;;
    x86)     ZERO_ARCHDEF=IA32  ;;
    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
  esac




# Continue setting up basic stuff. Most remaining code require fundamental tools.

  # Save the current directory this script was started from
  CURDIR="$PWD"

  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
    PATH_SEP=";"

  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
  if test $SRC_ROOT_LENGTH -gt 100; then
    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
  fi

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
$as_echo_n "checking cygwin release... " >&6; }
    CYGWIN_VERSION=`$UNAME -r`
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
$as_echo "$CYGWIN_VERSION" >&6; }
    WINDOWS_ENV_VENDOR='cygwin'
    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"

    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
    if test "x$CYGWIN_VERSION_OK" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&5
$as_echo "$as_me: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&6;}
      as_fn_error $? "Cannot continue" "$LINENO" 5
    fi
    if test "x$CYGPATH" = x; then
      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
$as_echo "$CYGWIN_ROOT_PATH" >&6; }
    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
    if test "x$test_cygdrive_prefix" = x; then
      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
    fi
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
$as_echo_n "checking msys release... " >&6; }
    MSYS_VERSION=`$UNAME -r`
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
$as_echo "$MSYS_VERSION" >&6; }

    WINDOWS_ENV_VENDOR='msys'
    WINDOWS_ENV_VERSION="$MSYS_VERSION"

    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
$as_echo_n "checking msys root directory as unix-style path... " >&6; }
    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`

  windows_path="$MSYS_ROOT_PATH"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    MSYS_ROOT_PATH="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    MSYS_ROOT_PATH="$unix_path"
  fi

    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
$as_echo "$MSYS_ROOT_PATH" >&6; }
    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
  else
    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
  fi

  # Test if windows or unix (cygwin/msys) find is first in path.
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
  FIND_BINARY_OUTPUT=`find --version 2>&1`
  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
$as_echo "unix style" >&6; }
  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
$as_echo "Windows" >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&5
$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
    as_fn_error $? "Cannot continue" "$LINENO" 5
  else
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
$as_echo "unknown" >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
  fi

  else
    PATH_SEP=":"
  fi


  # We get the top-level directory from the supporting wrappers.
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
$as_echo_n "checking for top-level directory... " >&6; }
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
$as_echo "$TOPDIR" >&6; }


  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$CURDIR"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    CURDIR="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$CURDIR"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    CURDIR="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$CURDIR"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    CURDIR="`cd "$path"; $THEPWDCMD -L`"
  fi


  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$TOPDIR"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    TOPDIR="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$TOPDIR"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    TOPDIR="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$TOPDIR"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
  fi

  # SRC_ROOT is a traditional alias for TOPDIR.
  SRC_ROOT=$TOPDIR

  # Locate the directory of this script.
  AUTOCONF_DIR=$TOPDIR/common/autoconf


  # 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='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'





# Check if it's a pure open build or if custom sources are to be used.

  # Check whether --enable-openjdk-only was given.
if test "${enable_openjdk_only+set}" = set; then :
  enableval=$enable_openjdk_only;
else
  enable_openjdk_only="no"
fi


  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
$as_echo_n "checking for presence of closed sources... " >&6; }
  if test -d "$SRC_ROOT/jdk/src/closed"; then
    CLOSED_SOURCE_PRESENT=yes
  else
    CLOSED_SOURCE_PRESENT=no
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }

  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }

  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
    OPENJDK=true
    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
    fi
  else
    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
      OPENJDK=true
    else
      OPENJDK=false
    fi
  fi

  if test "x$OPENJDK" = "xtrue"; then
    SET_OPENJDK="OPENJDK=true"
  fi



  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
  # the IncludeCustomExtension macro.


# Check whether --with-custom-make-dir was given.
if test "${with_custom_make_dir+set}" = set; then :
  withval=$with_custom_make_dir; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&5
$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
fi




# These are needed to be able to create a configuration name (and thus the output directory)

  ###############################################################################
  #
  # Check which variant of the JDK that we want to build.
  # Currently we have:
  #    normal:   standard edition
  # but the custom make system may add other variants
  #
  # 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
    JDK_VARIANT="normal"
  else
    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
  fi



  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
$as_echo "$JDK_VARIANT" >&6; }


###############################################################################
#
# Check which interpreter of the JVM we want to build.
# Currently we have:
#    template: Template interpreter (the default)
#    cpp     : C++ interpreter
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
$as_echo_n "checking which interpreter of the JVM to build... " >&6; }

# Check whether --with-jvm-interpreter was given.
if test "${with_jvm_interpreter+set}" = set; then :
  withval=$with_jvm_interpreter;
fi


if test "x$with_jvm_interpreter" = x; then
     with_jvm_interpreter="template"
fi

JVM_INTERPRETER="$with_jvm_interpreter"

if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
fi



{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
$as_echo "$with_jvm_interpreter" >&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)
  #    minimal1: reduced form of client with optional VM services and features stripped out
  #    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
#    core: interpreter only, no compiler (only works on some platforms)
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
$as_echo_n "checking which variants of the JVM to build... " >&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
    with_jvm_variants="server"
  fi

  JVM_VARIANTS=",$with_jvm_variants,"
  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`

  if test "x$TEST_VARIANTS" != "x,"; then
     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$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_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/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'`
  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/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
  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
      as_fn_error $? "You cannot build a minimal 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/g'`
  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
  if test "x$COUNT_VARIANTS" != "x,1"; then
    BUILDING_MULTIPLE_JVM_VARIANTS=yes
  else
    BUILDING_MULTIPLE_JVM_VARIANTS=no
  fi










  INCLUDE_SA=true
  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
    INCLUDE_SA=false
  fi
  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
    INCLUDE_SA=false
  fi
  if test "x$OPENJDK_TARGET_OS" = xaix ; then
    INCLUDE_SA=false
  fi


  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
    MACOSX_UNIVERSAL="true"
  fi




  ###############################################################################
  #
  # Set the debug level
  #    release: no debug information, all optimizations, no asserts.
  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
  #    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" != xoptimized && \
      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="debug"
      HOTSPOT_EXPORT="debug"
      ;;
    optimized )
      VARIANT="OPT"
      FASTDEBUG="false"
      DEBUG_CLASSFILES="false"
      BUILD_VARIANT_RELEASE="-optimized"
      HOTSPOT_DEBUG_LEVEL="optimized"
      HOTSPOT_EXPORT="optimized"
      ;;
  esac

  # The debug level 'optimized' is a little special because it is currently only
  # applicable to the HotSpot build where it means to build a completely
  # optimized version of the VM without any debugging code (like for the
  # 'release' debug level which is called 'product' in the HotSpot build) but
  # with the exception that it can contain additional code which is otherwise
  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
  # test new and/or experimental features which are not intended for customer
  # shipment. Because these new features need to be tested and benchmarked in
  # real world scenarios, we want to build the containing JDK at the 'release'
  # debug level.
  if test "x$DEBUG_LEVEL" = xoptimized; then
    DEBUG_LEVEL="release"
  fi

  #####
  # Generate the legacy makefile targets for hotspot.
  # The hotspot api for selecting the build artifacts, really, needs to be improved.
  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
  # But until then ...
  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_MINIMAL1" = xtrue; then
    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
  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

  if test "x$JVM_VARIANT_CORE" = xtrue; then
    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
  fi

  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"

  # On Macosx universal binaries are produced, but they only contain
  # 64 bit intel. This invalidates control of which jvms are built
  # from configure, but only server is valid anyway. Fix this
  # when hotspot makefiles are rewritten.
  if test "x$MACOSX_UNIVERSAL" = xtrue; then
    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
  fi

  #####








# With basic setup done, call the custom early hook.


# Check if we have devkits, extra paths or sysroot set.


# Check whether --with-devkit was given.
if test "${with_devkit+set}" = set; then :
  withval=$with_devkit;

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$with_devkit"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    with_devkit="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$with_devkit"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    with_devkit="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$with_devkit"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    with_devkit="`cd "$path"; $THEPWDCMD -L`"
  fi

        DEVKIT_ROOT="$with_devkit"
        # Check for a meta data info file in the root of the devkit
        if test -f "$DEVKIT_ROOT/devkit.info"; then
          # This potentially sets the following:
          # DEVKIT_NAME: A descriptive name of the devkit
          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
          . $DEVKIT_ROOT/devkit.info
        fi

        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
$as_echo_n "checking for devkit... " >&6; }
        if test "x$DEVKIT_NAME" != x; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
        else
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
$as_echo "$DEVKIT_ROOT" >&6; }
        fi

        if test "x$DEVKIT_EXTRA_PATH" != x; then

  if test "x$DEVKIT_EXTRA_PATH" != x; then
    if test "x$EXTRA_PATH" = x; then
      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
    else
      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
    fi
  fi

        fi

        # Fallback default of just /bin if DEVKIT_PATH is not defined
        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
        fi

  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
    if test "x$TOOLCHAIN_PATH" = x; then
      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
    else
      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
    fi
  fi


        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
        # places for backwards compatiblity.
        if test "x$DEVKIT_SYSROOT" != x; then
          SYSROOT="$DEVKIT_SYSROOT"
        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
        fi


fi


  # You can force the sysroot if the sysroot encoded into the compiler tools
  # is not correct.

# Check whether --with-sys-root was given.
if test "${with_sys_root+set}" = set; then :
  withval=$with_sys_root; SYSROOT=$with_sys_root

fi



# Check whether --with-sysroot was given.
if test "${with_sysroot+set}" = set; then :
  withval=$with_sysroot; SYSROOT=$with_sysroot

fi



# Check whether --with-tools-dir was given.
if test "${with_tools_dir+set}" = set; then :
  withval=$with_tools_dir;
  if test "x$with_tools_dir" != x; then
    if test "x$TOOLCHAIN_PATH" = x; then
      TOOLCHAIN_PATH="$with_tools_dir"
    else
      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
    fi
  fi


fi



# Check whether --with-toolchain-path was given.
if test "${with_toolchain_path+set}" = set; then :
  withval=$with_toolchain_path;
  if test "x$with_toolchain_path" != x; then
    if test "x$TOOLCHAIN_PATH" = x; then
      TOOLCHAIN_PATH="$with_toolchain_path"
    else
      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
    fi
  fi


fi



# Check whether --with-extra-path was given.
if test "${with_extra_path+set}" = set; then :
  withval=$with_extra_path;
  if test "x$with_extra_path" != x; then
    if test "x$EXTRA_PATH" = x; then
      EXTRA_PATH="$with_extra_path"
    else
      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
    fi
  fi


fi


  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
    # detect if Xcode is installed by running xcodebuild -version
    # if no Xcode installed, xcodebuild exits with 1
    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
      # We need to use xcodebuild in the toolchain dir provided by the user, this will
      # fall back on the stub binary in /usr/bin/xcodebuild
      # Extract the first word of "xcodebuild", so it can be a program name with args.
set dummy xcodebuild; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_XCODEBUILD+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $XCODEBUILD in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $TOOLCHAIN_PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_XCODEBUILD="$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

  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
  ;;
esac
fi
XCODEBUILD=$ac_cv_path_XCODEBUILD
if test -n "$XCODEBUILD"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
$as_echo "$XCODEBUILD" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


    else
      # this should result in SYSROOT being empty, unless --with-sysroot is provided
      # when only the command line tools are installed there are no SDKs, so headers
      # are copied into the system frameworks
      XCODEBUILD=

    fi

    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
$as_echo_n "checking for sdk name... " >&6; }

# Check whether --with-sdk-name was given.
if test "${with_sdk_name+set}" = set; then :
  withval=$with_sdk_name; SDKNAME=$with_sdk_name

fi

    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
$as_echo "$SDKNAME" >&6; }

    # if toolchain path is specified then don't rely on system headers, they may not compile
    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
    test -z "$TOOLCHAIN_PATH" && \
      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`

    if test -z "$SYSROOT"; then
      if test -n "$XCODEBUILD"; then
        # if we don't have system headers, use default SDK name (last resort)
        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
          SDKNAME=${SDKNAME:-macosx}
        fi

        if test -n "$SDKNAME"; then
          # Call xcodebuild to determine SYSROOT
          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
        fi
      else
        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
          as_fn_error $? "No xcodebuild tool and no system framework headers found, use --with-sysroot or --with-sdk-name to provide a path to a valid SDK" "$LINENO" 5
        fi
      fi
    else
      # warn user if --with-sdk-name was also set
      if test -n "$with_sdk_name"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
      fi
    fi

    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
      # If no system framework headers, then SYSROOT must be set, or we won't build
      as_fn_error $? "Unable to determine SYSROOT and no headers found in /System/Library/Frameworks. Check Xcode configuration, --with-sysroot or --with-sdk-name arguments." "$LINENO" 5
    fi

    # Perform a basic sanity test
    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
      if test -z "$SYSROOT"; then
        as_fn_error $? "Unable to find required framework headers, provide a path to an SDK via --with-sysroot or --with-sdk-name and be sure Xcode is installed properly" "$LINENO" 5
      else
        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
      fi
    fi

    # set SDKROOT too, Xcode tools will pick it up
    SDKROOT=$SYSROOT

  fi

  # Prepend the extra path to the global path

  if test "x$EXTRA_PATH" != x; then
    if test "x$PATH" = x; then
      PATH="$EXTRA_PATH"
    else
      PATH="$EXTRA_PATH:$PATH"
    fi
  fi


  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
    # Add extra search paths on solaris for utilities like ar and as etc...
    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
  fi

  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
$as_echo_n "checking for sysroot... " >&6; }
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
$as_echo "$SYSROOT" >&6; }
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
$as_echo_n "checking for toolchain path... " >&6; }
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
$as_echo "$TOOLCHAIN_PATH" >&6; }
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
$as_echo_n "checking for extra path... " >&6; }
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
$as_echo "$EXTRA_PATH" >&6; }


# 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.
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
$as_echo_n "checking where to store configuration... " >&6; }
  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/make" ; 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
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
$as_echo "in default location" >&6; }
      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
$as_echo "in build directory with custom name" >&6; }
    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"
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
$as_echo "in current directory" >&6; }

    # WARNING: This might be a bad thing to do. You need to be sure you want to
    # have a configuration in this directory. Do some sanity checks!

    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
      # other files
      files_present=`$LS $OUTPUT_ROOT`
      # Configure has already touched config.log and confdefs.h in the current dir when this check
      # is performed.
      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
      | $TR -d '\n'`
      if test "x$filtered_files" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
$as_echo "$as_me: Current directory is $CURDIR." >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
$as_echo "$as_me: seriously mess up just about everything." >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
      fi
    fi
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
$as_echo_n "checking what configuration name to use... " >&6; }
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
$as_echo "$CONF_NAME" >&6; }


  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$OUTPUT_ROOT"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    OUTPUT_ROOT="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$OUTPUT_ROOT"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    OUTPUT_ROOT="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$OUTPUT_ROOT"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
  fi


  SPEC=$OUTPUT_ROOT/spec.gmk

  CONF_NAME=$CONF_NAME

  OUTPUT_ROOT=$OUTPUT_ROOT


  # 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 hotspot-spec.gmk file contains legacy variables for the hotspot make system.
  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"

  # The bootcycle-spec.gmk file contains support for boot cycle builds.
  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"

  # The compare.sh is used to compare the build output to other builds.
  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.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"



# 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 ${ac_cv_prog_PKGHANDLER+:} false; 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 as_fn_executable_p "$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 tools that requires more complex handling, or that is not needed by the configure script.


  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
  if test "x$MAKE" != x; then
    # User has supplied a make, test it.
    if test ! -f "$MAKE"; then
      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
    fi

  MAKE_CANDIDATE=""$MAKE""
  DESCRIPTION="user supplied MAKE=$MAKE"
  if test "x$MAKE_CANDIDATE" != x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
    if test "x$IS_GNU_MAKE" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
    else
      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
      if test "x$IS_MODERN_MAKE" = x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
      else
        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
            MAKE_EXPECTED_ENV='cygwin'
          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
            MAKE_EXPECTED_ENV='msys'
          else
            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
          fi
          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
        else
          # Not relevant for non-Windows
          IS_MAKE_CORRECT_ENV=true
        fi
        if test "x$IS_MAKE_CORRECT_ENV" = x; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
        else
          FOUND_MAKE=$MAKE_CANDIDATE

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$FOUND_MAKE"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$FOUND_MAKE"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$FOUND_MAKE"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    FOUND_MAKE="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
  fi

        fi
      fi
    fi
  fi

    if test "x$FOUND_MAKE" = x; then
      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
    fi
  else
    # Try our hardest to locate a correct version of GNU make
    for ac_prog in gmake
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_CHECK_GMAKE+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $CHECK_GMAKE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
if test -n "$CHECK_GMAKE"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
$as_echo "$CHECK_GMAKE" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$CHECK_GMAKE" && break
done


  MAKE_CANDIDATE=""$CHECK_GMAKE""
  DESCRIPTION="gmake in PATH"
  if test "x$MAKE_CANDIDATE" != x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
    if test "x$IS_GNU_MAKE" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
    else
      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
      if test "x$IS_MODERN_MAKE" = x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
      else
        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
            MAKE_EXPECTED_ENV='cygwin'
          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
            MAKE_EXPECTED_ENV='msys'
          else
            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
          fi
          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
        else
          # Not relevant for non-Windows
          IS_MAKE_CORRECT_ENV=true
        fi
        if test "x$IS_MAKE_CORRECT_ENV" = x; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
        else
          FOUND_MAKE=$MAKE_CANDIDATE

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$FOUND_MAKE"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$FOUND_MAKE"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$FOUND_MAKE"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    FOUND_MAKE="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
  fi

        fi
      fi
    fi
  fi


    if test "x$FOUND_MAKE" = x; then
      for ac_prog in make
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_CHECK_MAKE+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $CHECK_MAKE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
CHECK_MAKE=$ac_cv_path_CHECK_MAKE
if test -n "$CHECK_MAKE"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
$as_echo "$CHECK_MAKE" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$CHECK_MAKE" && break
done


  MAKE_CANDIDATE=""$CHECK_MAKE""
  DESCRIPTION="make in PATH"
  if test "x$MAKE_CANDIDATE" != x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
    if test "x$IS_GNU_MAKE" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
    else
      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
      if test "x$IS_MODERN_MAKE" = x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
      else
        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
            MAKE_EXPECTED_ENV='cygwin'
          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
            MAKE_EXPECTED_ENV='msys'
          else
            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
          fi
          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
        else
          # Not relevant for non-Windows
          IS_MAKE_CORRECT_ENV=true
        fi
        if test "x$IS_MAKE_CORRECT_ENV" = x; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
        else
          FOUND_MAKE=$MAKE_CANDIDATE

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$FOUND_MAKE"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$FOUND_MAKE"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$FOUND_MAKE"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    FOUND_MAKE="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
  fi

        fi
      fi
    fi
  fi

    fi

    if test "x$FOUND_MAKE" = x; then
      if test "x$TOOLCHAIN_PATH" != x; then
        # We have a toolchain path, check that as well before giving up.
        OLD_PATH=$PATH
        PATH=$TOOLCHAIN_PATH:$PATH
        for ac_prog in gmake
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $CHECK_TOOLSDIR_GMAKE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
if test -n "$CHECK_TOOLSDIR_GMAKE"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$CHECK_TOOLSDIR_GMAKE" && break
done


  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
  DESCRIPTION="gmake in tools-dir"
  if test "x$MAKE_CANDIDATE" != x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
    if test "x$IS_GNU_MAKE" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
    else
      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
      if test "x$IS_MODERN_MAKE" = x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
      else
        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
            MAKE_EXPECTED_ENV='cygwin'
          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
            MAKE_EXPECTED_ENV='msys'
          else
            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
          fi
          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
        else
          # Not relevant for non-Windows
          IS_MAKE_CORRECT_ENV=true
        fi
        if test "x$IS_MAKE_CORRECT_ENV" = x; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
        else
          FOUND_MAKE=$MAKE_CANDIDATE

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$FOUND_MAKE"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$FOUND_MAKE"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$FOUND_MAKE"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    FOUND_MAKE="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
  fi

        fi
      fi
    fi
  fi

        if test "x$FOUND_MAKE" = x; then
          for ac_prog in make
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $CHECK_TOOLSDIR_MAKE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
if test -n "$CHECK_TOOLSDIR_MAKE"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$CHECK_TOOLSDIR_MAKE" && break
done


  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
  DESCRIPTION="make in tools-dir"
  if test "x$MAKE_CANDIDATE" != x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
    if test "x$IS_GNU_MAKE" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
    else
      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
      if test "x$IS_MODERN_MAKE" = x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
      else
        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
            MAKE_EXPECTED_ENV='cygwin'
          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
            MAKE_EXPECTED_ENV='msys'
          else
            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
          fi
          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
        else
          # Not relevant for non-Windows
          IS_MAKE_CORRECT_ENV=true
        fi
        if test "x$IS_MAKE_CORRECT_ENV" = x; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
        else
          FOUND_MAKE=$MAKE_CANDIDATE

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$FOUND_MAKE"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$FOUND_MAKE"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$FOUND_MAKE"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    FOUND_MAKE="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
  fi

        fi
      fi
    fi
  fi

        fi
        PATH=$OLD_PATH
      fi
    fi

    if test "x$FOUND_MAKE" = x; then
      as_fn_error $? "Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
    fi
  fi

  MAKE=$FOUND_MAKE

  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}


  # Check if make supports the output sync option and if so, setup using it.
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
$as_echo_n "checking if make --output-sync is supported... " >&6; }
  if $MAKE --version -O > /dev/null 2>&1; then
    OUTPUT_SYNC_SUPPORTED=true
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
$as_echo_n "checking for output-sync value... " >&6; }

# Check whether --with-output-sync was given.
if test "${with_output_sync+set}" = set; then :
  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
fi

    if test "x$OUTPUT_SYNC" = "x"; then
      OUTPUT_SYNC=none
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
$as_echo "$OUTPUT_SYNC" >&6; }
    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
    fi
  else
    OUTPUT_SYNC_SUPPORTED=false
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
  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
    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
      FIND_DELETE="-print | xargs rm"
    else
      FIND_DELETE="-exec rm \{\} \+"
    fi
    { $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



  # These tools might not be installed by default,
  # need hint on how to install them.



  # Publish this variable in the help.


  if test "x$UNZIP" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in unzip
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_UNZIP+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
UNZIP=$ac_cv_path_UNZIP
if test -n "$UNZIP"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
$as_echo "$UNZIP" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$UNZIP" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !UNZIP! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xUNZIP" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in unzip
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_UNZIP+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
UNZIP=$ac_cv_path_UNZIP
if test -n "$UNZIP"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
$as_echo "$UNZIP" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$UNZIP" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$UNZIP"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_UNZIP+:} false; 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 as_fn_executable_p "$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


        if test "x$UNZIP" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
$as_echo_n "checking for UNZIP... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$UNZIP" = x; then
    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$ZIP" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in zip
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_ZIP+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
ZIP=$ac_cv_path_ZIP
if test -n "$ZIP"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
$as_echo "$ZIP" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$ZIP" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !ZIP! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xZIP" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in zip
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_ZIP+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
ZIP=$ac_cv_path_ZIP
if test -n "$ZIP"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
$as_echo "$ZIP" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$ZIP" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$ZIP"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_ZIP+:} false; 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 as_fn_executable_p "$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


        if test "x$ZIP" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
$as_echo_n "checking for ZIP... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$ZIP" = x; then
    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
  fi



  # Non-required basic tools



  # Publish this variable in the help.


  if test "x$LDD" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in ldd
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 ${ac_cv_path_LDD+:} false; 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 as_fn_executable_p "$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


  test -n "$LDD" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !LDD! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xLDD" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in ldd
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 ${ac_cv_path_LDD+:} false; 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 as_fn_executable_p "$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


  test -n "$LDD" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$LDD"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_LDD+:} false; 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 as_fn_executable_p "$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
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
$as_echo_n "checking for LDD... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  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


  # Publish this variable in the help.


  if test "x$OTOOL" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in otool
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 ${ac_cv_path_OTOOL+:} false; 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 as_fn_executable_p "$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


  test -n "$OTOOL" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !OTOOL! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xOTOOL" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in otool
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 ${ac_cv_path_OTOOL+:} false; 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 as_fn_executable_p "$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


  test -n "$OTOOL" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$OTOOL"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_OTOOL+:} false; 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 as_fn_executable_p "$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
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
$as_echo_n "checking for OTOOL... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi


  if test "x$OTOOL" = "x"; then
    OTOOL="true"
  fi


  # Publish this variable in the help.


  if test "x$READELF" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in greadelf readelf
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 ${ac_cv_path_READELF+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
READELF=$ac_cv_path_READELF
if test -n "$READELF"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
$as_echo "$READELF" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$READELF" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !READELF! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xREADELF" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in greadelf readelf
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 ${ac_cv_path_READELF+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
READELF=$ac_cv_path_READELF
if test -n "$READELF"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
$as_echo "$READELF" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$READELF" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$READELF"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_READELF+:} false; 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 as_fn_executable_p "$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


        if test "x$READELF" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
$as_echo_n "checking for READELF... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi




  # Publish this variable in the help.


  if test "x$HG" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in hg
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 ${ac_cv_path_HG+:} false; 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 as_fn_executable_p "$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


  test -n "$HG" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !HG! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xHG" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in hg
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 ${ac_cv_path_HG+:} false; 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 as_fn_executable_p "$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


  test -n "$HG" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$HG"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_HG+:} false; 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 as_fn_executable_p "$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


        if test "x$HG" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
$as_echo_n "checking for HG... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi




  # Publish this variable in the help.


  if test "x$STAT" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in stat
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 ${ac_cv_path_STAT+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $STAT in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_STAT="$STAT" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_STAT="$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
STAT=$ac_cv_path_STAT
if test -n "$STAT"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
$as_echo "$STAT" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$STAT" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !STAT! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xSTAT" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in stat
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 ${ac_cv_path_STAT+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $STAT in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_STAT="$STAT" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_STAT="$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
STAT=$ac_cv_path_STAT
if test -n "$STAT"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
$as_echo "$STAT" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$STAT" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$STAT"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_STAT+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $STAT in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_STAT="$STAT" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_STAT="$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
STAT=$ac_cv_path_STAT
if test -n "$STAT"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
$as_echo "$STAT" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$STAT" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
$as_echo_n "checking for STAT... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi




  # Publish this variable in the help.


  if test "x$TIME" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in time
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 ${ac_cv_path_TIME+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $TIME in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_TIME="$TIME" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_TIME="$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
TIME=$ac_cv_path_TIME
if test -n "$TIME"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
$as_echo "$TIME" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$TIME" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !TIME! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xTIME" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in time
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 ${ac_cv_path_TIME+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $TIME in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_TIME="$TIME" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_TIME="$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
TIME=$ac_cv_path_TIME
if test -n "$TIME"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
$as_echo "$TIME" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$TIME" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$TIME"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_TIME+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $TIME in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_TIME="$TIME" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_TIME="$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
TIME=$ac_cv_path_TIME
if test -n "$TIME"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
$as_echo "$TIME" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$TIME" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
$as_echo_n "checking for TIME... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi


  # Check if it's GNU time
  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
  if test "x$IS_GNU_TIME" != x; then
    IS_GNU_TIME=yes
  else
    IS_GNU_TIME=no
  fi


  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then



  # Publish this variable in the help.


  if test "x$COMM" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in comm
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 ${ac_cv_path_COMM+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $COMM in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_COMM="$COMM" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_COMM="$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
COMM=$ac_cv_path_COMM
if test -n "$COMM"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
$as_echo "$COMM" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$COMM" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !COMM! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xCOMM" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in comm
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 ${ac_cv_path_COMM+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $COMM in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_COMM="$COMM" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_COMM="$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
COMM=$ac_cv_path_COMM
if test -n "$COMM"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
$as_echo "$COMM" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$COMM" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$COMM"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_COMM+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $COMM in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_COMM="$COMM" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_COMM="$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
COMM=$ac_cv_path_COMM
if test -n "$COMM"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
$as_echo "$COMM" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$COMM" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
$as_echo_n "checking for COMM... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$COMM" = x; then
    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
  fi


  fi

  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then



  # Publish this variable in the help.


  if test "x$DSYMUTIL" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in dsymutil
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 ${ac_cv_path_DSYMUTIL+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $DSYMUTIL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_DSYMUTIL="$DSYMUTIL" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_DSYMUTIL="$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
DSYMUTIL=$ac_cv_path_DSYMUTIL
if test -n "$DSYMUTIL"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
$as_echo "$DSYMUTIL" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$DSYMUTIL" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !DSYMUTIL! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xDSYMUTIL" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in dsymutil
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 ${ac_cv_path_DSYMUTIL+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $DSYMUTIL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_DSYMUTIL="$DSYMUTIL" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_DSYMUTIL="$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
DSYMUTIL=$ac_cv_path_DSYMUTIL
if test -n "$DSYMUTIL"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
$as_echo "$DSYMUTIL" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$DSYMUTIL" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$DSYMUTIL"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_DSYMUTIL+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $DSYMUTIL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_DSYMUTIL="$DSYMUTIL" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_DSYMUTIL="$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
DSYMUTIL=$ac_cv_path_DSYMUTIL
if test -n "$DSYMUTIL"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
$as_echo "$DSYMUTIL" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$DSYMUTIL" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
$as_echo_n "checking for DSYMUTIL... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$DSYMUTIL" = x; then
    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
  fi





  # Publish this variable in the help.


  if test "x$XATTR" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in xattr
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 ${ac_cv_path_XATTR+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $XATTR in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_XATTR="$XATTR" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_XATTR="$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
XATTR=$ac_cv_path_XATTR
if test -n "$XATTR"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
$as_echo "$XATTR" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$XATTR" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !XATTR! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xXATTR" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in xattr
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 ${ac_cv_path_XATTR+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $XATTR in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_XATTR="$XATTR" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_XATTR="$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
XATTR=$ac_cv_path_XATTR
if test -n "$XATTR"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
$as_echo "$XATTR" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$XATTR" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$XATTR"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_XATTR+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $XATTR in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_XATTR="$XATTR" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_XATTR="$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
XATTR=$ac_cv_path_XATTR
if test -n "$XATTR"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
$as_echo "$XATTR" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$XATTR" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
$as_echo_n "checking for XATTR... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$XATTR" = x; then
    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
  fi




  # Publish this variable in the help.


  if test "x$CODESIGN" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in codesign
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 ${ac_cv_path_CODESIGN+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $CODESIGN in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CODESIGN="$CODESIGN" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_CODESIGN="$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
CODESIGN=$ac_cv_path_CODESIGN
if test -n "$CODESIGN"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
$as_echo "$CODESIGN" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$CODESIGN" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !CODESIGN! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xCODESIGN" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in codesign
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 ${ac_cv_path_CODESIGN+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $CODESIGN in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CODESIGN="$CODESIGN" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_CODESIGN="$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
CODESIGN=$ac_cv_path_CODESIGN
if test -n "$CODESIGN"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
$as_echo "$CODESIGN" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$CODESIGN" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$CODESIGN"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_CODESIGN+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $CODESIGN in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CODESIGN="$CODESIGN" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_CODESIGN="$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
CODESIGN=$ac_cv_path_CODESIGN
if test -n "$CODESIGN"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
$as_echo "$CODESIGN" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$CODESIGN" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
$as_echo_n "checking for CODESIGN... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi


    if test "x$CODESIGN" != "x"; then
      # Verify that the openjdk_codesign certificate is present
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
      rm -f codesign-testfile
      touch codesign-testfile
      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
      rm -f codesign-testfile
      if test "x$CODESIGN" = x; then
        { $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
    fi
  fi


# Check if pkg-config is available.


if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
	if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PKG_CONFIG+:} false; 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 as_fn_executable_p "$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 ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
if test -n "$ac_pt_PKG_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
$as_echo "$ac_pt_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi

  if test "x$ac_pt_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_pt_PKG_CONFIG
  fi
else
  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
fi

fi
if test -n "$PKG_CONFIG"; then
	_pkg_min_version=0.9.0
	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
	else
		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
		PKG_CONFIG=""
	fi

fi

# After basic tools have been setup, we can check build os specific details.

  ###############################################################################

  # Note that this is the build platform OS version!

  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"





# Setup builddeps, for automatic downloading of tools we need.
# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
# boot-jdk setup, but we need to have basic tools setup first.


# Check whether --with-builddeps-conf was given.
if test "${with_builddeps_conf+set}" = set; then :
  withval=$with_builddeps_conf;
fi



# Check whether --with-builddeps-server was given.
if test "${with_builddeps_server+set}" = set; then :
  withval=$with_builddeps_server;
fi



# Check whether --with-builddeps-dir was given.
if test "${with_builddeps_dir+set}" = set; then :
  withval=$with_builddeps_dir;
else
  with_builddeps_dir=/localhome/builddeps
fi



# Check whether --with-builddeps-group was given.
if test "${with_builddeps_group+set}" = set; then :
  withval=$with_builddeps_group;
fi




  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
    if test "x$with_builddeps_conf" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
      builddepsfile=$with_builddeps_conf
      if test -s $builddepsfile; then
        . $builddepsfile
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
$as_echo "loaded!" >&6; }
      else
        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
      fi
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
      builddepsfile=`mktemp`
      touch $builddepsfile
      # Put all found confs into a single file.
      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
      # Source the file to acquire the variables
      if test -s $builddepsfile; then
        . $builddepsfile
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
$as_echo "found at least one!" >&6; }
      else
        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
      fi
    fi
    # Create build and target names that use _ instead of "-" and ".".
    # This is necessary to use them in variable names.
    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
    # Extract rewrite information for build and target
    eval rewritten_build=\${REWRITE_${build_var}}
    if test "x$rewritten_build" = x; then
      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
      echo Build stays the same $rewritten_build
    else
      echo Rewriting build for builddeps into $rewritten_build
    fi
    eval rewritten_target=\${REWRITE_${target_var}}
    if test "x$rewritten_target" = x; then
      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
      echo Target stays the same $rewritten_target
    else
      echo Rewriting target for builddeps into $rewritten_target
    fi
    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
  fi
  for ac_prog in 7z unzip
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_BDEPS_UNZIP+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_BDEPS_FTP+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_BDEPS_FTP="$ac_prog"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
if test -n "$BDEPS_FTP"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
$as_echo "$BDEPS_FTP" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$BDEPS_FTP" && break
done



###############################################################################
#
# Determine OpenJDK variants, options and version numbers.
#
###############################################################################

# We need build & target for this.


  ###############################################################################
  #
  # 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.
    headful_msg="include 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"
    headful_msg="headless only"
  fi

  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
$as_echo "$headful_msg" >&6; }





  # 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
  fi


  ###############################################################################
  #
  # Enable or disable unlimited crypto
  #
  # Check whether --enable-unlimited-crypto was given.
if test "${enable_unlimited_crypto+set}" = set; then :
  enableval=$enable_unlimited_crypto;
else
  enable_unlimited_crypto=no
fi

  if test "x$enable_unlimited_crypto" = "xyes"; then
    UNLIMITED_CRYPTO=true
  else
    UNLIMITED_CRYPTO=false
  fi


  ###############################################################################
  #
  # Enable or disable the elliptic curve crypto implementation
  #


  ###############################################################################
  #
  # --enable-rmiconnector-iiop
  #
  # Check whether --enable-rmiconnector-iiop was given.
if test "${enable_rmiconnector_iiop+set}" = set; then :
  enableval=$enable_rmiconnector_iiop;
fi

  if test "x$enable_rmiconnector_iiop" = "xyes"; then
    RMICONNECTOR_IIOP=true
  else
    RMICONNECTOR_IIOP=false
  fi


  ###############################################################################
  #
  # Compress jars
  #
  COMPRESS_JARS=false




  # Source the version numbers
  . $AUTOCONF_DIR/version-numbers

  # Get the settings from parameters

# Check whether --with-milestone was given.
if test "${with_milestone+set}" = set; then :
  withval=$with_milestone;
fi

  if test "x$with_milestone" = xyes; then
    as_fn_error $? "Milestone must have a value" "$LINENO" 5
  elif test "x$with_milestone" != x; then
    MILESTONE="$with_milestone"
  fi
  if test "x$MILESTONE" = x; then
    MILESTONE=internal
  fi


# Check whether --with-update-version was given.
if test "${with_update_version+set}" = set; then :
  withval=$with_update_version;
fi

  if test "x$with_update_version" = xyes; then
    as_fn_error $? "Update version must have a value" "$LINENO" 5
  elif test "x$with_update_version" != x; then
    JDK_UPDATE_VERSION="$with_update_version"
    # On macosx 10.7, it's not possible to set --with-update-version=0X due
    # to a bug in expr (which reduces it to just X). To work around this, we
    # always add a 0 to one digit update versions.
    if test "${#JDK_UPDATE_VERSION}" = "1"; then
      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
    fi
  fi


# Check whether --with-user-release-suffix was given.
if test "${with_user_release_suffix+set}" = set; then :
  withval=$with_user_release_suffix;
fi

  if test "x$with_user_release_suffix" = xyes; then
    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
  elif test "x$with_user_release_suffix" != x; then
    USER_RELEASE_SUFFIX="$with_user_release_suffix"
  fi


# Check whether --with-build-number was given.
if test "${with_build_number+set}" = set; then :
  withval=$with_build_number;
fi

  if test "x$with_build_number" = xyes; then
    as_fn_error $? "Build number must have a value" "$LINENO" 5
  elif test "x$with_build_number" != x; then
    JDK_BUILD_NUMBER="$with_build_number"
  fi
  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
  if test "x$JDK_BUILD_NUMBER" = x; then
    JDK_BUILD_NUMBER=b00
    if test "x$USER_RELEASE_SUFFIX" = x; then
      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
      # Avoid [:alnum:] since it depends on the locale.
      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
    fi
  fi

  # Now set the JDK version, milestone, build number etc.















  COPYRIGHT_YEAR=`date +'%Y'`


  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


  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`



###############################################################################
#
# 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


  # We look for the Boot JDK through various means, going from more certain to
  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
  # must check if this is indeed valid; otherwise we'll continue looking.

  # Test: Is bootjdk explicitely set by command line arguments?

  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test

  if test "x$with_boot_jdk" != x; then
    BOOT_JDK=$with_boot_jdk
    BOOT_JDK_FOUND=maybe
    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
  fi


    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi

  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
    # Having specified an argument which is incorrect will produce an instant failure;
    # we should not go on looking
    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
  fi

  # Test: Is bootjdk available from builddeps?

  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test



  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_bootjdk_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_bootjdk_TARGET_${rewritten_target_var}}
    fi
    if test "x$resource" = x; then
      # Ok, lets instead look for a build specific resource
      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
    fi
    if test "x$resource" = x; then
      # Ok, lets instead look for a generic resource
      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
      resource=${builddep_bootjdk}
    fi
    if test "x$resource" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
$as_echo "$as_me: Using builddeps $resource for bootjdk" >&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

  # bootjdk 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 bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
$as_echo "$as_me: Downloading build dependency bootjdk 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/bootjdk.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_bootjdk_ROOT}
      thecflags=${builddep_bootjdk_CFLAGS}
      thelibs=${builddep_bootjdk_LIBS}
      if test "x$depdir" = x; then
        as_fn_error $? "Could not download build dependency bootjdk" "$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=maybe
      else BOOT_JDK_FOUND=no

    fi
    else BOOT_JDK_FOUND=no

  fi



    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi


  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?

  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test

  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
    # First check at user selected default

  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test

  if test -x /usr/libexec/java_home; then
    BOOT_JDK=`/usr/libexec/java_home `
    BOOT_JDK_FOUND=maybe
    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
  fi


    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi

    # If that did not work out (e.g. too old), try explicit versions instead

  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test

  if test -x /usr/libexec/java_home; then
    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
    BOOT_JDK_FOUND=maybe
    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
  fi


    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi


  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test

  if test -x /usr/libexec/java_home; then
    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
    BOOT_JDK_FOUND=maybe
    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
  fi


    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi


  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test

  if test -x /usr/libexec/java_home; then
    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
    BOOT_JDK_FOUND=maybe
    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
  fi


    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi

  fi


    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi


  # Test: Is $JAVA_HOME set?

  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test

  if test "x$JAVA_HOME" != x; then
    JAVA_HOME_PROCESSED="$JAVA_HOME"

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$JAVA_HOME_PROCESSED"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    JAVA_HOME_PROCESSED="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$JAVA_HOME_PROCESSED"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    JAVA_HOME_PROCESSED="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$JAVA_HOME_PROCESSED"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
  fi

    if test ! -d "$JAVA_HOME_PROCESSED"; 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;}
    else
      # Aha, the user has set a JAVA_HOME
      # let us use that as the Boot JDK.
      BOOT_JDK="$JAVA_HOME_PROCESSED"
      BOOT_JDK_FOUND=maybe
      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
    fi
  fi


    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi


  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?

  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test

  # 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 ${ac_cv_path_JAVAC_CHECK+:} false; 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 as_fn_executable_p "$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 ${ac_cv_path_JAVA_CHECK+:} false; 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 as_fn_executable_p "$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.

  if test "x$OPENJDK_BUILD_OS" != xwindows; then
    # Follow a chain of symbolic links. Use readlink
    # where it exists, else fall back to horribly
    # complicated shell code.
    if test "x$READLINK_TESTED" != yes; then
      # On MacOSX there is a readlink tool with a different
      # purpose than the GNU readlink tool. Check the found readlink.
      ISGNU=`$READLINK --version 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
      # Save the current directory for restoring afterwards
      STARTDIR=$PWD
      COUNTER=0
      sym_link_dir=`$DIRNAME $BINARY`
      sym_link_file=`$BASENAME $BINARY`
      cd $sym_link_dir
      # Use -P flag to resolve symlinks in directories.
      cd `$THEPWDCMD -P`
      sym_link_dir=`$THEPWDCMD -P`
      # Resolve file symlinks
      while test $COUNTER -lt 20; do
        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
        if test "x$ISLINK" == x; then
          # This is not a symbolic link! We are done!
          break
        fi
        # Again resolve directory symlinks since the target of the just found
        # link could be in a different directory
        cd `$DIRNAME $ISLINK`
        sym_link_dir=`$THEPWDCMD -P`
        sym_link_file=`$BASENAME $ISLINK`
        let COUNTER=COUNTER+1
      done
      cd $STARTDIR
      BINARY=$sym_link_dir/$sym_link_file
    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
      # Looks like we found ourselves an JDK
      BOOT_JDK_FOUND=maybe
      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
    fi
  fi


    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi


  # Test: Is there a JDK installed in default, well-known locations?

  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test

  if test "x$OPENJDK_TARGET_OS" = xwindows; then

  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test

  if test "x$ProgramW6432" != x; then
    VIRTUAL_DIR="$ProgramW6432/Java"

  windows_path="$VIRTUAL_DIR"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    VIRTUAL_DIR="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    VIRTUAL_DIR="$unix_path"
  fi


  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
  BOOT_JDK_SUFFIX=""
  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
  if test "x$ALL_JDKS_FOUND" != x; then
    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do

  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test

        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
        if test -d "$BOOT_JDK"; then
          BOOT_JDK_FOUND=maybe
          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
        fi


    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi

    done
  fi

  fi


    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi


  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test

  if test "x$PROGRAMW6432" != x; then
    VIRTUAL_DIR="$PROGRAMW6432/Java"

  windows_path="$VIRTUAL_DIR"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    VIRTUAL_DIR="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    VIRTUAL_DIR="$unix_path"
  fi


  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
  BOOT_JDK_SUFFIX=""
  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
  if test "x$ALL_JDKS_FOUND" != x; then
    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do

  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test

        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
        if test -d "$BOOT_JDK"; then
          BOOT_JDK_FOUND=maybe
          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
        fi


    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi

    done
  fi

  fi


    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi


  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test

  if test "x$PROGRAMFILES" != x; then
    VIRTUAL_DIR="$PROGRAMFILES/Java"

  windows_path="$VIRTUAL_DIR"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    VIRTUAL_DIR="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    VIRTUAL_DIR="$unix_path"
  fi


  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
  BOOT_JDK_SUFFIX=""
  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
  if test "x$ALL_JDKS_FOUND" != x; then
    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do

  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test

        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
        if test -d "$BOOT_JDK"; then
          BOOT_JDK_FOUND=maybe
          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
        fi


    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi

    done
  fi

  fi


    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi


  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test

  if test "x$ProgramFiles" != x; then
    VIRTUAL_DIR="$ProgramFiles/Java"

  windows_path="$VIRTUAL_DIR"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    VIRTUAL_DIR="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    VIRTUAL_DIR="$unix_path"
  fi


  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
  BOOT_JDK_SUFFIX=""
  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
  if test "x$ALL_JDKS_FOUND" != x; then
    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do

  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test

        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
        if test -d "$BOOT_JDK"; then
          BOOT_JDK_FOUND=maybe
          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
        fi


    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi

    done
  fi

  fi


    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi


  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test

  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
  BOOT_JDK_SUFFIX=""
  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
  if test "x$ALL_JDKS_FOUND" != x; then
    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do

  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test

        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
        if test -d "$BOOT_JDK"; then
          BOOT_JDK_FOUND=maybe
          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
        fi


    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi

    done
  fi


    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi

  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then

  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test

  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
  BOOT_JDK_SUFFIX="/Contents/Home"
  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
  if test "x$ALL_JDKS_FOUND" != x; then
    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do

  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test

        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
        if test -d "$BOOT_JDK"; then
          BOOT_JDK_FOUND=maybe
          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
        fi


    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi

    done
  fi


    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi


  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test

  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
  BOOT_JDK_SUFFIX="/Contents/Home"
  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
  if test "x$ALL_JDKS_FOUND" != x; then
    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do

  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test

        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
        if test -d "$BOOT_JDK"; then
          BOOT_JDK_FOUND=maybe
          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
        fi


    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi

    done
  fi


    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi

  elif test "x$OPENJDK_TARGET_OS" = xlinux; then

  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test

  BOOT_JDK_PREFIX="/usr/lib/jvm"
  BOOT_JDK_SUFFIX=""
  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
  if test "x$ALL_JDKS_FOUND" != x; then
    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do

  if test "x$BOOT_JDK_FOUND" = xno; then
    # Now execute the test

        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
        if test -d "$BOOT_JDK"; then
          BOOT_JDK_FOUND=maybe
          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
        fi


    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi

    done
  fi


    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi

  fi


    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
      # Do we have a bin/java?
      if test ! -x "$BOOT_JDK/bin/java"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
        BOOT_JDK_FOUND=no
      else
        # Do we have a bin/javac?
        if test ! -x "$BOOT_JDK/bin/javac"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
          BOOT_JDK_FOUND=no
        else
          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
            BOOT_JDK_FOUND=no
          else
            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`

            # Extra M4 quote needed to protect [] in grep expression.
            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
            if test "x$FOUND_CORRECT_VERSION" = x; then
              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
              BOOT_JDK_FOUND=no
            else
              # We're done! :-)
              BOOT_JDK_FOUND=yes

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$BOOT_JDK"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$BOOT_JDK"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    BOOT_JDK="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$BOOT_JDK"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
  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 Boot JDK version" >&5
$as_echo_n "checking Boot JDK version... " >&6; }
              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
$as_echo "$BOOT_JDK_VERSION" >&6; }
            fi # end check jdk version
          fi # end check rt.jar
        fi # end check javac
      fi # end check java
    fi # end check boot jdk found
  fi


  # If we haven't found anything yet, we've truly lost. Give up.
  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: freetype, cups, pulse, alsa etc
  MISSING_DEPENDENCY=openjdk

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    cygwin_help $MISSING_DEPENDENCY
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    msys_help $MISSING_DEPENDENCY
  else
    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 ;;
    esac

    if test "x$PKGHANDLER_COMMAND" != x; then
      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
    fi
  fi

    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
$as_echo "$as_me: Could not find a valid Boot 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



  # Setup tools from the Boot JDK.

  # Use user overridden value if available, otherwise locate tool in the Boot JDK.

  # Publish this variable in the help.


  if test "x$JAVA" = x; then
    # The variable is not set by user, try to locate tool using the code snippet

      { $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}: result: not found" >&5
$as_echo "not found" >&6; }
        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
      fi
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }


  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !JAVA! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xJAVA" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet

      { $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}: result: not found" >&5
$as_echo "not found" >&6; }
        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
      fi
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }


    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$JAVA"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_JAVA+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $JAVA in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JAVA="$JAVA" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_JAVA="$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=$ac_cv_path_JAVA
if test -n "$JAVA"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
$as_echo "$JAVA" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$JAVA" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
$as_echo_n "checking for JAVA... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  # Use user overridden value if available, otherwise locate tool in the Boot JDK.

  # Publish this variable in the help.


  if test "x$JAVAC" = x; then
    # The variable is not set by user, try to locate tool using the code snippet

      { $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_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
      fi
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }


  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !JAVAC! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xJAVAC" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet

      { $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_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
      fi
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }


    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$JAVAC"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_JAVAC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $JAVAC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JAVAC="$JAVAC" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_JAVAC="$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=$ac_cv_path_JAVAC
if test -n "$JAVAC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
$as_echo "$JAVAC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$JAVAC" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
$as_echo_n "checking for JAVAC... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  # Use user overridden value if available, otherwise locate tool in the Boot JDK.

  # Publish this variable in the help.


  if test "x$JAVAH" = x; then
    # The variable is not set by user, try to locate tool using the code snippet

      { $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}: result: not found" >&5
$as_echo "not found" >&6; }
        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
      fi
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }


  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !JAVAH! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xJAVAH" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet

      { $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}: result: not found" >&5
$as_echo "not found" >&6; }
        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
      fi
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }


    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$JAVAH"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_JAVAH+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $JAVAH in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JAVAH="$JAVAH" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_JAVAH="$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
JAVAH=$ac_cv_path_JAVAH
if test -n "$JAVAH"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
$as_echo "$JAVAH" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$JAVAH" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
$as_echo_n "checking for JAVAH... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  # Use user overridden value if available, otherwise locate tool in the Boot JDK.

  # Publish this variable in the help.


  if test "x$JAR" = x; then
    # The variable is not set by user, try to locate tool using the code snippet

      { $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}: result: not found" >&5
$as_echo "not found" >&6; }
        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
      fi
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }


  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !JAR! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xJAR" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet

      { $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}: result: not found" >&5
$as_echo "not found" >&6; }
        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
      fi
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }


    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$JAR"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_JAR+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $JAR in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JAR="$JAR" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_JAR="$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
JAR=$ac_cv_path_JAR
if test -n "$JAR"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
$as_echo "$JAR" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$JAR" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
$as_echo_n "checking for JAR... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  # Use user overridden value if available, otherwise locate tool in the Boot JDK.

  # Publish this variable in the help.


  if test "x$NATIVE2ASCII" = x; then
    # The variable is not set by user, try to locate tool using the code snippet

      { $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}: result: not found" >&5
$as_echo "not found" >&6; }
        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
      fi
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }


  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !NATIVE2ASCII! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xNATIVE2ASCII" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet

      { $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}: result: not found" >&5
$as_echo "not found" >&6; }
        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
      fi
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }


    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$NATIVE2ASCII"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_NATIVE2ASCII+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $NATIVE2ASCII in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_NATIVE2ASCII="$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
NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
if test -n "$NATIVE2ASCII"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
$as_echo "$NATIVE2ASCII" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$NATIVE2ASCII" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
$as_echo_n "checking for NATIVE2ASCII... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  # Use user overridden value if available, otherwise locate tool in the Boot JDK.

  # Publish this variable in the help.


  if test "x$JARSIGNER" = x; then
    # The variable is not set by user, try to locate tool using the code snippet

      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
      JARSIGNER=$BOOT_JDK/bin/jarsigner
      if test ! -x $JARSIGNER; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
      fi
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }


  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !JARSIGNER! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xJARSIGNER" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet

      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
      JARSIGNER=$BOOT_JDK/bin/jarsigner
      if test ! -x $JARSIGNER; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
      fi
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }


    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$JARSIGNER"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_JARSIGNER+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $JARSIGNER in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JARSIGNER="$JARSIGNER" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_JARSIGNER="$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
JARSIGNER=$ac_cv_path_JARSIGNER
if test -n "$JARSIGNER"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
$as_echo "$JARSIGNER" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$JARSIGNER" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
$as_echo_n "checking for JARSIGNER... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  # Finally, set some other options...

  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
  BOOT_JDK_SOURCETARGET="-source 8 -target 8"




###############################################################################
#
# 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"
  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
  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/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/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/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/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/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/nashorn/make/Makefile; then
      as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
    fi
    if 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/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/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/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/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/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/nashorn/make/Makefile; then
      as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
    fi
    if 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-nashorn was given.
if test "${with_override_nashorn+set}" = set; then :
  withval=$with_override_nashorn;
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/make/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/make/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/make/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/make/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; 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_nashorn" != x; then
    CURDIR="$PWD"
    cd "$with_override_nashorn"
    NASHORN_TOPDIR="`pwd`"
    cd "$CURDIR"
    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
$as_echo_n "checking if nashorn should be overridden... " >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
$as_echo "yes with $NASHORN_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/make/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


  BUILD_OUTPUT="$OUTPUT_ROOT"


  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
  BUILD_HOTSPOT=true



# Check whether --with-import-hotspot was given.
if test "${with_import_hotspot+set}" = set; then :
  withval=$with_import_hotspot;
fi

  if test "x$with_import_hotspot" != x; then
    CURDIR="$PWD"
    cd "$with_import_hotspot"
    HOTSPOT_DIST="`pwd`"
    cd "$CURDIR"
    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
$as_echo_n "checking if hotspot should be imported... " >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
$as_echo "yes from $HOTSPOT_DIST" >&6; }
    BUILD_HOTSPOT=false
  fi

  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"


###############################################################################
#
# Setup the toolchain (compilers etc), i.e. tools used to compile and process
# native code.
#
###############################################################################

# First determine the toolchain type (compiler family)


# Check whether --with-toolchain-type was given.
if test "${with_toolchain_type+set}" = set; then :
  withval=$with_toolchain_type;
fi


  # Use indirect variable referencing
  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
  VALID_TOOLCHAINS=${!toolchain_var_name}

  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
    if test -n "$XCODEBUILD"; then
      # On Mac OS X, default toolchain to clang after Xcode 5
      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
      if test $? -ne 0; then
        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
      fi
      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
          $CUT -f 1 -d .`
      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
      if test $XCODE_MAJOR_VERSION -ge 5; then
          DEFAULT_TOOLCHAIN="clang"
      else
          DEFAULT_TOOLCHAIN="gcc"
      fi
    else
      # If Xcode is not installed, but the command line tools are
      # then we can't run xcodebuild. On these systems we should
      # default to clang
      DEFAULT_TOOLCHAIN="clang"
    fi
  else
    # First toolchain type in the list is the default
    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
  fi

  if test "x$with_toolchain_type" = xlist; then
    # List all toolchains
    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
    for toolchain in $VALID_TOOLCHAINS; do
      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
    done

    exit 0
  elif test "x$with_toolchain_type" != x; then
    # User override; check that it is valid
    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
      as_fn_error $? "Cannot continue." "$LINENO" 5
    fi
    TOOLCHAIN_TYPE=$with_toolchain_type
  else
    # No flag given, use default
    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
  fi


  TOOLCHAIN_CC_BINARY_clang="clang"
  TOOLCHAIN_CC_BINARY_gcc="gcc"
  TOOLCHAIN_CC_BINARY_microsoft="cl"
  TOOLCHAIN_CC_BINARY_solstudio="cc"
  TOOLCHAIN_CC_BINARY_xlc="xlc_r"

  TOOLCHAIN_CXX_BINARY_clang="clang++"
  TOOLCHAIN_CXX_BINARY_gcc="g++"
  TOOLCHAIN_CXX_BINARY_microsoft="cl"
  TOOLCHAIN_CXX_BINARY_solstudio="CC"
  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"

  # Use indirect variable referencing
  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}


  # Define filename patterns
  if test "x$OPENJDK_TARGET_OS" = xwindows; then
    LIBRARY_PREFIX=
    SHARED_LIBRARY_SUFFIX='.dll'
    STATIC_LIBRARY_SUFFIX='.lib'
    SHARED_LIBRARY='$1.dll'
    STATIC_LIBRARY='$1.lib'
    OBJ_SUFFIX='.obj'
    EXE_SUFFIX='.exe'
  else
    LIBRARY_PREFIX=lib
    SHARED_LIBRARY_SUFFIX='.so'
    STATIC_LIBRARY_SUFFIX='.a'
    SHARED_LIBRARY='lib$1.so'
    STATIC_LIBRARY='lib$1.a'
    OBJ_SUFFIX='.o'
    EXE_SUFFIX=''
    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
      SHARED_LIBRARY='lib$1.dylib'
      SHARED_LIBRARY_SUFFIX='.dylib'
    fi
  fi










  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
  else
    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
  fi


# Then detect the actual binaries needed

  # FIXME: Is this needed?
  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


  # Store the CFLAGS etc passed to the configure script.
  ORG_CFLAGS="$CFLAGS"
  ORG_CXXFLAGS="$CXXFLAGS"
  ORG_OBJCFLAGS="$OBJCFLAGS"

  # On Windows, we need to detect the visual studio installation first.
  # This will change the PATH, but we need to keep that new PATH even
  # after toolchain detection is done, since the compiler (on x86) uses
  # it for DLL resolution in runtime.
  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then

  # Store path to cygwin link.exe to help excluding it when searching for
  # VS linker. This must be done before changing the PATH when looking for VS.
  # 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 ${ac_cv_path_CYGWIN_LINK+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $CYGWIN_LINK in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_CYGWIN_LINK="$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
CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
if test -n "$CYGWIN_LINK"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
$as_echo "$CYGWIN_LINK" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  if test "x$CYGWIN_LINK" != x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
    "$CYGWIN_LINK" --version > /dev/null
    if test $? -eq 0 ; 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; }
      # This might be the VS linker. Don't exclude it later on.
      CYGWIN_LINK=""
    fi
  fi

  # First-hand choice is to locate and run the vsvars bat file.

  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
    VCVARSFILE="vc/bin/vcvars32.bat"
  else
    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
  fi

  VS_ENV_CMD=""
  VS_ENV_ARGS=""
  if test "x$with_toolsdir" != x; then

  if test "x$VS_ENV_CMD" = x; then
    VS100BASE="$with_toolsdir/../.."
    METHOD="--with-tools-dir"

  windows_path="$VS100BASE"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    VS100BASE="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    VS100BASE="$unix_path"
  fi

    if test -d "$VS100BASE"; then
      if test -f "$VS100BASE/$VCVARSFILE"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
        # TODO: improve detection for other versions of VS
        PLATFORM_TOOLSET="v100"
      else
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
      fi
    fi
  fi

  fi

  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
    # Having specified an argument which is incorrect will produce an instant failure;
    # we should not go on looking
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
  fi

  if test "x$VS100COMNTOOLS" != x; then

  if test "x$VS_ENV_CMD" = x; then
    VS100BASE="$VS100COMNTOOLS/../.."
    METHOD="VS100COMNTOOLS variable"

  windows_path="$VS100BASE"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    VS100BASE="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    VS100BASE="$unix_path"
  fi

    if test -d "$VS100BASE"; then
      if test -f "$VS100BASE/$VCVARSFILE"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
        # TODO: improve detection for other versions of VS
        PLATFORM_TOOLSET="v100"
      else
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
      fi
    fi
  fi

  fi
  if test "x$PROGRAMFILES" != x; then

  if test "x$VS_ENV_CMD" = x; then
    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
    METHOD="well-known name"

  windows_path="$VS100BASE"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    VS100BASE="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    VS100BASE="$unix_path"
  fi

    if test -d "$VS100BASE"; then
      if test -f "$VS100BASE/$VCVARSFILE"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
        # TODO: improve detection for other versions of VS
        PLATFORM_TOOLSET="v100"
      else
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
      fi
    fi
  fi

  fi

  if test "x$VS_ENV_CMD" = x; then
    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
    METHOD="well-known name"

  windows_path="$VS100BASE"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    VS100BASE="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    VS100BASE="$unix_path"
  fi

    if test -d "$VS100BASE"; then
      if test -f "$VS100BASE/$VCVARSFILE"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
        # TODO: improve detection for other versions of VS
        PLATFORM_TOOLSET="v100"
      else
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
      fi
    fi
  fi


  if test "x$VS_ENV_CMD" = x; then
    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
    METHOD="well-known name"

  windows_path="$VS100BASE"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    VS100BASE="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    VS100BASE="$unix_path"
  fi

    if test -d "$VS100BASE"; then
      if test -f "$VS100BASE/$VCVARSFILE"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
        # TODO: improve detection for other versions of VS
        PLATFORM_TOOLSET="v100"
      else
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
      fi
    fi
  fi


  if test "x$ProgramW6432" != x; then

  if test "x$VS_ENV_CMD" = x; then
    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
    METHOD="well-known name"

  windows_path="$WIN_SDK_BASE"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    WIN_SDK_BASE="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    WIN_SDK_BASE="$unix_path"
  fi

    if test -d "$WIN_SDK_BASE"; then
      # There have been cases of partial or broken SDK installations. A missing
      # lib dir is not going to work.
      if test ! -d "$WIN_SDK_BASE/../lib"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
          VS_ENV_ARGS="/x86"
        else
          VS_ENV_ARGS="/x64"
        fi
        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
        # TODO: improve detection for other versions of SDK
        PLATFORM_TOOLSET="Windows7.1SDK"
      else
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
      fi
    fi
  fi

  fi
  if test "x$PROGRAMW6432" != x; then

  if test "x$VS_ENV_CMD" = x; then
    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
    METHOD="well-known name"

  windows_path="$WIN_SDK_BASE"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    WIN_SDK_BASE="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    WIN_SDK_BASE="$unix_path"
  fi

    if test -d "$WIN_SDK_BASE"; then
      # There have been cases of partial or broken SDK installations. A missing
      # lib dir is not going to work.
      if test ! -d "$WIN_SDK_BASE/../lib"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
          VS_ENV_ARGS="/x86"
        else
          VS_ENV_ARGS="/x64"
        fi
        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
        # TODO: improve detection for other versions of SDK
        PLATFORM_TOOLSET="Windows7.1SDK"
      else
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
      fi
    fi
  fi

  fi
  if test "x$PROGRAMFILES" != x; then

  if test "x$VS_ENV_CMD" = x; then
    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
    METHOD="well-known name"

  windows_path="$WIN_SDK_BASE"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    WIN_SDK_BASE="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    WIN_SDK_BASE="$unix_path"
  fi

    if test -d "$WIN_SDK_BASE"; then
      # There have been cases of partial or broken SDK installations. A missing
      # lib dir is not going to work.
      if test ! -d "$WIN_SDK_BASE/../lib"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
          VS_ENV_ARGS="/x86"
        else
          VS_ENV_ARGS="/x64"
        fi
        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
        # TODO: improve detection for other versions of SDK
        PLATFORM_TOOLSET="Windows7.1SDK"
      else
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
      fi
    fi
  fi

  fi

  if test "x$VS_ENV_CMD" = x; then
    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
    METHOD="well-known name"

  windows_path="$WIN_SDK_BASE"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    WIN_SDK_BASE="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    WIN_SDK_BASE="$unix_path"
  fi

    if test -d "$WIN_SDK_BASE"; then
      # There have been cases of partial or broken SDK installations. A missing
      # lib dir is not going to work.
      if test ! -d "$WIN_SDK_BASE/../lib"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
          VS_ENV_ARGS="/x86"
        else
          VS_ENV_ARGS="/x64"
        fi
        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
        # TODO: improve detection for other versions of SDK
        PLATFORM_TOOLSET="Windows7.1SDK"
      else
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
      fi
    fi
  fi


  if test "x$VS_ENV_CMD" = x; then
    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
    METHOD="well-known name"

  windows_path="$WIN_SDK_BASE"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    WIN_SDK_BASE="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    WIN_SDK_BASE="$unix_path"
  fi

    if test -d "$WIN_SDK_BASE"; then
      # There have been cases of partial or broken SDK installations. A missing
      # lib dir is not going to work.
      if test ! -d "$WIN_SDK_BASE/../lib"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
          VS_ENV_ARGS="/x86"
        else
          VS_ENV_ARGS="/x64"
        fi
        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
        # TODO: improve detection for other versions of SDK
        PLATFORM_TOOLSET="Windows7.1SDK"
      else
        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
      fi
    fi
  fi


  if test "x$VS_ENV_CMD" != x; then
    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$VS_ENV_CMD"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$VS_ENV_CMD"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$VS_ENV_CMD"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    VS_ENV_CMD="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
  fi


    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}

    # We need to create a couple of temporary files.
    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
    $MKDIR -p $VS_ENV_TMP_DIR

    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
    # Instead create a shell script which will set the relevant variables when run.
    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"

  unix_path="$WINPATH_VS_ENV_CMD"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    windows_path=`$CYGPATH -m "$unix_path"`
    WINPATH_VS_ENV_CMD="$windows_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    windows_path=`cmd //c echo $unix_path`
    WINPATH_VS_ENV_CMD="$windows_path"
  fi

    WINPATH_BASH="$BASH"

  unix_path="$WINPATH_BASH"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    windows_path=`$CYGPATH -m "$unix_path"`
    WINPATH_BASH="$windows_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    windows_path=`cmd //c echo $unix_path`
    WINPATH_BASH="$windows_path"
  fi


    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
    # script (executable by bash) that will setup the important variables.
    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
    # This will end up something like:
    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
    # These will end up something like:
    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
    # The trailing space for everyone except PATH is no typo, but is needed due
    # to trailing \ in the Windows paths. These will be stripped later.
    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE

    # Now execute the newly created bat file.
    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
    # Change directory so we don't need to mess with Windows paths in redirects.
    cd $VS_ENV_TMP_DIR
    cmd /c extract-vs-env.bat | $CAT
    cd $CURDIR

    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
      as_fn_error $? "Cannot continue" "$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.
    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
$as_echo "$as_me: Setting extracted environment variables" >&6;}
    . $VS_ENV_TMP_DIR/set-vs-env.sh
    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
  else
    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
  fi

  # At this point, we should have correct variables in the environment, or we can't continue.
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
$as_echo_n "checking for Visual Studio variables... " >&6; }

  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
$as_echo "present but broken" >&6; }
      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
      # Remove any trailing "\" and " " from the variables.
      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
      # Remove any paths containing # (typically F#) as that messes up make. This
      # is needed if visual studio was installed with F# support.
      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`




    fi
  else
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }

    if test "x$VS_ENV_CMD" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
$as_echo "$as_me: Running the extraction script failed." >&6;}
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
    as_fn_error $? "Cannot continue" "$LINENO" 5
  fi

    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
    PATH="$VS_PATH"
    # The microsoft toolchain also requires INCLUDE and LIB to be set.
    export INCLUDE="$VS_INCLUDE"
    export LIB="$VS_LIB"
  fi

  # autoconf magic only relies on PATH, so update it if tools dir is specified
  OLD_PATH="$PATH"

  # For solaris we really need solaris tools, and not the GNU equivalent.
  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
  # so add that to path before starting to probe.
  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
    PATH="/usr/ccs/bin:$PATH"
  fi

  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
  # override all other locations.
  if test "x$TOOLCHAIN_PATH" != x; then
    PATH=$TOOLCHAIN_PATH:$PATH
  fi


  #
  # Setup the compilers (CC and CXX)
  #

  COMPILER_NAME=C
  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"

  if test "x$CC" != x; then
    # User has supplied compiler name already, always let that override.
    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
    if test "x`basename $CC`" = "x$CC"; then
      # A command without a complete path is provided, search $PATH.

      for ac_prog in $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 ${ac_cv_path_POTENTIAL_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $POTENTIAL_CC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_POTENTIAL_CC="$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
POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
if test -n "$POTENTIAL_CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
$as_echo "$POTENTIAL_CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$POTENTIAL_CC" && break
done

      if test "x$POTENTIAL_CC" != x; then
        CC=$POTENTIAL_CC
      else
        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
      fi
    else
      # Otherwise it might already be a complete path
      if test ! -x "$CC"; then
        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
      fi
    fi
  else
    # No user supplied value. Locate compiler ourselves.

    # If we are cross compiling, assume cross compilation tools follows the
    # cross compilation standard where they are prefixed with the autoconf
    # standard name for the target. For example the binary
    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
    # If we are not cross compiling, then the default compiler name will be
    # used.

    CC=
    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
    # before checking the rest of the PATH.
    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
    # step, this should not be necessary.
    if test -n "$TOOLCHAIN_PATH"; then
      PATH_save="$PATH"
      PATH="$TOOLCHAIN_PATH"
      for ac_prog in $SEARCH_LIST
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 ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $TOOLCHAIN_PATH_CC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_TOOLCHAIN_PATH_CC="$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
TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
if test -n "$TOOLCHAIN_PATH_CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$TOOLCHAIN_PATH_CC" && break
done

      CC=$TOOLCHAIN_PATH_CC
      PATH="$PATH_save"
    fi

    # AC_PATH_PROGS can't be run multiple times with the same variable,
    # so create a new name for this run.
    if test "x$CC" = x; then
      for ac_prog in $SEARCH_LIST
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 ${ac_cv_path_POTENTIAL_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $POTENTIAL_CC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_POTENTIAL_CC="$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
POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
if test -n "$POTENTIAL_CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
$as_echo "$POTENTIAL_CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$POTENTIAL_CC" && break
done

      CC=$POTENTIAL_CC
    fi

    if test "x$CC" = x; then

  # Print a helpful message on how to acquire the necessary build dependency.
  # devkit is the help tag: freetype, cups, pulse, alsa etc
  MISSING_DEPENDENCY=devkit

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    cygwin_help $MISSING_DEPENDENCY
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    msys_help $MISSING_DEPENDENCY
  else
    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 ;;
    esac

    if test "x$PKGHANDLER_COMMAND" != x; then
      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
    fi
  fi

      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
    fi
  fi

  # Now we have a compiler binary in CC. Make sure it's okay.

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$CC"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$CC"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$CC"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    CC="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
  fi

  TEST_COMPILER="$CC"
  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
  if test "x$OPENJDK_BUILD_OS" != xaix; then
    # FIXME: This test should not be needed anymore; we don't do that for any platform.
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
$as_echo_n "checking resolved symbolic links for CC... " >&6; }

  if test "x$OPENJDK_BUILD_OS" != xwindows; then
    # Follow a chain of symbolic links. Use readlink
    # where it exists, else fall back to horribly
    # complicated shell code.
    if test "x$READLINK_TESTED" != yes; then
      # On MacOSX there is a readlink tool with a different
      # purpose than the GNU readlink tool. Check the found readlink.
      ISGNU=`$READLINK --version 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
      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
    else
      # Save the current directory for restoring afterwards
      STARTDIR=$PWD
      COUNTER=0
      sym_link_dir=`$DIRNAME $TEST_COMPILER`
      sym_link_file=`$BASENAME $TEST_COMPILER`
      cd $sym_link_dir
      # Use -P flag to resolve symlinks in directories.
      cd `$THEPWDCMD -P`
      sym_link_dir=`$THEPWDCMD -P`
      # Resolve file symlinks
      while test $COUNTER -lt 20; do
        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
        if test "x$ISLINK" == x; then
          # This is not a symbolic link! We are done!
          break
        fi
        # Again resolve directory symlinks since the target of the just found
        # link could be in a different directory
        cd `$DIRNAME $ISLINK`
        sym_link_dir=`$THEPWDCMD -P`
        sym_link_file=`$BASENAME $ISLINK`
        let COUNTER=COUNTER+1
      done
      cd $STARTDIR
      TEST_COMPILER=$sym_link_dir/$sym_link_file
    fi
  fi

    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
$as_echo "$TEST_COMPILER" >&6; }
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
$as_echo_n "checking if CC is disguised ccache... " >&6; }

  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
  if test "x$COMPILER_BASENAME" = "xccache"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
    # We want to control ccache invocation ourselves, so ignore this cc and try
    # searching again.

    # Remove the path to the fake ccache cc from the PATH
    RETRY_COMPILER_SAVED_PATH="$PATH"
    COMPILER_DIRNAME=`$DIRNAME $CC`
    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"

    # Try again looking for our compiler
    if test -n "$ac_tool_prefix"; then
  for ac_prog in $TOOLCHAIN_CC_BINARY
  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 ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$PROPER_COMPILER_CC"; then
  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_PROPER_COMPILER_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
PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
if test -n "$PROPER_COMPILER_CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
$as_echo "$PROPER_COMPILER_CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


    test -n "$PROPER_COMPILER_CC" && break
  done
fi
if test -z "$PROPER_COMPILER_CC"; then
  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
  for ac_prog in $TOOLCHAIN_CC_BINARY
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 ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_PROPER_COMPILER_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_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
if test -n "$ac_ct_PROPER_COMPILER_CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$ac_ct_PROPER_COMPILER_CC" && break
done

  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
    PROPER_COMPILER_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
    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
  fi
fi


  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$PROPER_COMPILER_CC"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$PROPER_COMPILER_CC"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$PROPER_COMPILER_CC"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    PROPER_COMPILER_CC="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
  fi

    PATH="$RETRY_COMPILER_SAVED_PATH"

    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
$as_echo_n "checking for resolved symbolic links for CC... " >&6; }

  if test "x$OPENJDK_BUILD_OS" != xwindows; then
    # Follow a chain of symbolic links. Use readlink
    # where it exists, else fall back to horribly
    # complicated shell code.
    if test "x$READLINK_TESTED" != yes; then
      # On MacOSX there is a readlink tool with a different
      # purpose than the GNU readlink tool. Check the found readlink.
      ISGNU=`$READLINK --version 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
      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
    else
      # Save the current directory for restoring afterwards
      STARTDIR=$PWD
      COUNTER=0
      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
      cd $sym_link_dir
      # Use -P flag to resolve symlinks in directories.
      cd `$THEPWDCMD -P`
      sym_link_dir=`$THEPWDCMD -P`
      # Resolve file symlinks
      while test $COUNTER -lt 20; do
        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
        if test "x$ISLINK" == x; then
          # This is not a symbolic link! We are done!
          break
        fi
        # Again resolve directory symlinks since the target of the just found
        # link could be in a different directory
        cd `$DIRNAME $ISLINK`
        sym_link_dir=`$THEPWDCMD -P`
        sym_link_file=`$BASENAME $ISLINK`
        let COUNTER=COUNTER+1
      done
      cd $STARTDIR
      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
    fi
  fi

    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
$as_echo "$PROPER_COMPILER_CC" >&6; }
    CC="$PROPER_COMPILER_CC"
  else
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
$as_echo "no, keeping CC" >&6; }
  fi


  COMPILER=$CC
  COMPILER_NAME=$COMPILER_NAME

  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
    # cc -V output typically looks like
    #     cc: Sun C 5.12 Linux_i386 2011/11/16
    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
    # Check that this is likely to be the Solaris Studio cc.
    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
    if test $? -ne 0; then
      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
    fi
    # Remove usage instructions (if present), and
    # collapse compiler output into a single line
    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
        $SED -e 's/ *[Uu]sage:.*//'`
    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
    # xlc -qversion output typically looks like
    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
    #     Version: 11.01.0000.0015
    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
    # Check that this is likely to be the IBM XL C compiler.
    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
    if test $? -ne 0; then
      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
    fi
    # Collapse compiler output into a single line
    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
    # There is no specific version flag, but all output starts with a version string.
    # First line typically looks something like:
    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
    # Check that this is likely to be Microsoft CL.EXE.
    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
    if test $? -ne 0; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
    fi
    # Collapse compiler output into a single line
    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
    # gcc --version output typically looks like
    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
    #     Copyright (C) 2013 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.
    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
    # Check that this is likely to be GCC.
    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
    if test $? -ne 0; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
    fi
    # Remove Copyright and legalese from version string, and
    # collapse into a single line
    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
        $SED -e 's/ *Copyright .*//'`
    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
    # clang --version output typically looks like
    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
    #    clang version 3.3 (tags/RELEASE_33/final)
    # or
    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
    #    Target: x86_64-pc-linux-gnu
    #    Thread model: posix
    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
    # Check that this is likely to be clang
    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
    if test $? -ne 0; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
    fi
    # Collapse compiler output into a single line
    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
  else
      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
  fi
  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
  CC_VERSION_STRING="$COMPILER_VERSION_STRING"

  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}


  # Now that we have resolved CC ourself, let autoconf have its go at it
  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 $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 ${ac_cv_prog_CC+:} false; 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 as_fn_executable_p "$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 $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 ${ac_cv_prog_ac_ct_CC+:} false; 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 as_fn_executable_p "$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 ${ac_cv_objext+:} false; 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 ${ac_cv_c_compiler_gnu+:} false; 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 ${ac_cv_prog_cc_g+:} false; 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 ${ac_cv_prog_cc_c89+:} false; 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>
struct stat;
/* 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



  COMPILER_NAME=C++
  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"

  if test "x$CXX" != x; then
    # User has supplied compiler name already, always let that override.
    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
    if test "x`basename $CXX`" = "x$CXX"; then
      # A command without a complete path is provided, search $PATH.

      for ac_prog in $CXX
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 ${ac_cv_path_POTENTIAL_CXX+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $POTENTIAL_CXX in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_POTENTIAL_CXX="$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
POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
if test -n "$POTENTIAL_CXX"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
$as_echo "$POTENTIAL_CXX" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$POTENTIAL_CXX" && break
done

      if test "x$POTENTIAL_CXX" != x; then
        CXX=$POTENTIAL_CXX
      else
        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
      fi
    else
      # Otherwise it might already be a complete path
      if test ! -x "$CXX"; then
        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
      fi
    fi
  else
    # No user supplied value. Locate compiler ourselves.

    # If we are cross compiling, assume cross compilation tools follows the
    # cross compilation standard where they are prefixed with the autoconf
    # standard name for the target. For example the binary
    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
    # If we are not cross compiling, then the default compiler name will be
    # used.

    CXX=
    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
    # before checking the rest of the PATH.
    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
    # step, this should not be necessary.
    if test -n "$TOOLCHAIN_PATH"; then
      PATH_save="$PATH"
      PATH="$TOOLCHAIN_PATH"
      for ac_prog in $SEARCH_LIST
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 ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $TOOLCHAIN_PATH_CXX in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_TOOLCHAIN_PATH_CXX="$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
TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
if test -n "$TOOLCHAIN_PATH_CXX"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$TOOLCHAIN_PATH_CXX" && break
done

      CXX=$TOOLCHAIN_PATH_CXX
      PATH="$PATH_save"
    fi

    # AC_PATH_PROGS can't be run multiple times with the same variable,
    # so create a new name for this run.
    if test "x$CXX" = x; then
      for ac_prog in $SEARCH_LIST
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 ${ac_cv_path_POTENTIAL_CXX+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $POTENTIAL_CXX in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_POTENTIAL_CXX="$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
POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
if test -n "$POTENTIAL_CXX"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
$as_echo "$POTENTIAL_CXX" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$POTENTIAL_CXX" && break
done

      CXX=$POTENTIAL_CXX
    fi

    if test "x$CXX" = x; then

  # Print a helpful message on how to acquire the necessary build dependency.
  # devkit is the help tag: freetype, cups, pulse, alsa etc
  MISSING_DEPENDENCY=devkit

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    cygwin_help $MISSING_DEPENDENCY
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    msys_help $MISSING_DEPENDENCY
  else
    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 ;;
    esac

    if test "x$PKGHANDLER_COMMAND" != x; then
      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
    fi
  fi

      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
    fi
  fi

  # Now we have a compiler binary in CXX. Make sure it's okay.

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$CXX"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$CXX"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$CXX"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    CXX="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
  fi

  TEST_COMPILER="$CXX"
  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
  if test "x$OPENJDK_BUILD_OS" != xaix; then
    # FIXME: This test should not be needed anymore; we don't do that for any platform.
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
$as_echo_n "checking resolved symbolic links for CXX... " >&6; }

  if test "x$OPENJDK_BUILD_OS" != xwindows; then
    # Follow a chain of symbolic links. Use readlink
    # where it exists, else fall back to horribly
    # complicated shell code.
    if test "x$READLINK_TESTED" != yes; then
      # On MacOSX there is a readlink tool with a different
      # purpose than the GNU readlink tool. Check the found readlink.
      ISGNU=`$READLINK --version 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
      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
    else
      # Save the current directory for restoring afterwards
      STARTDIR=$PWD
      COUNTER=0
      sym_link_dir=`$DIRNAME $TEST_COMPILER`
      sym_link_file=`$BASENAME $TEST_COMPILER`
      cd $sym_link_dir
      # Use -P flag to resolve symlinks in directories.
      cd `$THEPWDCMD -P`
      sym_link_dir=`$THEPWDCMD -P`
      # Resolve file symlinks
      while test $COUNTER -lt 20; do
        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
        if test "x$ISLINK" == x; then
          # This is not a symbolic link! We are done!
          break
        fi
        # Again resolve directory symlinks since the target of the just found
        # link could be in a different directory
        cd `$DIRNAME $ISLINK`
        sym_link_dir=`$THEPWDCMD -P`
        sym_link_file=`$BASENAME $ISLINK`
        let COUNTER=COUNTER+1
      done
      cd $STARTDIR
      TEST_COMPILER=$sym_link_dir/$sym_link_file
    fi
  fi

    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
$as_echo "$TEST_COMPILER" >&6; }
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
$as_echo_n "checking if CXX is disguised ccache... " >&6; }

  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
  if test "x$COMPILER_BASENAME" = "xccache"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
    # We want to control ccache invocation ourselves, so ignore this cc and try
    # searching again.

    # Remove the path to the fake ccache cc from the PATH
    RETRY_COMPILER_SAVED_PATH="$PATH"
    COMPILER_DIRNAME=`$DIRNAME $CXX`
    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"

    # Try again looking for our compiler
    if test -n "$ac_tool_prefix"; then
  for ac_prog in $TOOLCHAIN_CXX_BINARY
  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 ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$PROPER_COMPILER_CXX"; then
  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_PROPER_COMPILER_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
PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
if test -n "$PROPER_COMPILER_CXX"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
$as_echo "$PROPER_COMPILER_CXX" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


    test -n "$PROPER_COMPILER_CXX" && break
  done
fi
if test -z "$PROPER_COMPILER_CXX"; then
  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
  for ac_prog in $TOOLCHAIN_CXX_BINARY
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 ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_PROPER_COMPILER_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_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
done

  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
    PROPER_COMPILER_CXX=""
  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
    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
  fi
fi


  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$PROPER_COMPILER_CXX"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$PROPER_COMPILER_CXX"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$PROPER_COMPILER_CXX"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    PROPER_COMPILER_CXX="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
  fi

    PATH="$RETRY_COMPILER_SAVED_PATH"

    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }

  if test "x$OPENJDK_BUILD_OS" != xwindows; then
    # Follow a chain of symbolic links. Use readlink
    # where it exists, else fall back to horribly
    # complicated shell code.
    if test "x$READLINK_TESTED" != yes; then
      # On MacOSX there is a readlink tool with a different
      # purpose than the GNU readlink tool. Check the found readlink.
      ISGNU=`$READLINK --version 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
      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
    else
      # Save the current directory for restoring afterwards
      STARTDIR=$PWD
      COUNTER=0
      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
      cd $sym_link_dir
      # Use -P flag to resolve symlinks in directories.
      cd `$THEPWDCMD -P`
      sym_link_dir=`$THEPWDCMD -P`
      # Resolve file symlinks
      while test $COUNTER -lt 20; do
        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
        if test "x$ISLINK" == x; then
          # This is not a symbolic link! We are done!
          break
        fi
        # Again resolve directory symlinks since the target of the just found
        # link could be in a different directory
        cd `$DIRNAME $ISLINK`
        sym_link_dir=`$THEPWDCMD -P`
        sym_link_file=`$BASENAME $ISLINK`
        let COUNTER=COUNTER+1
      done
      cd $STARTDIR
      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
    fi
  fi

    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
$as_echo "$PROPER_COMPILER_CXX" >&6; }
    CXX="$PROPER_COMPILER_CXX"
  else
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
$as_echo "no, keeping CXX" >&6; }
  fi


  COMPILER=$CXX
  COMPILER_NAME=$COMPILER_NAME

  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
    # cc -V output typically looks like
    #     cc: Sun C 5.12 Linux_i386 2011/11/16
    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
    # Check that this is likely to be the Solaris Studio cc.
    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
    if test $? -ne 0; then
      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
    fi
    # Remove usage instructions (if present), and
    # collapse compiler output into a single line
    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
        $SED -e 's/ *[Uu]sage:.*//'`
    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
    # xlc -qversion output typically looks like
    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
    #     Version: 11.01.0000.0015
    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
    # Check that this is likely to be the IBM XL C compiler.
    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
    if test $? -ne 0; then
      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
    fi
    # Collapse compiler output into a single line
    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
    # There is no specific version flag, but all output starts with a version string.
    # First line typically looks something like:
    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
    # Check that this is likely to be Microsoft CL.EXE.
    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
    if test $? -ne 0; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
    fi
    # Collapse compiler output into a single line
    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
    # gcc --version output typically looks like
    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
    #     Copyright (C) 2013 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.
    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
    # Check that this is likely to be GCC.
    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
    if test $? -ne 0; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
    fi
    # Remove Copyright and legalese from version string, and
    # collapse into a single line
    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
        $SED -e 's/ *Copyright .*//'`
    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
    # clang --version output typically looks like
    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
    #    clang version 3.3 (tags/RELEASE_33/final)
    # or
    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
    #    Target: x86_64-pc-linux-gnu
    #    Thread model: posix
    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
    # Check that this is likely to be clang
    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
    if test $? -ne 0; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
    fi
    # Collapse compiler output into a single line
    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
  else
      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
  fi
  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"

  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}


  # Now that we have resolved CXX ourself, let autoconf have its go at it
  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 $CXX
  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 ${ac_cv_prog_CXX+:} false; 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 as_fn_executable_p "$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 $CXX
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 ${ac_cv_prog_ac_ct_CXX+:} false; 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 as_fn_executable_p "$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 ${ac_cv_cxx_compiler_gnu+:} false; 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 ${ac_cv_prog_cxx_g+:} false; 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


  #
  # Setup the preprocessor (CPP and CXXCPP)
  #
  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 ${ac_cv_prog_CPP+:} false; 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


  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$CPP"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$CPP"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$CPP"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    CPP="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
  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 ${ac_cv_prog_CXXCPP+:} false; 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


  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$CXXCPP"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$CXXCPP"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$CXXCPP"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    CXXCPP="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
  fi


  #
  # Setup the linker (LD)
  #
  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
    # In the Microsoft toolchain we have a separate LD command "link".
    # Make sure we reject /usr/bin/link (as determined in CYGWIN_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 ${ac_cv_prog_LD+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$LD"; then
  ac_cv_prog_LD="$LD" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
       ac_prog_rejected=yes
       continue
     fi
    ac_cv_prog_LD="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_LD
  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 LD to just the basename; use the full file name.
    shift
    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
  fi
fi
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



  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$LD"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$LD"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$LD"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    LD="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
  fi

    # Verify that we indeed succeeded with this trick.
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
    "$LD" --version > /dev/null
    if test $? -eq 0 ; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
    fi
    LDCXX="$LD"
  else
    # All other toolchains use the compiler to link.
    LD="$CC"
    LDCXX="$CXX"
  fi

  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)


  #
  # Setup the assembler (AS)
  #
  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
    # FIXME: should this really be solaris, or solstudio?


  # Publish this variable in the help.


  if test "x$AS" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in as
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 ${ac_cv_path_AS+:} false; 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 as_fn_executable_p "$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


  test -n "$AS" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !AS! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xAS" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in as
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 ${ac_cv_path_AS+:} false; 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 as_fn_executable_p "$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


  test -n "$AS" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$AS"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_AS+:} false; 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 as_fn_executable_p "$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


        if test "x$AS" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
$as_echo_n "checking for AS... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$AS"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$AS"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$AS"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    AS="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
  fi

  else
    # FIXME: is this correct for microsoft?
    AS="$CC -c"
  fi


  #
  # Setup the archiver (AR)
  #
  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
    # The corresponding ar tool is lib.exe (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 ${ac_cv_prog_AR+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_AR="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
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


  else


  # Publish this variable in the help.


  if test "x$AR" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    if test -n "$ac_tool_prefix"; then
  for ac_prog in ar
  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 ${ac_cv_prog_AR+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_AR="$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
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


    test -n "$AR" && break
  done
fi
if test -z "$AR"; then
  ac_ct_AR=$AR
  for ac_prog in ar
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 ${ac_cv_prog_ac_ct_AR+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_AR="$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_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


  test -n "$ac_ct_AR" && break
done

  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
fi

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !AR! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xAR" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      if test -n "$ac_tool_prefix"; then
  for ac_prog in ar
  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 ${ac_cv_prog_AR+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_AR="$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
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


    test -n "$AR" && break
  done
fi
if test -z "$AR"; then
  ac_ct_AR=$AR
  for ac_prog in ar
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 ${ac_cv_prog_ac_ct_AR+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_AR="$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_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


  test -n "$ac_ct_AR" && break
done

  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
fi

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$AR"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_AR+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $AR in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_AR="$AR" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_AR="$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
AR=$ac_cv_path_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


        if test "x$AR" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
$as_echo_n "checking for AR... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi


  fi

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$AR"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$AR"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$AR"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    AR="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
  fi



  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; 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 ${ac_cv_prog_OBJC+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_OBJC+:} false; 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 as_fn_executable_p "$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 ${ac_cv_objc_compiler_gnu+:} false; 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 ${ac_cv_prog_objc_g+:} false; 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


  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$OBJC"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$OBJC"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$OBJC"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    OBJC="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
  fi



  # Publish this variable in the help.


  if test "x$LIPO" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in lipo
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 ${ac_cv_path_LIPO+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $LIPO in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_LIPO="$LIPO" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_LIPO="$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
LIPO=$ac_cv_path_LIPO
if test -n "$LIPO"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
$as_echo "$LIPO" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$LIPO" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !LIPO! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xLIPO" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in lipo
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 ${ac_cv_path_LIPO+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $LIPO in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_LIPO="$LIPO" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_LIPO="$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
LIPO=$ac_cv_path_LIPO
if test -n "$LIPO"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
$as_echo "$LIPO" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$LIPO" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$LIPO"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_LIPO+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $LIPO in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_LIPO="$LIPO" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_LIPO="$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
LIPO=$ac_cv_path_LIPO
if test -n "$LIPO"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
$as_echo "$LIPO" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$LIPO" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
$as_echo_n "checking for LIPO... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$LIPO"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$LIPO"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$LIPO"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    LIPO="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
  fi

  else
    OBJC=
  fi

  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
    # 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 ${ac_cv_prog_MT+:} false; 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 as_fn_executable_p "$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



  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$MT"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$MT"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$MT"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    MT="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
  fi

    # Setup the resource compiler (RC)
    # 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 ${ac_cv_prog_RC+:} false; 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 as_fn_executable_p "$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



  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$RC"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$RC"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$RC"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    RC="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
  fi

    # 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 ${ac_cv_prog_DUMPBIN+:} false; 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 as_fn_executable_p "$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



  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$DUMPBIN"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$DUMPBIN"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$DUMPBIN"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    DUMPBIN="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
  fi

    # We need to check for 'msbuild.exe' because at the place where we expect to
    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
    # won't find the 'msbuild.exe' executable in that case (and the
    # 'ac_executable_extensions' is unusable due to performance reasons).
    # Notice that we intentionally don't fix up the path to MSBUILD because we
    # will call it in a DOS shell during freetype detection on Windows (see
    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
    # Extract the first word of "msbuild.exe", so it can be a program name with args.
set dummy msbuild.exe; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_MSBUILD+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$MSBUILD"; then
  ac_cv_prog_MSBUILD="$MSBUILD" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_MSBUILD="msbuild.exe"
    $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
MSBUILD=$ac_cv_prog_MSBUILD
if test -n "$MSBUILD"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
$as_echo "$MSBUILD" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  fi

  if test "x$OPENJDK_TARGET_OS" = xsolaris; then


  # Publish this variable in the help.


  if test "x$STRIP" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in strip
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 ${ac_cv_path_STRIP+:} false; 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 as_fn_executable_p "$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


  test -n "$STRIP" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !STRIP! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xSTRIP" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in strip
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 ${ac_cv_path_STRIP+:} false; 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 as_fn_executable_p "$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


  test -n "$STRIP" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$STRIP"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_STRIP+:} false; 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 as_fn_executable_p "$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


        if test "x$STRIP" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
$as_echo_n "checking for STRIP... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$STRIP"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$STRIP"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$STRIP"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    STRIP="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
  fi



  # Publish this variable in the help.


  if test "x$NM" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in nm
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 ${ac_cv_path_NM+:} false; 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 as_fn_executable_p "$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


  test -n "$NM" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !NM! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xNM" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in nm
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 ${ac_cv_path_NM+:} false; 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 as_fn_executable_p "$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


  test -n "$NM" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$NM"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_NM+:} false; 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 as_fn_executable_p "$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


        if test "x$NM" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
$as_echo_n "checking for NM... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$NM"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$NM"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$NM"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    NM="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
  fi



  # Publish this variable in the help.


  if test "x$GNM" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in gnm
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 ${ac_cv_path_GNM+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $GNM in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_GNM="$GNM" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_GNM="$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
GNM=$ac_cv_path_GNM
if test -n "$GNM"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
$as_echo "$GNM" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$GNM" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !GNM! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xGNM" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in gnm
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 ${ac_cv_path_GNM+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $GNM in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_GNM="$GNM" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_GNM="$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
GNM=$ac_cv_path_GNM
if test -n "$GNM"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
$as_echo "$GNM" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$GNM" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$GNM"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_GNM+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $GNM in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_GNM="$GNM" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_GNM="$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
GNM=$ac_cv_path_GNM
if test -n "$GNM"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
$as_echo "$GNM" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$GNM" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
$as_echo_n "checking for GNM... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$GNM"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$GNM"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$GNM"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    GNM="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
  fi




  # Publish this variable in the help.


  if test "x$MCS" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in mcs
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 ${ac_cv_path_MCS+:} false; 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 as_fn_executable_p "$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


  test -n "$MCS" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !MCS! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xMCS" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in mcs
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 ${ac_cv_path_MCS+:} false; 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 as_fn_executable_p "$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


  test -n "$MCS" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$MCS"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_MCS+:} false; 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 as_fn_executable_p "$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


        if test "x$MCS" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
$as_echo_n "checking for MCS... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$MCS"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$MCS"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$MCS"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    MCS="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
  fi

  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
    # FIXME: we should unify this with the solaris case above.


  # Publish this variable in the help.


  if test "x$STRIP" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    if test -n "$ac_tool_prefix"; then
  for ac_prog in strip
  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 ${ac_cv_prog_STRIP+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_STRIP="$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
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


    test -n "$STRIP" && break
  done
fi
if test -z "$STRIP"; then
  ac_ct_STRIP=$STRIP
  for ac_prog in strip
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 ${ac_cv_prog_ac_ct_STRIP+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_STRIP="$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_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


  test -n "$ac_ct_STRIP" && break
done

  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
fi

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !STRIP! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xSTRIP" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      if test -n "$ac_tool_prefix"; then
  for ac_prog in strip
  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 ${ac_cv_prog_STRIP+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_STRIP="$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
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


    test -n "$STRIP" && break
  done
fi
if test -z "$STRIP"; then
  ac_ct_STRIP=$STRIP
  for ac_prog in strip
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 ${ac_cv_prog_ac_ct_STRIP+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_STRIP="$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_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


  test -n "$ac_ct_STRIP" && break
done

  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
fi

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$STRIP"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_STRIP+:} false; 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 as_fn_executable_p "$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


        if test "x$STRIP" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
$as_echo_n "checking for STRIP... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$STRIP"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$STRIP"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$STRIP"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    STRIP="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
  fi



  # Publish this variable in the help.


  if test "x$NM" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    if test -n "$ac_tool_prefix"; then
  for ac_prog in nm
  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 ${ac_cv_prog_NM+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_NM="$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
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


    test -n "$NM" && break
  done
fi
if test -z "$NM"; then
  ac_ct_NM=$NM
  for ac_prog in nm
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 ${ac_cv_prog_ac_ct_NM+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_NM="$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_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


  test -n "$ac_ct_NM" && break
done

  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
fi

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !NM! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xNM" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      if test -n "$ac_tool_prefix"; then
  for ac_prog in nm
  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 ${ac_cv_prog_NM+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_NM="$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
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


    test -n "$NM" && break
  done
fi
if test -z "$NM"; then
  ac_ct_NM=$NM
  for ac_prog in nm
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 ${ac_cv_prog_ac_ct_NM+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_NM="$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_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


  test -n "$ac_ct_NM" && break
done

  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
fi

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$NM"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_NM+:} false; 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 as_fn_executable_p "$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


        if test "x$NM" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
$as_echo_n "checking for NM... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$NM"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$NM"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$NM"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    NM="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
  fi

    GNM="$NM"

  fi

  # objcopy is used for moving debug symbols to separate files when
  # full debug symbols are enabled.
  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then


  # Publish this variable in the help.


  if test "x$OBJCOPY" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    if test -n "$ac_tool_prefix"; then
  for ac_prog in gobjcopy objcopy
  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 ${ac_cv_prog_OBJCOPY+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$OBJCOPY"; then
  ac_cv_prog_OBJCOPY="$OBJCOPY" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_OBJCOPY="$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
OBJCOPY=$ac_cv_prog_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


    test -n "$OBJCOPY" && break
  done
fi
if test -z "$OBJCOPY"; then
  ac_ct_OBJCOPY=$OBJCOPY
  for ac_prog in gobjcopy objcopy
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 ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$ac_ct_OBJCOPY"; then
  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_OBJCOPY="$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_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
if test -n "$ac_ct_OBJCOPY"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
$as_echo "$ac_ct_OBJCOPY" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$ac_ct_OBJCOPY" && break
done

  if test "x$ac_ct_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_ct_OBJCOPY
  fi
fi

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !OBJCOPY! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xOBJCOPY" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      if test -n "$ac_tool_prefix"; then
  for ac_prog in gobjcopy objcopy
  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 ${ac_cv_prog_OBJCOPY+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$OBJCOPY"; then
  ac_cv_prog_OBJCOPY="$OBJCOPY" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_OBJCOPY="$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
OBJCOPY=$ac_cv_prog_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


    test -n "$OBJCOPY" && break
  done
fi
if test -z "$OBJCOPY"; then
  ac_ct_OBJCOPY=$OBJCOPY
  for ac_prog in gobjcopy objcopy
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 ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$ac_ct_OBJCOPY"; then
  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_OBJCOPY="$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_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
if test -n "$ac_ct_OBJCOPY"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
$as_echo "$ac_ct_OBJCOPY" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$ac_ct_OBJCOPY" && break
done

  if test "x$ac_ct_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_ct_OBJCOPY
  fi
fi

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$OBJCOPY"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_OBJCOPY+:} false; 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 as_fn_executable_p "$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


        if test "x$OBJCOPY" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
$as_echo_n "checking for OBJCOPY... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi


    # Only call fixup if objcopy was found.
    if test -n "$OBJCOPY"; then

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$OBJCOPY"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$OBJCOPY"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$OBJCOPY"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    OBJCOPY="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
  fi

    fi
  fi



  # Publish this variable in the help.


  if test "x$OBJDUMP" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    if test -n "$ac_tool_prefix"; then
  for ac_prog in gobjdump objdump
  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 ${ac_cv_prog_OBJDUMP+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$OBJDUMP"; then
  ac_cv_prog_OBJDUMP="$OBJDUMP" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_OBJDUMP="$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
OBJDUMP=$ac_cv_prog_OBJDUMP
if test -n "$OBJDUMP"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
$as_echo "$OBJDUMP" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


    test -n "$OBJDUMP" && break
  done
fi
if test -z "$OBJDUMP"; then
  ac_ct_OBJDUMP=$OBJDUMP
  for ac_prog in gobjdump objdump
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 ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$ac_ct_OBJDUMP"; then
  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_OBJDUMP="$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_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
if test -n "$ac_ct_OBJDUMP"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
$as_echo "$ac_ct_OBJDUMP" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$ac_ct_OBJDUMP" && break
done

  if test "x$ac_ct_OBJDUMP" = x; then
    OBJDUMP=""
  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
    OBJDUMP=$ac_ct_OBJDUMP
  fi
fi

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !OBJDUMP! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xOBJDUMP" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      if test -n "$ac_tool_prefix"; then
  for ac_prog in gobjdump objdump
  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 ${ac_cv_prog_OBJDUMP+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$OBJDUMP"; then
  ac_cv_prog_OBJDUMP="$OBJDUMP" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_OBJDUMP="$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
OBJDUMP=$ac_cv_prog_OBJDUMP
if test -n "$OBJDUMP"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
$as_echo "$OBJDUMP" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


    test -n "$OBJDUMP" && break
  done
fi
if test -z "$OBJDUMP"; then
  ac_ct_OBJDUMP=$OBJDUMP
  for ac_prog in gobjdump objdump
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 ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$ac_ct_OBJDUMP"; then
  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_OBJDUMP="$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_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
if test -n "$ac_ct_OBJDUMP"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
$as_echo "$ac_ct_OBJDUMP" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$ac_ct_OBJDUMP" && break
done

  if test "x$ac_ct_OBJDUMP" = x; then
    OBJDUMP=""
  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
    OBJDUMP=$ac_ct_OBJDUMP
  fi
fi

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$OBJDUMP"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_OBJDUMP+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $OBJDUMP in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
OBJDUMP=$ac_cv_path_OBJDUMP
if test -n "$OBJDUMP"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
$as_echo "$OBJDUMP" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$OBJDUMP" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
$as_echo_n "checking for OBJDUMP... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi


  if test "x$OBJDUMP" != x; then
    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
    # bails if argument is missing.

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$OBJDUMP"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$OBJDUMP"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$OBJDUMP"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    OBJDUMP="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
  fi

  fi


  # Restore old path.
  PATH="$OLD_PATH"

  # 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"


# Finally do some processing after the detection phase

  if test "x$COMPILE_TYPE" = "xcross"; then
    # Now we need 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. Also, we need to do this without adding a tools dir to the
    # path, otherwise we might pick up cross-compilers which don't use standard
    # naming.

    # FIXME: we should list the discovered compilers as an exclude pattern!
    # If we do that, we can do this detection before POST_DETECTION, and still
    # find the build compilers in the tools dir, if needed.


  # Publish this variable in the help.


  if test "x$BUILD_CC" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    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 ${ac_cv_path_BUILD_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $BUILD_CC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_BUILD_CC="$BUILD_CC" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_BUILD_CC="$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
BUILD_CC=$ac_cv_path_BUILD_CC
if test -n "$BUILD_CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
$as_echo "$BUILD_CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$BUILD_CC" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !BUILD_CC! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xBUILD_CC" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      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 ${ac_cv_path_BUILD_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $BUILD_CC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_BUILD_CC="$BUILD_CC" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_BUILD_CC="$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
BUILD_CC=$ac_cv_path_BUILD_CC
if test -n "$BUILD_CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
$as_echo "$BUILD_CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$BUILD_CC" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$BUILD_CC"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_BUILD_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $BUILD_CC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_BUILD_CC="$BUILD_CC" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_BUILD_CC="$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
BUILD_CC=$ac_cv_path_BUILD_CC
if test -n "$BUILD_CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
$as_echo "$BUILD_CC" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$BUILD_CC" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
$as_echo_n "checking for BUILD_CC... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$BUILD_CC"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$BUILD_CC"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$BUILD_CC"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    BUILD_CC="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
  fi



  # Publish this variable in the help.


  if test "x$BUILD_CXX" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    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 ${ac_cv_path_BUILD_CXX+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $BUILD_CXX in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_BUILD_CXX="$BUILD_CXX" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_BUILD_CXX="$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
BUILD_CXX=$ac_cv_path_BUILD_CXX
if test -n "$BUILD_CXX"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
$as_echo "$BUILD_CXX" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$BUILD_CXX" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !BUILD_CXX! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xBUILD_CXX" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      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 ${ac_cv_path_BUILD_CXX+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $BUILD_CXX in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_BUILD_CXX="$BUILD_CXX" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_BUILD_CXX="$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
BUILD_CXX=$ac_cv_path_BUILD_CXX
if test -n "$BUILD_CXX"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
$as_echo "$BUILD_CXX" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$BUILD_CXX" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$BUILD_CXX"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_BUILD_CXX+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $BUILD_CXX in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_BUILD_CXX="$BUILD_CXX" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_BUILD_CXX="$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
BUILD_CXX=$ac_cv_path_BUILD_CXX
if test -n "$BUILD_CXX"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
$as_echo "$BUILD_CXX" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$BUILD_CXX" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
$as_echo_n "checking for BUILD_CXX... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$BUILD_CXX"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$BUILD_CXX"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$BUILD_CXX"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    BUILD_CXX="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
  fi



  # Publish this variable in the help.


  if test "x$BUILD_LD" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in ld
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 ${ac_cv_path_BUILD_LD+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $BUILD_LD in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_BUILD_LD="$BUILD_LD" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_BUILD_LD="$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
BUILD_LD=$ac_cv_path_BUILD_LD
if test -n "$BUILD_LD"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
$as_echo "$BUILD_LD" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$BUILD_LD" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !BUILD_LD! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xBUILD_LD" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in ld
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 ${ac_cv_path_BUILD_LD+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $BUILD_LD in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_BUILD_LD="$BUILD_LD" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_BUILD_LD="$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
BUILD_LD=$ac_cv_path_BUILD_LD
if test -n "$BUILD_LD"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
$as_echo "$BUILD_LD" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$BUILD_LD" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$BUILD_LD"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_BUILD_LD+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $BUILD_LD in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_BUILD_LD="$BUILD_LD" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_BUILD_LD="$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
BUILD_LD=$ac_cv_path_BUILD_LD
if test -n "$BUILD_LD"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
$as_echo "$BUILD_LD" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$BUILD_LD" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
$as_echo_n "checking for BUILD_LD... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$BUILD_LD"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path=`$CYGPATH -u "$path"`

  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`
  # bat and cmd files are not always considered executable in cygwin causing which
  # to not find them
  if test "x$new_path" = x \
      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    new_path=`$CYGPATH -u "$path"`
  fi
  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path=`$CYGPATH -u "$path"`
    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in cygwin causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path=`$CYGPATH -u "$path"`
    fi
    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
    fi
  fi

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file presence.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    # Short path failed, file does not exist as specified.
    # Try adding .exe or .cmd
    if test -f "${new_path}.exe"; then
      input_to_shortpath="${new_path}.exe"
    elif test -f "${new_path}.cmd"; then
      input_to_shortpath="${new_path}.cmd"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
    fi
  else
    input_to_shortpath="$new_path"
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.
  new_path="$input_to_shortpath"

  input_path="$input_to_shortpath"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi

  # remove trailing .exe if any
  new_path="${new_path/%.exe/}"

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  # First separate the path from the arguments. This will split at the first
  # space.
  complete="$BUILD_LD"
  path="${complete%% *}"
  tmp="$complete EOL"
  arguments="${tmp#* }"

  # Input might be given as Windows format, start by converting to
  # unix format.
  new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


  # Now try to locate executable using which
  new_path=`$WHICH "$new_path" 2> /dev/null`

  if test "x$new_path" = x; then
    # Oops. Which didn't find the executable.
    # The splitting of arguments from the executable at a space might have been incorrect,
    # since paths with space are more likely in Windows. Give it another try with the whole
    # argument.
    path="$complete"
    arguments="EOL"
    new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi


    new_path=`$WHICH "$new_path" 2> /dev/null`
    # bat and cmd files are not always considered executable in MSYS causing which
    # to not find them
    if test "x$new_path" = x \
        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
      new_path="$path"

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    fi

    if test "x$new_path" = x; then
      # It's still not found. Now this is an unrecoverable error.
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
    fi
  fi

  # Now new_path has a complete unix path to the binary
  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
    # Keep paths in /bin as-is, but remove trailing .exe if any
    new_path="${new_path/%.exe/}"
    # Do not save /bin paths to all_fixpath_prefixes!
  else
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $new_path`

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi

    # Output is in $new_path

  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

    # remove trailing .exe if any
    new_path="${new_path/%.exe/}"

    # Save the first 10 bytes of this path to the storage, so fixpath can work.
    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  fi

  else
    # We're on a posix platform. Hooray! :)
    # First separate the path from the arguments. This will split at the first
    # space.
    complete="$BUILD_LD"
    path="${complete%% *}"
    tmp="$complete EOL"
    arguments="${tmp#* }"

    # Cannot rely on the command "which" here since it doesn't always work.
    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    if test -z "$is_absolute_path"; then
      # Path to executable is not absolute. Find it.
      IFS_save="$IFS"
      IFS=:
      for p in $PATH; do
        if test -f "$p/$path" && test -x "$p/$path"; then
          new_path="$p/$path"
          break
        fi
      done
      IFS="$IFS_save"
    else
      # This is an absolute path, we can use it without further modifications.
      new_path="$path"
    fi

    if test "x$new_path" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
      has_space=`$ECHO "$complete" | $GREP " "`
      if test "x$has_space" != x; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
      fi
      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
    fi
  fi

  # Now join together the path and the arguments once again
  if test "x$arguments" != xEOL; then
    new_complete="$new_path ${arguments% *}"
  else
    new_complete="$new_path"
  fi

  if test "x$complete" != "x$new_complete"; then
    BUILD_LD="$new_complete"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
  fi

  else
    # If we are not cross compiling, use the normal target compilers for
    # building the build platform executables.
    BUILD_CC="$CC"
    BUILD_CXX="$CXX"
    BUILD_LD="$LD"
  fi






  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
    # For hotspot, we need these in Windows mixed path,
    # so rewrite them all. Need added .exe suffix.
    HOTSPOT_CXX="$CXX.exe"
    HOTSPOT_LD="$LD.exe"
    HOTSPOT_MT="$MT.exe"
    HOTSPOT_RC="$RC.exe"

  unix_path="$HOTSPOT_CXX"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    windows_path=`$CYGPATH -m "$unix_path"`
    HOTSPOT_CXX="$windows_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    windows_path=`cmd //c echo $unix_path`
    HOTSPOT_CXX="$windows_path"
  fi


  unix_path="$HOTSPOT_LD"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    windows_path=`$CYGPATH -m "$unix_path"`
    HOTSPOT_LD="$windows_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    windows_path=`cmd //c echo $unix_path`
    HOTSPOT_LD="$windows_path"
  fi


  unix_path="$HOTSPOT_MT"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    windows_path=`$CYGPATH -m "$unix_path"`
    HOTSPOT_MT="$windows_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    windows_path=`cmd //c echo $unix_path`
    HOTSPOT_MT="$windows_path"
  fi


  unix_path="$HOTSPOT_RC"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    windows_path=`$CYGPATH -m "$unix_path"`
    HOTSPOT_RC="$windows_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    windows_path=`cmd //c echo $unix_path`
    HOTSPOT_RC="$windows_path"
  fi



  else
    HOTSPOT_CXX="$CXX"
    HOTSPOT_LD="$LD"
  fi



  if test  "x$TOOLCHAIN_TYPE" = xclang; then
    USE_CLANG=true
  fi


  # LDEXE is the linker to use, when creating executables. Not really used.
  # FIXME: These should just be removed!
  LDEXE="$LD"
  LDEXECXX="$LDCXX"






  # The package path is used only on macosx?
  # FIXME: clean this up, and/or move it elsewhere.
  PACKAGE_PATH=/opt/local


  # Check for extra potential brokenness.
  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
    # On Windows, double-check that we got the right compiler.
    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
      fi
    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
      if test "x$COMPILER_CPU_TEST" != "xx64"; then
        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
      fi
    fi
  fi

  if test "x$TOOLCHAIN_TYPE" = xgcc; then
    # 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'`
    # This is later checked when setting flags.

    # "-Og" suppported for GCC 4.8 and later
    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"

  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
  supports=yes

  saved_cflags="$CFLAGS"
  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
  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

  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int i;
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  supports=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  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

  CFLAGS="$saved_cflags"

  saved_cxxflags="$CXXFLAGS"
  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
  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

  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int i;
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :

else
  supports=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  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

  CXXFLAGS="$saved_cxxflags"

  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
$as_echo "$supports" >&6; }
  if test "x$supports" = "xyes" ; then
    HAS_CFLAG_OPTIMIZE_DEBUG=true
  else
    HAS_CFLAG_OPTIMIZE_DEBUG=false
  fi


    # "-fsanitize=undefined" supported for GCC 4.9 and later
    CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG="-fsanitize=undefined -fsanitize-recover"

  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"" >&5
$as_echo_n "checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"... " >&6; }
  supports=yes

  saved_cflags="$CFLAGS"
  CFLAGS="$CFLAGS $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
  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

  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int i;
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  supports=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  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

  CFLAGS="$saved_cflags"

  saved_cxxflags="$CXXFLAGS"
  CXXFLAGS="$CXXFLAG $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
  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

  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int i;
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :

else
  supports=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  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

  CXXFLAGS="$saved_cxxflags"

  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
$as_echo "$supports" >&6; }
  if test "x$supports" = "xyes" ; then
    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=true
  else
    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=false
  fi


    # "-z relro" supported in GNU binutils 2.17 and later
    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"

  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
  supports=yes

  saved_ldflags="$LDFLAGS"
  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
  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

  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :

else
  supports=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
  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

  LDFLAGS="$saved_ldflags"

  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
$as_echo "$supports" >&6; }
  if test "x$supports" = "xyes" ; then
    HAS_LINKER_RELRO=true
  else
    HAS_LINKER_RELRO=false
  fi


    # "-z now" supported in GNU binutils 2.11 and later
    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"

  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
  supports=yes

  saved_ldflags="$LDFLAGS"
  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
  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

  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :

else
  supports=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
  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

  LDFLAGS="$saved_ldflags"

  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
$as_echo "$supports" >&6; }
  if test "x$supports" = "xyes" ; then
    HAS_LINKER_NOW=true
  else
    HAS_LINKER_NOW=false
  fi

  fi

  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
  # in executable.'
  USING_BROKEN_SUSE_LD=no
  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
    $ECHO "int main() { }" > main.c
    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
      USING_BROKEN_SUSE_LD=no
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
      USING_BROKEN_SUSE_LD=yes
    fi
    rm -rf version-script.map main.c a.out
  fi



# Setup the JTReg Regression Test Harness.


# Check whether --with-jtreg was given.
if test "${with_jtreg+set}" = set; then :
  withval=$with_jtreg;
else
  with_jtreg=no
fi


  if test "x$with_jtreg" = xno; then
    # jtreg disabled
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
$as_echo_n "checking for jtreg... " >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
  else
    if test "x$with_jtreg" != xyes; then
      # with path specified.
      JT_HOME="$with_jtreg"
    fi

    if test "x$JT_HOME" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
$as_echo_n "checking for jtreg... " >&6; }

      # use JT_HOME enviroment var.

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$JT_HOME"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    JT_HOME="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$JT_HOME"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    JT_HOME="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$JT_HOME"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
  fi


      # jtreg win32 script works for everybody
      JTREGEXE="$JT_HOME/win32/bin/jtreg"

      if test ! -f "$JTREGEXE"; then
        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
      fi

      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
$as_echo "$JTREGEXE" >&6; }
    else
      # try to find jtreg on path



  # Publish this variable in the help.


  if test "x$JTREGEXE" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in jtreg
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 ${ac_cv_path_JTREGEXE+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $JTREGEXE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JTREGEXE="$JTREGEXE" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_JTREGEXE="$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
JTREGEXE=$ac_cv_path_JTREGEXE
if test -n "$JTREGEXE"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
$as_echo "$JTREGEXE" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$JTREGEXE" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !JTREGEXE! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xJTREGEXE" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in jtreg
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 ${ac_cv_path_JTREGEXE+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $JTREGEXE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JTREGEXE="$JTREGEXE" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_JTREGEXE="$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
JTREGEXE=$ac_cv_path_JTREGEXE
if test -n "$JTREGEXE"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
$as_echo "$JTREGEXE" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


  test -n "$JTREGEXE" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$JTREGEXE"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_JTREGEXE+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $JTREGEXE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JTREGEXE="$JTREGEXE" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_JTREGEXE="$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
JTREGEXE=$ac_cv_path_JTREGEXE
if test -n "$JTREGEXE"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
$as_echo "$JTREGEXE" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


        if test "x$JTREGEXE" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
$as_echo_n "checking for JTREGEXE... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$JTREGEXE" = x; then
    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
  fi


      JT_HOME="`$DIRNAME $JTREGEXE`"
    fi
  fi






  # Option used to tell the compiler whether to create 32- or 64-bit executables
  if test "x$TOOLCHAIN_TYPE" = xxlc; then
    COMPILER_TARGET_BITS_FLAG="-q"
  else
    COMPILER_TARGET_BITS_FLAG="-m"
  fi


  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
    ARFLAGS="-r"
  elif test "x$OPENJDK_TARGET_OS" = xaix; then
    ARFLAGS="-X64"
  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
    # lib.exe is used as AR to create static libraries.
    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
  else
    ARFLAGS=""
  fi


  ## Setup strip.
  # FIXME: should this really be per platform, or should it be per toolchain type?
  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
  if test "x$OPENJDK_TARGET_OS" = xlinux; then
    STRIPFLAGS="-g"
  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
    STRIPFLAGS="-x"
  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
    STRIPFLAGS="-S"
  elif test "x$OPENJDK_TARGET_OS" = xaix; then
    STRIPFLAGS="-X32_64"
  fi

  if test "x$OPENJDK_TARGET_OS" != xwindows; then
    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
  fi


  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
    # FIXME: break out into MCSFLAGS
    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
  fi


  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
    CC_OUT_OPTION=-Fo
    EXE_OUT_OPTION=-out:
    LD_OUT_OPTION=-out:
    AR_OUT_OPTION=-out:
  else
    # 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)'
  fi





  # On Windows, we need to set RC flags.
  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
    RC_FLAGS="-nologo -l 0x409 -r"
    if test "x$VARIANT" = xOPT; then
      RC_FLAGS="$RC_FLAGS -d NDEBUG"
    fi

    # The version variables used to create RC_FLAGS may be overridden
    # in a custom configure script, or possibly the command line.
    # Let those variables be expanded at make time in spec.gmk.
    # The \$ are escaped to the shell, and the $(...) variables
    # are evaluated by make.
    RC_FLAGS="$RC_FLAGS \
        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
  fi


  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
    # silence copyright notice and other headers.
    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
  fi

  if test "x$SYSROOT" != "x"; then
    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
        # Solaris Studio does not have a concept of sysroot. Instead we must
        # make sure the default include and lib dirs are appended to each
        # compile and link command line.
        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
      fi
    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
    elif test "x$TOOLCHAIN_TYPE" = xclang; then
      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
    fi
    # Propagate the sysroot args to hotspot
    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
  fi

  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
  # set this here so it doesn't have to be peppered throughout the forest
  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
  fi





# FIXME: Currently we must test this after toolchain but before flags. Fix!

# Now 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 ${ac_cv_header_stdc+:} false; 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.)
  #

  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
    # Always specify -m flag on Solaris
    # And -q on AIX because otherwise the compiler produces 32-bit objects by default

  # When we add flags to the "official" CFLAGS etc, we need to
  # keep track of these additions in ADDED_CFLAGS etc. These
  # will later be checked to make sure only controlled additions
  # have been made to CFLAGS etc.
  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_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}"

  elif test "x$COMPILE_TYPE" = xreduced; then
    if test "x$OPENJDK_TARGET_OS" != xwindows; then
      # Specify -m if running reduced on other Posix platforms

  # When we add flags to the "official" CFLAGS etc, we need to
  # keep track of these additions in ADDED_CFLAGS etc. These
  # will later be checked to make sure only controlled additions
  # have been made to CFLAGS etc.
  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_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

  # Make compilation sanity check
  for ac_header in stdio.h
do :
  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
if test "x$ac_cv_header_stdio_h" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_STDIO_H 1
_ACEOF

else

    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
    if test "x$COMPILE_TYPE" = xreduced; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
    elif test "x$COMPILE_TYPE" = xcross; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
    fi
    as_fn_error $? "Cannot continue." "$LINENO" 5

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 ${ac_cv_sizeof_int_p+:} false; 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



  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
  if test "x$ac_cv_sizeof_int_p" = x; then
    # The test failed, lets stick to the assumed value.
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&5
$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
  else
    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`

    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
      # Let's try to implicitely set the compilers target architecture and retry the test
      { $as_echo "$as_me:${as_lineno-$LINENO}: The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)." >&5
$as_echo "$as_me: The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)." >&6;}
      { $as_echo "$as_me:${as_lineno-$LINENO}: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
$as_echo "$as_me: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}

  # When we add flags to the "official" CFLAGS etc, we need to
  # keep track of these additions in ADDED_CFLAGS etc. These
  # will later be checked to make sure only controlled additions
  # have been made to CFLAGS etc.
  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_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}"


      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
      unset ac_cv_sizeof_int_p
      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
      cat >>confdefs.h <<_ACEOF
#undef SIZEOF_INT_P
_ACEOF

      # 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 ${ac_cv_sizeof_int_p+:} false; 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



      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`

      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
        as_fn_error $? "The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)" "$LINENO" 5
      fi
    fi
  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: $OPENJDK_TARGET_CPU_BITS bits" >&5
$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }


  ###############################################################################
  #
  # 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 ${ac_cv_c_bigendian+:} false; 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" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
    as_fn_error $? "The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)" "$LINENO" 5
  fi


# Configure flags for the tools

  ###############################################################################
  #
  # How to compile shared libraries.
  #

  if test "x$TOOLCHAIN_TYPE" = xgcc; then
    PICFLAG="-fPIC"
    C_FLAG_REORDER=''
    CXX_FLAG_REORDER=''

    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
      # Linking is different on MacOSX
      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
      SET_SHARED_LIBRARY_MAPFILE=''
    else
      # Default works for linux, might work on other platforms as well.
      SHARED_LIBRARY_FLAGS='-shared'
      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
    fi
  elif test "x$TOOLCHAIN_TYPE" = xclang; then
    PICFLAG=''
    C_FLAG_REORDER=''
    CXX_FLAG_REORDER=''

    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
      # Linking is different on MacOSX
      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
      SET_SHARED_LIBRARY_MAPFILE=''
    else
      # Default works for linux, might work on other platforms as well.
      SHARED_LIBRARY_FLAGS='-shared'
      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
    fi
  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
    PICFLAG="-KPIC"
    C_FLAG_REORDER='-xF'
    CXX_FLAG_REORDER='-xF'
    SHARED_LIBRARY_FLAGS="-G"
    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
    SET_SHARED_LIBRARY_NAME=''
    SET_SHARED_LIBRARY_MAPFILE='-M$1'
  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
    PICFLAG="-qpic=large"
    C_FLAG_REORDER=''
    CXX_FLAG_REORDER=''
    SHARED_LIBRARY_FLAGS="-qmkshrobj"
    SET_EXECUTABLE_ORIGIN=""
    SET_SHARED_LIBRARY_ORIGIN=''
    SET_SHARED_LIBRARY_NAME=''
    SET_SHARED_LIBRARY_MAPFILE=''
  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
    PICFLAG=""
    C_FLAG_REORDER=''
    CXX_FLAG_REORDER=''
    SHARED_LIBRARY_FLAGS="-LD"
    SET_EXECUTABLE_ORIGIN=''
    SET_SHARED_LIBRARY_ORIGIN=''
    SET_SHARED_LIBRARY_NAME=''
    SET_SHARED_LIBRARY_MAPFILE=''
  fi









  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
    CFLAGS_JDKLIB_EXTRA='-xstrconst'
  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.
  #

  # FIXME: this was indirectly the old default, but just inherited.
  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
  #   C_FLAG_DEPS="-MMD -MF"
  # fi

  # Generate make dependency files
  if test "x$TOOLCHAIN_TYPE" = xgcc; then
    C_FLAG_DEPS="-MMD -MF"
  elif test "x$TOOLCHAIN_TYPE" = xclang; then
    C_FLAG_DEPS="-MMD -MF"
  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
    C_FLAG_DEPS="-xMMD -xMF"
  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
    C_FLAG_DEPS="-qmakedep=gcc -MF"
  fi
  CXX_FLAG_DEPS="$C_FLAG_DEPS"



  # Debug symbols
  if test "x$TOOLCHAIN_TYPE" = xgcc; then
    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
      # reduce from default "-g2" option to save space
      CFLAGS_DEBUG_SYMBOLS="-g1"
      CXXFLAGS_DEBUG_SYMBOLS="-g1"
    else
      CFLAGS_DEBUG_SYMBOLS="-g"
      CXXFLAGS_DEBUG_SYMBOLS="-g"
    fi
  elif test "x$TOOLCHAIN_TYPE" = xclang; then
    CFLAGS_DEBUG_SYMBOLS="-g"
    CXXFLAGS_DEBUG_SYMBOLS="-g"
  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
    CFLAGS_DEBUG_SYMBOLS="-g -xs"
    # FIXME: likely a bug, this disables debug symbols rather than enables them
    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
    CFLAGS_DEBUG_SYMBOLS="-g"
    CXXFLAGS_DEBUG_SYMBOLS="-g"
  fi



  # bounds, memory and behavior checking options
  if test "x$TOOLCHAIN_TYPE" = xgcc; then
    case $DEBUG_LEVEL in
    release )
      # no adjustment
      ;;
    fastdebug )
      # no adjustment
      ;;
    slowdebug )
      # Add runtime stack smashing and undefined behavior checks
      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
      if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
        CFLAGS_DEBUG_OPTIONS="$CFLAGS_DEBUG_OPTIONS  $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
        CXXFLAGS_DEBUG_OPTIONS="$CXXFLAGS_DEBUG_OPTIONS $CFLAG_DETECT_UNDEFINED_BEHAVIsOR_FLAG"
      fi
      ;;
    esac
  fi



  # Optimization levels
  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"

    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
      C_O_FLAG_DEBUG="-xregs=no%frameptr"
      C_O_FLAG_NONE="-xregs=no%frameptr"
      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
      CXX_O_FLAG_NONE="-xregs=no%frameptr"
      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
      fi
    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -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_DEBUG=""
      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"
      C_O_FLAG_DEBUG=""
      CXX_O_FLAG_NONE=""
    fi
  else
    # The remaining toolchains share opt flags between CC and CXX;
    # setup for C and duplicate afterwards.
    if test "x$TOOLCHAIN_TYPE" = xgcc; then
      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
        # On MacOSX we optimize for size, something
        # we should do for all platforms?
        C_O_FLAG_HIGHEST="-Os"
        C_O_FLAG_HI="-Os"
        C_O_FLAG_NORM="-Os"
      else
        C_O_FLAG_HIGHEST="-O3"
        C_O_FLAG_HI="-O3"
        C_O_FLAG_NORM="-O2"
      fi
      C_O_FLAG_DEBUG="-O0"
      C_O_FLAG_NONE="-O0"
    elif test "x$TOOLCHAIN_TYPE" = xclang; then
      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
        # On MacOSX we optimize for size, something
        # we should do for all platforms?
        C_O_FLAG_HIGHEST="-Os"
        C_O_FLAG_HI="-Os"
        C_O_FLAG_NORM="-Os"
      else
        C_O_FLAG_HIGHEST="-O3"
        C_O_FLAG_HI="-O3"
        C_O_FLAG_NORM="-O2"
      fi
      C_O_FLAG_DEBUG="-O0"
      C_O_FLAG_NONE="-O0"
    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
      C_O_FLAG_HIGHEST="-O3"
      C_O_FLAG_HI="-O3 -qstrict"
      C_O_FLAG_NORM="-O2"
      C_O_FLAG_DEBUG="-qnoopt"
      C_O_FLAG_NONE="-qnoop"
    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
      C_O_FLAG_HIGHEST="-O2"
      C_O_FLAG_HI="-O1"
      C_O_FLAG_NORM="-O1"
      C_O_FLAG_DEBUG="-Od"
      C_O_FLAG_NONE="-Od"
    fi
    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
    CXX_O_FLAG_HI="$C_O_FLAG_HI"
    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
  fi

  # Adjust optimization flags according to debug level.
  case $DEBUG_LEVEL in
    release )
      # no adjustment
      ;;
    fastdebug )
      # Not quite so much optimization
      C_O_FLAG_HI="$C_O_FLAG_NORM"
      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
      ;;
    slowdebug )
      # Disable optimization
      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
      ;;
  esac













  # Special extras...
  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
    fi
  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
  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"

  # Hotspot needs these set in their legacy form
  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $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.
  #

  # Setup compiler/platform specific flags into
  #    CFLAGS_JDK    - C Compiler flags
  #    CXXFLAGS_JDK  - C++ Compiler flags
  #    COMMON_CCXXFLAGS_JDK - common to C and C++
  if test "x$TOOLCHAIN_TYPE" = xgcc; then
    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
        -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 but do prevent strict aliasing
        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
        ;;
      * )
        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
        ;;
    esac
  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
    fi

    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_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"
    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
    else
      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
    fi
  fi

  ###############################################################################

  # Adjust flags according to debug level.
  case $DEBUG_LEVEL in
    fastdebug | slowdebug )
      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
      JAVAC_FLAGS="$JAVAC_FLAGS -g"
      ;;
    release )
      ;;
    * )
      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
      ;;
  esac

  # Setup LP64
  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"

  # Set some common defines. These works for all compilers, but assume
  # -D is universally accepted.

  # Setup endianness
  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
    # 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
    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
    else
      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
    fi
  else
    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
    # are defined in the system?
    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
    else
      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
    fi
  fi

  # Setup target OS define. Use OS target name but in upper case.
  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"

  # Setup target CPU
  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"

  # Setup debug/release defines
  if test "x$DEBUG_LEVEL" = xrelease; then
    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
    fi
  else
    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
  fi

  # Setup release name
  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"


  # Set some additional per-OS defines.
  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
  elif test "x$OPENJDK_TARGET_OS" = xaix; then
    # FIXME: PPC64 should not be here.
    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
  fi

  # Additional macosx handling
  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
    # Setting these parameters makes it an error to link to macosx APIs that are
    # newer than the given OS version and makes the linked binaries compatible
    # even if built on a newer version of the OS.
    # The expected format is X.Y.Z
    MACOSX_VERSION_MIN=10.7.0


    # The macro takes the version with no dots, ex: 1070
    # Let the flags variables get resolved in make for easier override on make
    # command line.
    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
  fi

  # Setup some hard coded includes
  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
      -I${JDK_TOPDIR}/src/java.base/share/native/include \
      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_API_DIR/native/include"

  # The shared libraries are compiled using the picflag.
  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "

  # Executable flags
  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"






  # Setup LDFLAGS et al.
  #

  # 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$TOOLCHAIN_TYPE" = xmicrosoft; then
    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
    fi
    # TODO: make -debug optional "--disable-full-debug-symbols"
    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
    # If this is a --hash-style=gnu system, use --hash-style=both, why?
    # We have previously set HAS_GNU_HASH if this is the case
    if test -n "$HAS_GNU_HASH"; then
      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
    fi
    if test "x$OPENJDK_TARGET_OS" = xlinux; 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 -z -Xlinker defs"
      case $DEBUG_LEVEL in
        release )
          # tell linker to optimize libraries.
          # Should this be supplied to the OSS linker as well?
          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
          ;;
        slowdebug )
          if test "x$HAS_LINKER_NOW" = "xtrue"; then
            # do relocations at load
            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
          fi
          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
            # mark relocations read only
            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
          fi
          ;;
        fastdebug )
          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
            # mark relocations read only
            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
          fi
          ;;
        * )
          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
          ;;
        esac
    fi
  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
  fi

  if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
    # If undefined behaviour detection is enabled then we need to tell linker.
    case $DEBUG_LEVEL in
      release | fastdebug )
        ;;
      slowdebug )
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&5
$as_echo "$as_me: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&2;}
        if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
          # enable undefined behaviour checking
          LDFLAGS_JDK="$LDFLAGS_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
        fi
        ;;
      * )
        as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
        ;;
    esac
  fi

  # Customize LDFLAGS for executables

  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"

  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
      LDFLAGS_STACK_SIZE=1048576
    else
      LDFLAGS_STACK_SIZE=327680
    fi
    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
  fi

  # Customize LDFLAGS for libs
  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"

  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
    LDFLAGS_JDKLIB_SUFFIX=""
  else
    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"

    # On some platforms (mac) the linker warns about non existing -L dirs.
    # Add server first if available. Linking aginst client does not always produce the same results.
    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
    # Default to server for other variants.
    if test "x$JVM_VARIANT_SERVER" = xtrue; then
      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
    else
      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
    fi

    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
    fi
  fi








  # Some Zero and Shark settings.
  # ZERO_ARCHFLAG tells the compiler which mode to build for
  case "${OPENJDK_TARGET_CPU}" in
    s390)
      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
      ;;
    *)
      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
  esac

  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
  supports=yes

  saved_cflags="$CFLAGS"
  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
  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

  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int i;
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  supports=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  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

  CFLAGS="$saved_cflags"

  saved_cxxflags="$CXXFLAGS"
  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
  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

  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int i;
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :

else
  supports=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  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

  CXXFLAGS="$saved_cxxflags"

  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
$as_echo "$supports" >&6; }
  if test "x$supports" = "xyes" ; then
    :
  else
    ZERO_ARCHFLAG=""
  fi



  # Check that the compiler supports -mX (or -qX on AIX) flags
  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does

  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
  supports=yes

  saved_cflags="$CFLAGS"
  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
  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

  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int i;
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

else
  supports=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  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

  CFLAGS="$saved_cflags"

  saved_cxxflags="$CXXFLAGS"
  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
  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

  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int i;
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :

else
  supports=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  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

  CXXFLAGS="$saved_cxxflags"

  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
$as_echo "$supports" >&6; }
  if test "x$supports" = "xyes" ; then
    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
  else
    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
  fi



  case "${TOOLCHAIN_TYPE}" in
    microsoft)
      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
      ;;
    solstudio)
      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
      ;;
    gcc)
      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
      ;;
    clang)
      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
      ;;
  esac



# 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.
  #
  # Check whether --enable-debug-symbols was given.
if test "${enable_debug_symbols+set}" = set; then :
  enableval=$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" = "xyes"; then
    ENABLE_DEBUG_SYMBOLS=true
  elif test "x$enable_debug_symbols" = "xno"; then
    ENABLE_DEBUG_SYMBOLS=false
  else
    # Default is on if objcopy is found
    if test "x$OBJCOPY" != x; then
      ENABLE_DEBUG_SYMBOLS=true
    # MacOS X and Windows don't use objcopy but default is on for those OSes
    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
      ENABLE_DEBUG_SYMBOLS=true
    else
      ENABLE_DEBUG_SYMBOLS=false
    fi
  fi

  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }

  #
  # ZIP_DEBUGINFO_FILES
  #
  { $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; }
  # Check whether --enable-zip-debug-info was given.
if test "${enable_zip_debug_info+set}" = set; then :
  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
else
  enable_zip_debug_info="yes"
fi

  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
$as_echo "${enable_zip_debug_info}" >&6; }

  if test "x${enable_zip_debug_info}" = "xno"; then
    ZIP_DEBUGINFO_FILES=false
  else
    ZIP_DEBUGINFO_FILES=true
  fi





###############################################################################
#
# Check dependencies for external and internal libraries.
#
###############################################################################

# After we have toolchain, we can compile fixpath. It's needed by the lib checks.

  # When using cygwin or msys, we need a wrapper binary that renames
  # /cygdrive/c/ arguments into c:/ arguments and peeks into
  # @files and rewrites these too! This wrapper binary is
  # called fixpath.
  FIXPATH=
  if test "x$OPENJDK_BUILD_OS" = xwindows; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
$as_echo_n "checking if fixpath can be created... " >&6; }
    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`

      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
      # @ was chosen as separator to minimize risk of other tools messing around with it
      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`

      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
    fi
    rm -f $OUTPUT_ROOT/fixpath*
    cd $OUTPUT_ROOT
    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
    cd $CURDIR

    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
      cat $OUTPUT_ROOT/fixpath1.log
      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
$as_echo_n "checking if fixpath.exe works... " >&6; }
    cd $OUTPUT_ROOT
    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
    cd $CURDIR
    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
      cat $OUTPUT_ROOT/fixpath2.log
      as_fn_error $? "fixpath did not work!" "$LINENO" 5
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
  fi






  ###############################################################################
  #
  # 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" = xaix; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
$as_echo_n "checking what is not needed on AIX?... " >&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
    { $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
    FREETYPE_NOT_NEEDED=yes
  fi

  if test "x$SUPPORT_HEADFUL" = xno; then
    X11_NOT_NEEDED=yes
  fi



  ###############################################################################
  #
  # Check for X Windows
  #

  if test "x$X11_NOT_NEEDED" = xyes; then
    if test "x${with_x}" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
    fi
    X_CFLAGS=
    X_LIBS=
  else
    # 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$OPENJDK_TARGET_OS" = "xlinux"; then
      if test "x$SYSROOT" != "x"; then
        if test "x$x_includes" = xNONE; then
          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
            x_includes="$SYSROOT/usr/X11R6/include"
          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
            x_includes="$SYSROOT/usr/include"
          fi
        fi
        if test "x$x_libraries" = xNONE; then
          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
            x_libraries="$SYSROOT/usr/X11R6/lib"
          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
            x_libraries="$SYSROOT/usr/lib64"
          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
            x_libraries="$SYSROOT/usr/lib"
          fi
        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 ${ac_cv_have_x+:} false; 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 ${ac_cv_lib_dnet_dnet_ntoa+:} false; 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" = xyes; 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 ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; 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" = xyes; 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" = xyes; 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 ${ac_cv_lib_nsl_gethostbyname+:} false; 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" = xyes; 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 ${ac_cv_lib_bsd_gethostbyname+:} false; 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" = xyes; 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" = xyes; 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 ${ac_cv_lib_socket_connect+:} false; 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" = xyes; 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" = xyes; 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 ${ac_cv_lib_posix_remove+:} false; 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" = xyes; 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" = xyes; 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 ${ac_cv_lib_ipc_shmat+:} false; 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" = xyes; 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 ${ac_cv_lib_ICE_IceConnectionNumber+:} false; 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" = xyes; then :
  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
fi

  LDFLAGS=$ac_save_LDFLAGS

fi


    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
    # this doesn't make sense so we remove it.
    if test "x$COMPILE_TYPE" = xcross; then
      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
    fi

    if test "x$no_x" = xyes; then

  # Print a helpful message on how to acquire the necessary build dependency.
  # x11 is the help tag: freetype, cups, pulse, alsa etc
  MISSING_DEPENDENCY=x11

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    cygwin_help $MISSING_DEPENDENCY
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    msys_help $MISSING_DEPENDENCY
  else
    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 ;;
    esac

    if test "x$PKGHANDLER_COMMAND" != x; then
      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
    fi
  fi

      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
    fi

    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
      OPENWIN_HOME="/usr/openwin"
      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
    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 $SYSROOT_CFLAGS $X_CFLAGS"

    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
          # include <X11/Xlib.h>
          # include <X11/Xutil.h>


"
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_HEADERS_OK=yes
else
  X11_HEADERS_OK=no; break
fi

done


    if test "x$X11_HEADERS_OK" = xno; then

  # Print a helpful message on how to acquire the necessary build dependency.
  # x11 is the help tag: freetype, cups, pulse, alsa etc
  MISSING_DEPENDENCY=x11

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    cygwin_help $MISSING_DEPENDENCY
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    msys_help $MISSING_DEPENDENCY
  else
    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 ;;
    esac

    if test "x$PKGHANDLER_COMMAND" != x; then
      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
    fi
  fi

      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
    fi

    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
    # defined in libawt_xawt.
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <X11/extensions/Xrender.h>
int
main ()
{
XLinearGradient x;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$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; }
         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

    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

  fi # X11_NOT_NEEDED






  ###############################################################################
  #
  # 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


  if test "x$CUPS_NOT_NEEDED" = xyes; then
    if test "x${with_cups}" != x || test "x${with_cups_include}" != 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=
  else
    CUPS_FOUND=no

    if test "x${with_cups}" = xno || test "x${with_cups_include}" = 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_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$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=
            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" >&5
$as_echo_n "checking for cups headers... " >&6; }
      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
        # An SFW package seems to be installed!
        CUPS_FOUND=yes
        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
        # A CSW package seems to be installed!
        CUPS_FOUND=yes
        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
      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: freetype, cups, pulse, alsa etc
  MISSING_DEPENDENCY=cups

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    cygwin_help $MISSING_DEPENDENCY
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    msys_help $MISSING_DEPENDENCY
  else
    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 ;;
    esac

    if test "x$PKGHANDLER_COMMAND" != x; then
      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
    fi
  fi

      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
    fi
  fi






  ###############################################################################
  #
  # The ubiquitous freetype library is used to render fonts.
  #

# Check whether --with-freetype was given.
if test "${with_freetype+set}" = set; then :
  withval=$with_freetype;
fi


# Check whether --with-freetype-include was given.
if test "${with_freetype_include+set}" = set; then :
  withval=$with_freetype_include;
fi


# Check whether --with-freetype-lib was given.
if test "${with_freetype_lib+set}" = set; then :
  withval=$with_freetype_lib;
fi


# Check whether --with-freetype-src was given.
if test "${with_freetype_src+set}" = set; then :
  withval=$with_freetype_src;
fi

  # Check whether --enable-freetype-bundling was given.
if test "${enable_freetype_bundling+set}" = set; then :
  enableval=$enable_freetype_bundling;
fi


  # Need to specify explicitly since it needs to be overridden on some versions of macosx
  FREETYPE_BASE_NAME=freetype
  FREETYPE_CFLAGS=
  FREETYPE_LIBS=
  FREETYPE_BUNDLE_LIB_PATH=

  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != 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
    if test "x$enable_freetype_bundling" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
    fi
  else
    # freetype is needed to build; go get it!

    BUNDLE_FREETYPE="$enable_freetype_bundling"

    if  test "x$with_freetype_src" != x; then
      if test "x$OPENJDK_TARGET_OS" = xwindows; then
        # Try to build freetype if --with-freetype-src was given on Windows

  FREETYPE_SRC_PATH="$with_freetype_src"
  BUILD_FREETYPE=yes

  # Check if the freetype sources are acessible..
  if ! test -d $FREETYPE_SRC_PATH; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
    BUILD_FREETYPE=no
  fi
  # ..and contain a vc2010 project file
  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
    BUILD_FREETYPE=no
  fi
  # Now check if configure found a version of 'msbuild.exe'
  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&5
$as_echo "$as_me: WARNING: Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&2;}
    BUILD_FREETYPE=no
  fi

  # Ready to go..
  if test "x$BUILD_FREETYPE" = xyes; then

    # msbuild requires trailing slashes for output directories
    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
    freetype_lib_path_unix="$freetype_lib_path"
    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"

  unix_path="$vcxproj_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    windows_path=`$CYGPATH -m "$unix_path"`
    vcxproj_path="$windows_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    windows_path=`cmd //c echo $unix_path`
    vcxproj_path="$windows_path"
  fi


  unix_path="$freetype_lib_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    windows_path=`$CYGPATH -m "$unix_path"`
    freetype_lib_path="$windows_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    windows_path=`cmd //c echo $unix_path`
    freetype_lib_path="$windows_path"
  fi


  unix_path="$freetype_obj_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    windows_path=`$CYGPATH -m "$unix_path"`
    freetype_obj_path="$windows_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    windows_path=`cmd //c echo $unix_path`
    freetype_obj_path="$windows_path"
  fi

    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
      freetype_platform=x64
    else
      freetype_platform=win32
    fi

    # The original freetype project file is for VS 2010 (i.e. 'v100'),
    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}

    # First we try to build the freetype.dll
    $ECHO -e "@echo off\n"\
	     "$MSBUILD $vcxproj_path "\
		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
		       "/p:Configuration=\"Release Multithreaded\" "\
		       "/p:Platform=$freetype_platform "\
		       "/p:ConfigurationType=DynamicLibrary "\
		       "/p:TargetName=freetype "\
		       "/p:OutDir=\"$freetype_lib_path\" "\
		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
    cmd /c freetype.bat

    if test -s "$freetype_lib_path_unix/freetype.dll"; then
      # If that succeeds we also build freetype.lib
      $ECHO -e "@echo off\n"\
	       "$MSBUILD $vcxproj_path "\
			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
			 "/p:Configuration=\"Release Multithreaded\" "\
			 "/p:Platform=$freetype_platform "\
			 "/p:ConfigurationType=StaticLibrary "\
			 "/p:TargetName=freetype "\
			 "/p:OutDir=\"$freetype_lib_path\" "\
			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
      cmd /c freetype.bat

      if test -s "$freetype_lib_path_unix/freetype.lib"; then
	# Once we build both, lib and dll, set freetype lib and include path appropriately
	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
      else
	BUILD_FREETYPE=no
      fi
    else
      BUILD_FREETYPE=no
    fi
  fi

        if test "x$BUILD_FREETYPE" = xyes; then
          # Okay, we built it. Check that it works.

  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
  METHOD="--with-freetype-src"

  # Let's start with an optimistic view of the world :-)
  FOUND_FREETYPE=yes

  # First look for the canonical freetype main include file ft2build.h.
  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
      # Fail.
      FOUND_FREETYPE=no
    fi
  fi

  if test "x$FOUND_FREETYPE" = xyes; then
    # Include file found, let's continue the sanity check.
    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}

    # Reset to default value
    FREETYPE_BASE_NAME=freetype
    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
      if test "x$OPENJDK_TARGET_OS" = xmacosx \
          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
        # for the .6 version explicitly.
        FREETYPE_BASE_NAME=freetype.6
        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
      else
        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
        FOUND_FREETYPE=no
      fi
    else
      if test "x$OPENJDK_TARGET_OS" = xwindows; then
        # On Windows, we will need both .lib and .dll file.
        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
          FOUND_FREETYPE=no
        fi
      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
        # Found lib in isa dir, use that instead.
        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
      fi
    fi
  fi

  if test "x$FOUND_FREETYPE" = xyes; then

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
  fi


  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$POTENTIAL_FREETYPE_LIB_PATH"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$POTENTIAL_FREETYPE_LIB_PATH"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$POTENTIAL_FREETYPE_LIB_PATH"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
  fi


    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
$as_echo_n "checking for freetype includes... " >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
$as_echo_n "checking for freetype libraries... " >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
$as_echo "$FREETYPE_LIB_PATH" >&6; }
  fi

          if test "x$FOUND_FREETYPE" != xyes; then
            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
          fi
        else
          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
        fi
      else
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
      fi
    fi

    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
      # User has specified settings

      if test "x$BUNDLE_FREETYPE" = x; then
        # If not specified, default is to bundle freetype
        BUNDLE_FREETYPE=yes
      fi

      if test "x$with_freetype" != x; then
        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
      fi

      # Allow --with-freetype-lib and --with-freetype-include to override
      if test "x$with_freetype_include" != x; then
        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
      fi
      if test "x$with_freetype_lib" != x; then
        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
      fi

      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
        # Okay, we got it. Check that it works.

  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
  METHOD="--with-freetype"

  # Let's start with an optimistic view of the world :-)
  FOUND_FREETYPE=yes

  # First look for the canonical freetype main include file ft2build.h.
  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
      # Fail.
      FOUND_FREETYPE=no
    fi
  fi

  if test "x$FOUND_FREETYPE" = xyes; then
    # Include file found, let's continue the sanity check.
    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}

    # Reset to default value
    FREETYPE_BASE_NAME=freetype
    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
      if test "x$OPENJDK_TARGET_OS" = xmacosx \
          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
        # for the .6 version explicitly.
        FREETYPE_BASE_NAME=freetype.6
        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
      else
        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
        FOUND_FREETYPE=no
      fi
    else
      if test "x$OPENJDK_TARGET_OS" = xwindows; then
        # On Windows, we will need both .lib and .dll file.
        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
          FOUND_FREETYPE=no
        fi
      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
        # Found lib in isa dir, use that instead.
        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
      fi
    fi
  fi

  if test "x$FOUND_FREETYPE" = xyes; then

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
  fi


  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$POTENTIAL_FREETYPE_LIB_PATH"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$POTENTIAL_FREETYPE_LIB_PATH"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$POTENTIAL_FREETYPE_LIB_PATH"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
  fi


    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
$as_echo_n "checking for freetype includes... " >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
$as_echo_n "checking for freetype libraries... " >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
$as_echo "$FREETYPE_LIB_PATH" >&6; }
  fi

        if test "x$FOUND_FREETYPE" != xyes; then
          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
        fi
      else
        # User specified only one of lib or include. This is an error.
        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
        else
          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
        fi
      fi
    else
      # User did not specify settings, but we need freetype. Try to locate it.

      if test "x$BUNDLE_FREETYPE" = x; then
        # If not specified, default is to bundle freetype only on windows
        if test "x$OPENJDK_TARGET_OS" = xwindows; then
          BUNDLE_FREETYPE=yes
        else
          BUNDLE_FREETYPE=no
        fi
      fi

      if test "x$FOUND_FREETYPE" != xyes; then
        # Check builddeps


  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
      FREETYPE=$depdir
      if test "x$theroot" != x; then
        FREETYPE="$theroot"
      fi
      if test "x$thecflags" != x; then
        FREETYPE_CFLAGS="$thecflags"
      fi
      if test "x$thelibs" != x; then
        FREETYPE_LIBS="$thelibs"
      fi
      FOUND_FREETYPE=yes
      else FOUND_FREETYPE=no

    fi
    else FOUND_FREETYPE=no

  fi

        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
        if test "x$FOUND_FREETYPE" = xyes; then
          if test "x$BUNDLE_FREETYPE" = xyes; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
            FOUND_FREETYPE=no
          else
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
$as_echo_n "checking for freetype... " >&6; }
            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
$as_echo "yes (using builddeps)" >&6; }
          fi
        fi
      fi

      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
      if test "x$SYSROOT" = x; then
        if test "x$FOUND_FREETYPE" != xyes; then
          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
          if test "x$PKG_CONFIG" != x; then

pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
$as_echo_n "checking for FREETYPE... " >&6; }

if test -n "$FREETYPE_CFLAGS"; then
    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_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_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$FREETYPE_LIBS"; then
    pkg_cv_FREETYPE_LIBS="$FREETYPE_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_FREETYPE_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
	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
        else
	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$FREETYPE_PKG_ERRORS" >&5

	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
                FOUND_FREETYPE=no
elif test $pkg_failed = untried; then
	FOUND_FREETYPE=no
else
	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
	FOUND_FREETYPE=yes
fi
            if test "x$FOUND_FREETYPE" = xyes; then
              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
              fi
              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
              if test "x$BUNDLE_FREETYPE" = xyes; then
                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
                FOUND_FREETYPE=no
              else
                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
$as_echo_n "checking for freetype... " >&6; }
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
$as_echo "yes (using pkg-config)" >&6; }
              fi
            fi
          fi
        fi
      fi

      if test "x$FOUND_FREETYPE" != xyes; then
        # Check in well-known locations
        if test "x$OPENJDK_TARGET_OS" = xwindows; then
          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"

  windows_path="$FREETYPE_BASE_DIR"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    FREETYPE_BASE_DIR="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    FREETYPE_BASE_DIR="$unix_path"
  fi


  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
  METHOD="well-known location"

  # Let's start with an optimistic view of the world :-)
  FOUND_FREETYPE=yes

  # First look for the canonical freetype main include file ft2build.h.
  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
      # Fail.
      FOUND_FREETYPE=no
    fi
  fi

  if test "x$FOUND_FREETYPE" = xyes; then
    # Include file found, let's continue the sanity check.
    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}

    # Reset to default value
    FREETYPE_BASE_NAME=freetype
    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
      if test "x$OPENJDK_TARGET_OS" = xmacosx \
          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
        # for the .6 version explicitly.
        FREETYPE_BASE_NAME=freetype.6
        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
      else
        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
        FOUND_FREETYPE=no
      fi
    else
      if test "x$OPENJDK_TARGET_OS" = xwindows; then
        # On Windows, we will need both .lib and .dll file.
        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
          FOUND_FREETYPE=no
        fi
      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
        # Found lib in isa dir, use that instead.
        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
      fi
    fi
  fi

  if test "x$FOUND_FREETYPE" = xyes; then

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
  fi


  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$POTENTIAL_FREETYPE_LIB_PATH"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$POTENTIAL_FREETYPE_LIB_PATH"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$POTENTIAL_FREETYPE_LIB_PATH"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
  fi


    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
$as_echo_n "checking for freetype includes... " >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
$as_echo_n "checking for freetype libraries... " >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
$as_echo "$FREETYPE_LIB_PATH" >&6; }
  fi

          if test "x$FOUND_FREETYPE" != xyes; then
            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"

  windows_path="$FREETYPE_BASE_DIR"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    FREETYPE_BASE_DIR="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    FREETYPE_BASE_DIR="$unix_path"
  fi


  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
  METHOD="well-known location"

  # Let's start with an optimistic view of the world :-)
  FOUND_FREETYPE=yes

  # First look for the canonical freetype main include file ft2build.h.
  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
      # Fail.
      FOUND_FREETYPE=no
    fi
  fi

  if test "x$FOUND_FREETYPE" = xyes; then
    # Include file found, let's continue the sanity check.
    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}

    # Reset to default value
    FREETYPE_BASE_NAME=freetype
    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
      if test "x$OPENJDK_TARGET_OS" = xmacosx \
          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
        # for the .6 version explicitly.
        FREETYPE_BASE_NAME=freetype.6
        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
      else
        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
        FOUND_FREETYPE=no
      fi
    else
      if test "x$OPENJDK_TARGET_OS" = xwindows; then
        # On Windows, we will need both .lib and .dll file.
        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
          FOUND_FREETYPE=no
        fi
      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
        # Found lib in isa dir, use that instead.
        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
      fi
    fi
  fi

  if test "x$FOUND_FREETYPE" = xyes; then

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
  fi


  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$POTENTIAL_FREETYPE_LIB_PATH"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$POTENTIAL_FREETYPE_LIB_PATH"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$POTENTIAL_FREETYPE_LIB_PATH"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
  fi


    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
$as_echo_n "checking for freetype includes... " >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
$as_echo_n "checking for freetype libraries... " >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
$as_echo "$FREETYPE_LIB_PATH" >&6; }
  fi

          fi
        else
          FREETYPE_BASE_DIR="$SYSROOT/usr"

  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
  METHOD="well-known location"

  # Let's start with an optimistic view of the world :-)
  FOUND_FREETYPE=yes

  # First look for the canonical freetype main include file ft2build.h.
  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
      # Fail.
      FOUND_FREETYPE=no
    fi
  fi

  if test "x$FOUND_FREETYPE" = xyes; then
    # Include file found, let's continue the sanity check.
    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}

    # Reset to default value
    FREETYPE_BASE_NAME=freetype
    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
      if test "x$OPENJDK_TARGET_OS" = xmacosx \
          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
        # for the .6 version explicitly.
        FREETYPE_BASE_NAME=freetype.6
        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
      else
        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
        FOUND_FREETYPE=no
      fi
    else
      if test "x$OPENJDK_TARGET_OS" = xwindows; then
        # On Windows, we will need both .lib and .dll file.
        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
          FOUND_FREETYPE=no
        fi
      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
        # Found lib in isa dir, use that instead.
        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
      fi
    fi
  fi

  if test "x$FOUND_FREETYPE" = xyes; then

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
  fi


  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$POTENTIAL_FREETYPE_LIB_PATH"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$POTENTIAL_FREETYPE_LIB_PATH"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$POTENTIAL_FREETYPE_LIB_PATH"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
  fi


    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
$as_echo_n "checking for freetype includes... " >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
$as_echo_n "checking for freetype libraries... " >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
$as_echo "$FREETYPE_LIB_PATH" >&6; }
  fi


          if test "x$FOUND_FREETYPE" != xyes; then
            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"

  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
  METHOD="well-known location"

  # Let's start with an optimistic view of the world :-)
  FOUND_FREETYPE=yes

  # First look for the canonical freetype main include file ft2build.h.
  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
      # Fail.
      FOUND_FREETYPE=no
    fi
  fi

  if test "x$FOUND_FREETYPE" = xyes; then
    # Include file found, let's continue the sanity check.
    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}

    # Reset to default value
    FREETYPE_BASE_NAME=freetype
    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
      if test "x$OPENJDK_TARGET_OS" = xmacosx \
          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
        # for the .6 version explicitly.
        FREETYPE_BASE_NAME=freetype.6
        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
      else
        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
        FOUND_FREETYPE=no
      fi
    else
      if test "x$OPENJDK_TARGET_OS" = xwindows; then
        # On Windows, we will need both .lib and .dll file.
        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
          FOUND_FREETYPE=no
        fi
      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
        # Found lib in isa dir, use that instead.
        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
      fi
    fi
  fi

  if test "x$FOUND_FREETYPE" = xyes; then

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
  fi


  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$POTENTIAL_FREETYPE_LIB_PATH"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$POTENTIAL_FREETYPE_LIB_PATH"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$POTENTIAL_FREETYPE_LIB_PATH"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
  fi


    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
$as_echo_n "checking for freetype includes... " >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
$as_echo_n "checking for freetype libraries... " >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
$as_echo "$FREETYPE_LIB_PATH" >&6; }
  fi

          fi

          if test "x$FOUND_FREETYPE" != xyes; then
            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"

  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
  METHOD="well-known location"

  # Let's start with an optimistic view of the world :-)
  FOUND_FREETYPE=yes

  # First look for the canonical freetype main include file ft2build.h.
  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
      # Fail.
      FOUND_FREETYPE=no
    fi
  fi

  if test "x$FOUND_FREETYPE" = xyes; then
    # Include file found, let's continue the sanity check.
    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}

    # Reset to default value
    FREETYPE_BASE_NAME=freetype
    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
      if test "x$OPENJDK_TARGET_OS" = xmacosx \
          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
        # for the .6 version explicitly.
        FREETYPE_BASE_NAME=freetype.6
        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
      else
        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
        FOUND_FREETYPE=no
      fi
    else
      if test "x$OPENJDK_TARGET_OS" = xwindows; then
        # On Windows, we will need both .lib and .dll file.
        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
          FOUND_FREETYPE=no
        fi
      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
        # Found lib in isa dir, use that instead.
        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
      fi
    fi
  fi

  if test "x$FOUND_FREETYPE" = xyes; then

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
  fi


  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$POTENTIAL_FREETYPE_LIB_PATH"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$POTENTIAL_FREETYPE_LIB_PATH"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$POTENTIAL_FREETYPE_LIB_PATH"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
  fi


    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
$as_echo_n "checking for freetype includes... " >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
$as_echo_n "checking for freetype libraries... " >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
$as_echo "$FREETYPE_LIB_PATH" >&6; }
  fi

          fi

          if test "x$FOUND_FREETYPE" != xyes; then
            FREETYPE_BASE_DIR="$SYSROOT/usr"
            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then

  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
  METHOD="well-known location"

  # Let's start with an optimistic view of the world :-)
  FOUND_FREETYPE=yes

  # First look for the canonical freetype main include file ft2build.h.
  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
      # Fail.
      FOUND_FREETYPE=no
    fi
  fi

  if test "x$FOUND_FREETYPE" = xyes; then
    # Include file found, let's continue the sanity check.
    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}

    # Reset to default value
    FREETYPE_BASE_NAME=freetype
    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
      if test "x$OPENJDK_TARGET_OS" = xmacosx \
          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
        # for the .6 version explicitly.
        FREETYPE_BASE_NAME=freetype.6
        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
      else
        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
        FOUND_FREETYPE=no
      fi
    else
      if test "x$OPENJDK_TARGET_OS" = xwindows; then
        # On Windows, we will need both .lib and .dll file.
        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
          FOUND_FREETYPE=no
        fi
      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
        # Found lib in isa dir, use that instead.
        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
      fi
    fi
  fi

  if test "x$FOUND_FREETYPE" = xyes; then

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
  fi


  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$POTENTIAL_FREETYPE_LIB_PATH"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$POTENTIAL_FREETYPE_LIB_PATH"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$POTENTIAL_FREETYPE_LIB_PATH"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
  fi


    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
$as_echo_n "checking for freetype includes... " >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
$as_echo_n "checking for freetype libraries... " >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
$as_echo "$FREETYPE_LIB_PATH" >&6; }
  fi

            else

  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
  METHOD="well-known location"

  # Let's start with an optimistic view of the world :-)
  FOUND_FREETYPE=yes

  # First look for the canonical freetype main include file ft2build.h.
  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
      # Fail.
      FOUND_FREETYPE=no
    fi
  fi

  if test "x$FOUND_FREETYPE" = xyes; then
    # Include file found, let's continue the sanity check.
    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}

    # Reset to default value
    FREETYPE_BASE_NAME=freetype
    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
      if test "x$OPENJDK_TARGET_OS" = xmacosx \
          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
        # for the .6 version explicitly.
        FREETYPE_BASE_NAME=freetype.6
        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
      else
        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
        FOUND_FREETYPE=no
      fi
    else
      if test "x$OPENJDK_TARGET_OS" = xwindows; then
        # On Windows, we will need both .lib and .dll file.
        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
          FOUND_FREETYPE=no
        fi
      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
        # Found lib in isa dir, use that instead.
        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
      fi
    fi
  fi

  if test "x$FOUND_FREETYPE" = xyes; then

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
  fi


  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$POTENTIAL_FREETYPE_LIB_PATH"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$POTENTIAL_FREETYPE_LIB_PATH"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$POTENTIAL_FREETYPE_LIB_PATH"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
  fi


    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
$as_echo_n "checking for freetype includes... " >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
$as_echo_n "checking for freetype libraries... " >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
$as_echo "$FREETYPE_LIB_PATH" >&6; }
  fi

              if test "x$FOUND_FREETYPE" != xyes; then

  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
  METHOD="well-known location"

  # Let's start with an optimistic view of the world :-)
  FOUND_FREETYPE=yes

  # First look for the canonical freetype main include file ft2build.h.
  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
      # Fail.
      FOUND_FREETYPE=no
    fi
  fi

  if test "x$FOUND_FREETYPE" = xyes; then
    # Include file found, let's continue the sanity check.
    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}

    # Reset to default value
    FREETYPE_BASE_NAME=freetype
    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
      if test "x$OPENJDK_TARGET_OS" = xmacosx \
          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
        # for the .6 version explicitly.
        FREETYPE_BASE_NAME=freetype.6
        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
      else
        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
        FOUND_FREETYPE=no
      fi
    else
      if test "x$OPENJDK_TARGET_OS" = xwindows; then
        # On Windows, we will need both .lib and .dll file.
        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
          FOUND_FREETYPE=no
        fi
      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
        # Found lib in isa dir, use that instead.
        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
      fi
    fi
  fi

  if test "x$FOUND_FREETYPE" = xyes; then

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
  fi


  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$POTENTIAL_FREETYPE_LIB_PATH"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$POTENTIAL_FREETYPE_LIB_PATH"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$POTENTIAL_FREETYPE_LIB_PATH"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
  fi


    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
$as_echo_n "checking for freetype includes... " >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
$as_echo_n "checking for freetype libraries... " >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
$as_echo "$FREETYPE_LIB_PATH" >&6; }
  fi

              fi
            fi
          fi
        fi
      fi # end check in well-known locations

      if test "x$FOUND_FREETYPE" != xyes; then

  # Print a helpful message on how to acquire the necessary build dependency.
  # freetype is the help tag: freetype, cups, pulse, alsa etc
  MISSING_DEPENDENCY=freetype

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    cygwin_help $MISSING_DEPENDENCY
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    msys_help $MISSING_DEPENDENCY
  else
    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 ;;
    esac

    if test "x$PKGHANDLER_COMMAND" != x; then
      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
    fi
  fi

        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
      fi
    fi # end user specified settings

    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
    if test "x$FREETYPE_CFLAGS" = x; then

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$FREETYPE_INCLUDE_PATH"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    FREETYPE_INCLUDE_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$FREETYPE_INCLUDE_PATH"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    FREETYPE_INCLUDE_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$FREETYPE_INCLUDE_PATH"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
  fi

      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
      else
        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
      fi
    fi

    if test "x$FREETYPE_LIBS" = x; then

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$FREETYPE_LIB_PATH"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    FREETYPE_LIB_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$FREETYPE_LIB_PATH"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    FREETYPE_LIB_PATH="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$FREETYPE_LIB_PATH"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
  fi

      if test "x$OPENJDK_TARGET_OS" = xwindows; then
        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
      else
        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
      fi
    fi

    # Try to compile it
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
$as_echo_n "checking if we can compile and link with freetype... " >&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

    PREV_CXXCFLAGS="$CXXFLAGS"
    PREV_LIBS="$LIBS"
    PREV_CXX="$CXX"
    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
    LIBS="$LIBS $FREETYPE_LIBS"
    CXX="$FIXPATH $CXX"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

          #include<ft2build.h>
          #include FT_FREETYPE_H
          int main () {
            FT_Init_FreeType(NULL);
            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_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}


  # Print a helpful message on how to acquire the necessary build dependency.
  # freetype is the help tag: freetype, cups, pulse, alsa etc
  MISSING_DEPENDENCY=freetype

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    cygwin_help $MISSING_DEPENDENCY
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    msys_help $MISSING_DEPENDENCY
  else
    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 ;;
    esac

    if test "x$PKGHANDLER_COMMAND" != x; then
      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
    fi
  fi


          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5


fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
    CXXCFLAGS="$PREV_CXXFLAGS"
    LIBS="$PREV_LIBS"
    CXX="$PREV_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}: checking if we should bundle freetype" >&5
$as_echo_n "checking if we should bundle freetype... " >&6; }
    if test "x$BUNDLE_FREETYPE" = xyes; then
      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
$as_echo "$BUNDLE_FREETYPE" >&6; }

  fi # end freetype needed







  ###############################################################################
  #
  # 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 -lasound"
      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} -lasound"
      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
    # Do not try pkg-config if we have a sysroot set.
    if test "x$SYSROOT" = x; then
      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
    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" = xyes; 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: freetype, cups, pulse, alsa etc
  MISSING_DEPENDENCY=alsa

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    cygwin_help $MISSING_DEPENDENCY
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    msys_help $MISSING_DEPENDENCY
  else
    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 ;;
    esac

    if test "x$PKGHANDLER_COMMAND" != x; then
      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
    fi
  fi

      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
    fi
  fi






  ###############################################################################
  #
  # Check for the jpeg library
  #


# Check whether --with-libjpeg was given.
if test "${with_libjpeg+set}" = set; then :
  withval=$with_libjpeg;
fi


  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
$as_echo_n "checking for which libjpeg to use... " >&6; }

  # default is bundled
  DEFAULT_LIBJPEG=bundled

  #
  # if user didn't specify, use DEFAULT_LIBJPEG
  #
  if test "x${with_libjpeg}" = "x"; then
    with_libjpeg=${DEFAULT_LIBJPEG}
  fi

  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
$as_echo "${with_libjpeg}" >&6; }

  if test "x${with_libjpeg}" = "xbundled"; then
    USE_EXTERNAL_LIBJPEG=false
  elif test "x${with_libjpeg}" = "xsystem"; then
    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
if test "x$ac_cv_header_jpeglib_h" = xyes; then :

else
   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
fi


    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; 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.  */

/* 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 jpeg_CreateDecompress ();
int
main ()
{
return jpeg_CreateDecompress ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
else
  ac_cv_lib_jpeg_jpeg_CreateDecompress=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_jpeg_CreateDecompress" >&5
$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBJPEG 1
_ACEOF

  LIBS="-ljpeg $LIBS"

else
   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
fi


    USE_EXTERNAL_LIBJPEG=true
  else
    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
  fi



  ###############################################################################
  #
  # Check for the gif library
  #


# Check whether --with-giflib was given.
if test "${with_giflib+set}" = set; then :
  withval=$with_giflib;
fi



  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
$as_echo_n "checking for which giflib to use... " >&6; }

  # default is bundled
  DEFAULT_GIFLIB=bundled

  #
  # if user didn't specify, use DEFAULT_GIFLIB
  #
  if test "x${with_giflib}" = "x"; then
    with_giflib=${DEFAULT_GIFLIB}
  fi

  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
$as_echo "${with_giflib}" >&6; }

  if test "x${with_giflib}" = "xbundled"; then
    USE_EXTERNAL_LIBGIF=false
  elif test "x${with_giflib}" = "xsystem"; then
    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
if test "x$ac_cv_header_gif_lib_h" = xyes; then :

else
   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
fi


    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
if ${ac_cv_lib_gif_DGifGetCode+:} false; 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.  */

/* 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 DGifGetCode ();
int
main ()
{
return DGifGetCode ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
  ac_cv_lib_gif_DGifGetCode=yes
else
  ac_cv_lib_gif_DGifGetCode=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_DGifGetCode" >&5
$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBGIF 1
_ACEOF

  LIBS="-lgif $LIBS"

else
   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
fi


    USE_EXTERNAL_LIBGIF=true
  else
    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
  fi


  ###############################################################################
  #
  # Check for the lcms2 library
  #


# Check whether --with-lcms was given.
if test "${with_lcms+set}" = set; then :
  withval=$with_lcms;
fi


  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
$as_echo_n "checking for which lcms to use... " >&6; }

  DEFAULT_LCMS=bundled

  #
  # If user didn't specify, use DEFAULT_LCMS
  #
  if test "x${with_lcms}" = "x"; then
      with_lcms=${DEFAULT_LCMS}
  fi

  if test "x${with_lcms}" = "xbundled"; then
    USE_EXTERNAL_LCMS=false
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
$as_echo "bundled" >&6; }
  elif test "x${with_lcms}" = "xsystem"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
$as_echo "system" >&6; }

pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
$as_echo_n "checking for LCMS... " >&6; }

if test -n "$LCMS_CFLAGS"; then
    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$LCMS_LIBS"; then
    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 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
	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
        else
	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$LCMS_PKG_ERRORS" >&5

	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
                LCMS_FOUND=no
elif test $pkg_failed = untried; then
	LCMS_FOUND=no
else
	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
	LCMS_LIBS=$pkg_cv_LCMS_LIBS
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
	LCMS_FOUND=yes
fi
    if test "x${LCMS_FOUND}" = "xyes"; then
      USE_EXTERNAL_LCMS=true
    else
      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
    fi
  else
    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
  fi



  ###############################################################################
  #
  # Check for the png library
  #


# Check whether --with-libpng was given.
if test "${with_libpng+set}" = set; then :
  withval=$with_libpng;
fi



  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
$as_echo_n "checking for which libpng to use... " >&6; }

  # default is bundled
  DEFAULT_LIBPNG=bundled

  #
  # if user didn't specify, use DEFAULT_LIBPNG
  #
  if test "x${with_libpng}" = "x"; then
      with_libpng=${DEFAULT_LIBPNG}
  fi

  if test "x${with_libpng}" = "xbundled"; then
      USE_EXTERNAL_LIBPNG=false
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
$as_echo "bundled" >&6; }
  elif test "x${with_libpng}" = "xsystem"; then

pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
$as_echo_n "checking for PNG... " >&6; }

if test -n "$PNG_CFLAGS"; then
    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$PNG_LIBS"; then
    pkg_cv_PNG_LIBS="$PNG_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 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
	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
        else
	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$PNG_PKG_ERRORS" >&5

	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
                 LIBPNG_FOUND=no
elif test $pkg_failed = untried; then
	 LIBPNG_FOUND=no
else
	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
	PNG_LIBS=$pkg_cv_PNG_LIBS
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
	 LIBPNG_FOUND=yes
fi
      if test "x${LIBPNG_FOUND}" = "xyes"; then
          USE_EXTERNAL_LIBPNG=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-libpng=system specified, but no libpng found!" "$LINENO" 5
      fi
  else
      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
  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 ${ac_cv_lib_z_compress+:} false; 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" = xyes; 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



  ###############################################################################
  #
  # 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 ${ac_cv_lib_m_cos+:} false; 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" = xyes; 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 ${ac_cv_lib_dl_dlopen+:} false; 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" = xyes; 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 --with-stdc++lib was given.
if test "${with_stdc__lib+set}" = set; then :
  withval=$with_stdc__lib;
        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
                && test "x$with_stdc__lib" != xdefault; then
          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
        fi

else
  with_stdc__lib=default

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_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
    fi

    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
    fi

    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
    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 dynamic was requested, it's available since it would fail above otherwise.
    # If dynamic wasn't requested, go with static unless it isn't available.
    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
      LIBCXX="$LIBCXX -lstdc++"
      LDCXX="$CXX"
      STATIC_CXX_SETTING="STATIC_CXX=false"
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
$as_echo "dynamic" >&6; }
    else
      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
      LDCXX="$CC"
      STATIC_CXX_SETTING="STATIC_CXX=true"
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
$as_echo "static" >&6; }
    fi
  fi


  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS

pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
$as_echo_n "checking for LIBFFI... " >&6; }

if test -n "$LIBFFI_CFLAGS"; then
    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$LIBFFI_LIBS"; then
    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 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
	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
        else
	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
        fi
	# Put the nasty error message in config.log where it belongs
	echo "$LIBFFI_PKG_ERRORS" >&5

	as_fn_error $? "Package requirements (libffi) were not met:

$LIBFFI_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBFFI_CFLAGS
and LIBFFI_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
" "$LINENO" 5
elif test $pkg_failed = untried; 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 $? "The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables LIBFFI_CFLAGS
and LIBFFI_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See \`config.log' for more details" "$LINENO" 5; }
else
	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
	:
fi

  fi

  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
    # Extract the first word of "llvm-config", so it can be a program name with args.
set dummy llvm-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 ${ac_cv_prog_LLVM_CONFIG+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test -n "$LLVM_CONFIG"; then
  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_LLVM_CONFIG="llvm-config"
    $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
LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
if test -n "$LLVM_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
$as_echo "$LLVM_CONFIG" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi



    if test "x$LLVM_CONFIG" != xllvm-config; then
      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
    fi

    llvm_components="jit mcjit engine nativecodegen native"
    unset LLVM_CFLAGS
    for flag in $("$LLVM_CONFIG" --cxxflags); do
      if echo "${flag}" | grep -q '^-[ID]'; then
        if test "${flag}" != "-D_DEBUG" ; then
          if test "${LLVM_CFLAGS}" != "" ; then
            LLVM_CFLAGS="${LLVM_CFLAGS} "
          fi
          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
        fi
      fi
    done
    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"

    unset LLVM_LDFLAGS
    for flag in $("${LLVM_CONFIG}" --ldflags); do
      if echo "${flag}" | grep -q '^-L'; then
        if test "${LLVM_LDFLAGS}" != ""; then
          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
        fi
        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
      fi
    done

    unset LLVM_LIBS
    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
      if echo "${flag}" | grep -q '^-l'; then
        if test "${LLVM_LIBS}" != ""; then
          LLVM_LIBS="${LLVM_LIBS} "
        fi
        LLVM_LIBS="${LLVM_LIBS}${flag}"
      fi
    done




  fi

  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
  fi

  # TODO better (platform agnostic) test
  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
    LIBCXX="-lstdc++"
  fi




  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then


# Check whether --with-msvcr-dll was given.
if test "${with_msvcr_dll+set}" = set; then :
  withval=$with_msvcr_dll;
fi


  if test "x$with_msvcr_dll" != x; then
    # If given explicitely by user, do not probe. If not present, fail directly.

  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
  METHOD="--with-msvcr-dll"
  if test -e "$POSSIBLE_MSVCR_DLL"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}

    # Need to check if the found msvcr is correct architecture
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
        CORRECT_MSVCR_ARCH="PE32 executable"
      else
        CORRECT_MSVCR_ARCH="PE32+ executable"
      fi
    else
      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
        CORRECT_MSVCR_ARCH=386
      else
        CORRECT_MSVCR_ARCH=x86-64
      fi
    fi
    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
$as_echo_n "checking for msvcr100.dll... " >&6; }
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
$as_echo "$MSVCR_DLL" >&6; }
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
$as_echo "incorrect, ignoring" >&6; }
      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
    fi
  fi

    if test "x$MSVCR_DLL" = x; then
      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
    fi
  fi

  if test "x$MSVCR_DLL" = x; then
    # Probe: Using well-known location from Visual Studio 10.0
    if test "x$VCINSTALLDIR" != x; then
      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"

  windows_path="$CYGWIN_VC_INSTALL_DIR"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    CYGWIN_VC_INSTALL_DIR="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    CYGWIN_VC_INSTALL_DIR="$unix_path"
  fi

      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
      else
        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
      fi

  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
  METHOD="well-known location in VCINSTALLDIR"
  if test -e "$POSSIBLE_MSVCR_DLL"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}

    # Need to check if the found msvcr is correct architecture
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
        CORRECT_MSVCR_ARCH="PE32 executable"
      else
        CORRECT_MSVCR_ARCH="PE32+ executable"
      fi
    else
      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
        CORRECT_MSVCR_ARCH=386
      else
        CORRECT_MSVCR_ARCH=x86-64
      fi
    fi
    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
$as_echo_n "checking for msvcr100.dll... " >&6; }
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
$as_echo "$MSVCR_DLL" >&6; }
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
$as_echo "incorrect, ignoring" >&6; }
      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
    fi
  fi

    fi
  fi

  if test "x$MSVCR_DLL" = x; then
    # Probe: Check in the Boot JDK directory.
    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"

  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
  METHOD="well-known location in Boot JDK"
  if test -e "$POSSIBLE_MSVCR_DLL"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}

    # Need to check if the found msvcr is correct architecture
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
        CORRECT_MSVCR_ARCH="PE32 executable"
      else
        CORRECT_MSVCR_ARCH="PE32+ executable"
      fi
    else
      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
        CORRECT_MSVCR_ARCH=386
      else
        CORRECT_MSVCR_ARCH=x86-64
      fi
    fi
    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
$as_echo_n "checking for msvcr100.dll... " >&6; }
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
$as_echo "$MSVCR_DLL" >&6; }
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
$as_echo "incorrect, ignoring" >&6; }
      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
    fi
  fi

  fi

  if test "x$MSVCR_DLL" = x; then
    # Probe: Look in the Windows system32 directory
    CYGWIN_SYSTEMROOT="$SYSTEMROOT"

  windows_path="$CYGWIN_SYSTEMROOT"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    CYGWIN_SYSTEMROOT="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    CYGWIN_SYSTEMROOT="$unix_path"
  fi

    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"

  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
  METHOD="well-known location in SYSTEMROOT"
  if test -e "$POSSIBLE_MSVCR_DLL"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}

    # Need to check if the found msvcr is correct architecture
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
        CORRECT_MSVCR_ARCH="PE32 executable"
      else
        CORRECT_MSVCR_ARCH="PE32+ executable"
      fi
    else
      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
        CORRECT_MSVCR_ARCH=386
      else
        CORRECT_MSVCR_ARCH=x86-64
      fi
    fi
    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
$as_echo_n "checking for msvcr100.dll... " >&6; }
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
$as_echo "$MSVCR_DLL" >&6; }
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
$as_echo "incorrect, ignoring" >&6; }
      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
    fi
  fi

  fi

  if test "x$MSVCR_DLL" = x; then
    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
    if test "x$VS100COMNTOOLS" != x; then
      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."

  windows_path="$CYGWIN_VS_TOOLS_DIR"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    CYGWIN_VS_TOOLS_DIR="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    CYGWIN_VS_TOOLS_DIR="$unix_path"
  fi

      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
      else
        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
      fi

  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
  METHOD="search of VS100COMNTOOLS"
  if test -e "$POSSIBLE_MSVCR_DLL"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}

    # Need to check if the found msvcr is correct architecture
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
        CORRECT_MSVCR_ARCH="PE32 executable"
      else
        CORRECT_MSVCR_ARCH="PE32+ executable"
      fi
    else
      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
        CORRECT_MSVCR_ARCH=386
      else
        CORRECT_MSVCR_ARCH=x86-64
      fi
    fi
    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
$as_echo_n "checking for msvcr100.dll... " >&6; }
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
$as_echo "$MSVCR_DLL" >&6; }
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
$as_echo "incorrect, ignoring" >&6; }
      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
    fi
  fi

    fi
  fi

  if test "x$MSVCR_DLL" = x; then
    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
    # (This was the original behaviour; kept since it might turn up something)
    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
      else
        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
        if test "x$POSSIBLE_MSVCR_DLL" = x; then
          # We're grasping at straws now...
          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
        fi
      fi


  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
  METHOD="search of VCINSTALLDIR"
  if test -e "$POSSIBLE_MSVCR_DLL"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}

    # Need to check if the found msvcr is correct architecture
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
        CORRECT_MSVCR_ARCH="PE32 executable"
      else
        CORRECT_MSVCR_ARCH="PE32+ executable"
      fi
    else
      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
        CORRECT_MSVCR_ARCH=386
      else
        CORRECT_MSVCR_ARCH=x86-64
      fi
    fi
    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
$as_echo_n "checking for msvcr100.dll... " >&6; }
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
$as_echo "$MSVCR_DLL" >&6; }
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
$as_echo "incorrect, ignoring" >&6; }
      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
    fi
  fi

    fi
  fi

  if test "x$MSVCR_DLL" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
$as_echo_n "checking for msvcr100.dll... " >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
  fi


  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

  # Input might be given as Windows format, start by converting to
  # unix format.
  path="$MSVCR_DLL"
  new_path=`$CYGPATH -u "$path"`

  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  # "foo.exe" is OK but "foo" is an error.
  #
  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  # It is also a way to make sure we got the proper file name for the real test later on.
  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  if test "x$test_shortpath" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
  fi

  # Call helper function which possibly converts this using DOS-style short mode.
  # If so, the updated path is stored in $new_path.

  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
      # Going to short mode and back again did indeed matter. Since short mode is
      # case insensitive, let's make it lowercase to improve readability.
      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
      # Now convert it back to Unix-stile (cygpath)
      input_path=`$CYGPATH -u "$shortmode_path"`
      new_path="$input_path"
    fi
  fi

  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  if test "x$test_cygdrive_prefix" = x; then
    # As a simple fix, exclude /usr/bin since it's not a real path.
    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
      # a path prefixed by /cygdrive for fixpath to work.
      new_path="$CYGWIN_ROOT_PATH$input_path"
    fi
  fi


  if test "x$path" != "x$new_path"; then
    MSVCR_DLL="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
  fi

  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then

  path="$MSVCR_DLL"
  has_colon=`$ECHO $path | $GREP ^.:`
  new_path="$path"
  if test "x$has_colon" = x; then
    # Not in mixed or Windows style, start by that.
    new_path=`cmd //c echo $path`
  fi


  input_path="$new_path"
  # Check if we need to convert this using DOS-style short mode. If the path
  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  # take no chances and rewrite it.
  # Note: m4 eats our [], so we need to use [ and ] instead.
  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  if test "x$has_forbidden_chars" != x; then
    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  fi


  windows_path="$new_path"
  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    unix_path=`$CYGPATH -u "$windows_path"`
    new_path="$unix_path"
  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
    new_path="$unix_path"
  fi

  if test "x$path" != "x$new_path"; then
    MSVCR_DLL="$new_path"
    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
  fi

  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")

  else
    # We're on a posix platform. Hooray! :)
    path="$MSVCR_DLL"
    has_space=`$ECHO "$path" | $GREP " "`
    if test "x$has_space" != x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
    fi

    # Use eval to expand a potential ~
    eval path="$path"
    if test ! -f "$path" && test ! -d "$path"; then
      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
    fi

    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
  fi




# Check whether --with-dxsdk was given.
if test "${with_dxsdk+set}" = set; then :
  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
fi




# Check whether --with-dxsdk-lib was given.
if test "${with_dxsdk_lib+set}" = set; then :
  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
fi




# Check whether --with-dxsdk-include was given.
if test "${with_dxsdk_include+set}" = set; then :
  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
fi


  fi



###############################################################################
#
# We need to do some final tweaking, when everything else is done.
#
###############################################################################


  HOTSPOT_MAKE_ARGS="$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



    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }

    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
      ENABLE_INTREE_EC=yes
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
    else
      ENABLE_INTREE_EC=no
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
    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 (or cygwin) system
    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
    FOUND_CORES=yes
  elif 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
  elif 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
  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
    FOUND_CORES=yes
  elif test -n "$NUMBER_OF_PROCESSORS"; then
    # On windows, look in the env
    NUM_CORES=$NUMBER_OF_PROCESSORS
    FOUND_CORES=yes
  fi

  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; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
  fi

  else
    NUM_CORES=$with_num_cores
  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 1024 MB
  MEMORY_SIZE=1024
  FOUND_MEM=no

  if test -f /proc/meminfo; then
    # Looks like a Linux (or cygwin) system
    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
    FOUND_MEM=yes
  elif test -x /usr/sbin/prtconf; then
    # Looks like a Solaris or AIX system
    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
    FOUND_MEM=yes
  elif 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
  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
    # Windows, but without cygwin
    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
    FOUND_MEM=yes
  fi

  if test "x$FOUND_MEM" = xyes; then
    { $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 $MEMORY_SIZE MB" >&5
$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
  fi

  else
    MEMORY_SIZE=$with_memory_size
  fi



  # Provide a decent default number of parallel jobs for make depending on
  # number of cores, amount of memory and machine architecture.

# Check whether --with-jobs was given.
if test "${with_jobs+set}" = set; then :
  withval=$with_jobs;
fi

  if test "x$with_jobs" = x; then
    # Number of jobs was not specified, calculate.
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
    # Approximate memory in GB.
    memory_gb=`expr $MEMORY_SIZE / 1024`
    # Pick the lowest of memory in gb and number of cores.
    if test "$memory_gb" -lt "$NUM_CORES"; then
      JOBS="$memory_gb"
    else
      JOBS="$NUM_CORES"
      # On bigger machines, leave some room for other processes to run
      if test "$JOBS" -gt "4"; then
        JOBS=`expr $JOBS '*' 90 / 100`
      fi
    fi
    # Cap number of jobs to 16
    if test "$JOBS" -gt "16"; then
      JOBS=16
    fi
    if test "$JOBS" -eq "0"; then
      JOBS=1
    fi
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
$as_echo "$JOBS" >&6; }
  else
    JOBS=$with_jobs
  fi



# Setup arguments for the boot jdk (after cores and memory have been setup)

  ##############################################################################
  #
  # Specify jvm options for anything that is run with the Boot JDK.
  # Not all JVM:s accept the same arguments on the command line.
  #

# Check whether --with-boot-jdk-jvmargs was given.
if test "${with_boot_jdk_jvmargs+set}" = set; then :
  withval=$with_boot_jdk_jvmargs;
fi


  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
$as_echo_n "checking flags for boot jdk java command ... " >&6; }

  # Disable special log output when a debug build is used as Boot JDK...

  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
  FOUND_VERSION=`$ECHO $OUTPUT | 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"
    JVM_ARG_OK=true
  else
    $ECHO "Arg failed:" >&5
    $ECHO "$OUTPUT" >&5
    JVM_ARG_OK=false
  fi


  # Apply user provided options.

  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
    JVM_ARG_OK=true
  else
    $ECHO "Arg failed:" >&5
    $ECHO "$OUTPUT" >&5
    JVM_ARG_OK=false
  fi


  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
$as_echo "$boot_jdk_jvmargs" >&6; }

  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
  JAVA_FLAGS=$boot_jdk_jvmargs



  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }

  # Starting amount of heap memory.

  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
  $ECHO "Command: $JAVA -Xms64M -version" >&5
  OUTPUT=`$JAVA -Xms64M -version 2>&1`
  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
    JVM_ARG_OK=true
  else
    $ECHO "Arg failed:" >&5
    $ECHO "$OUTPUT" >&5
    JVM_ARG_OK=false
  fi


  # Maximum amount of heap memory.
  # Maximum stack size.
  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
  if test "x$BUILD_NUM_BITS" = x32; then
    if test "$JVM_MAX_HEAP" -gt "1100"; then
      JVM_MAX_HEAP=1100
    elif test "$JVM_MAX_HEAP" -lt "512"; then
      JVM_MAX_HEAP=512
    fi
    STACK_SIZE=768
  else
    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
    # pointers are used. Apparently, we need to increase the heap and stack
    # space for the jvm. More specifically, when running javac to build huge
    # jdk batch
    if test "$JVM_MAX_HEAP" -gt "1600"; then
      JVM_MAX_HEAP=1600
    elif test "$JVM_MAX_HEAP" -lt "512"; then
      JVM_MAX_HEAP=512
    fi
    STACK_SIZE=1536
  fi

  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
    JVM_ARG_OK=true
  else
    $ECHO "Arg failed:" >&5
    $ECHO "$OUTPUT" >&5
    JVM_ARG_OK=false
  fi


  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
    JVM_ARG_OK=true
  else
    $ECHO "Arg failed:" >&5
    $ECHO "$OUTPUT" >&5
    JVM_ARG_OK=false
  fi


  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
$as_echo "$boot_jdk_jvmargs_big" >&6; }

  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big



  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }

  # Use serial gc for small short lived tools if possible

  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
    JVM_ARG_OK=true
  else
    $ECHO "Arg failed:" >&5
    $ECHO "$OUTPUT" >&5
    JVM_ARG_OK=false
  fi


  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
  $ECHO "Command: $JAVA -Xms32M -version" >&5
  OUTPUT=`$JAVA -Xms32M -version 2>&1`
  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
    JVM_ARG_OK=true
  else
    $ECHO "Arg failed:" >&5
    $ECHO "$OUTPUT" >&5
    JVM_ARG_OK=false
  fi


  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
  $ECHO "Command: $JAVA -Xmx512M -version" >&5
  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
    JVM_ARG_OK=true
  else
    $ECHO "Arg failed:" >&5
    $ECHO "$OUTPUT" >&5
    JVM_ARG_OK=false
  fi


  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
$as_echo "$boot_jdk_jvmargs_small" >&6; }

  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small


  JAVA_TOOL_FLAGS_SMALL=""
  for f in $JAVA_FLAGS_SMALL; do
    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
  done



# Setup smart javac (after cores and memory have been setup)


# Check whether --with-sjavac-server-java was given.
if test "${with_sjavac_server_java+set}" = set; then :
  withval=$with_sjavac_server_java;
fi


  if test "x$with_sjavac_server_java" != x; then
    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
    if test "x$FOUND_VERSION" = x; then
      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
    fi
  else
    SJAVAC_SERVER_JAVA="$JAVA"
  fi


  if test "$MEMORY_SIZE" -gt "3000"; then

  $ECHO "Check if jvm arg is ok: -d64" >&5
  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
    JVM_ARG_OK=true
  else
    $ECHO "Arg failed:" >&5
    $ECHO "$OUTPUT" >&5
    JVM_ARG_OK=false
  fi

    if test "$JVM_ARG_OK" = true; then
      JVM_64BIT=true
      JVM_ARG_OK=false
    fi
  fi

  MX_VALUE=`expr $MEMORY_SIZE / 2`
  if test "$JVM_64BIT" = true; then
    # Set ms lower than mx since more than one instance of the server might
    # get launched at the same time before they figure out which instance won.
    MS_VALUE=512
    if test "$MX_VALUE" -gt "2048"; then
      MX_VALUE=2048
    fi
  else
    MS_VALUE=256
    if test "$MX_VALUE" -gt "1500"; then
      MX_VALUE=1500
    fi
  fi
  if test "$MX_VALUE" -lt "512"; then
    MX_VALUE=512
  fi

  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
    JVM_ARG_OK=true
  else
    $ECHO "Arg failed:" >&5
    $ECHO "$OUTPUT" >&5
    JVM_ARG_OK=false
  fi



  # Check whether --enable-sjavac was given.
if test "${enable_sjavac+set}" = set; then :
  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
else
  ENABLE_SJAVAC='no'
fi

  if test "x$JVM_ARG_OK" = "xfalse"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
    ENABLE_SJAVAC=no;
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
$as_echo_n "checking whether to use sjavac... " >&6; }
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
$as_echo "$ENABLE_SJAVAC" >&6; }


  if test "x$ENABLE_SJAVAC" = xyes; then
    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
  else
    SJAVAC_SERVER_DIR=
  fi



# 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$TOOLCHAIN_TYPE" = xgcc; 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 2>&5 >&5
      if test ! -f conftest.hpp.gch; then
        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 conftest.hpp.gch
    fi
  fi




# Setup use of ccache, if available

  # Check whether --enable-ccache was given.
if test "${enable_ccache+set}" = set; then :
  enableval=$enable_ccache;
fi


  CCACHE=
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
$as_echo_n "checking is ccache enabled... " >&6; }
  ENABLE_CCACHE=$enable_ccache
  if test "x$enable_ccache" = xyes; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
    OLD_PATH="$PATH"
    if test "x$TOOLCHAIN_PATH" != x; then
      PATH=$TOOLCHAIN_PATH:$PATH
    fi



  # Publish this variable in the help.


  if test "x$CCACHE" = x; then
    # The variable is not set by user, try to locate tool using the code snippet
    for ac_prog in ccache
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 ${ac_cv_path_CCACHE+:} false; 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 as_fn_executable_p "$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


  test -n "$CCACHE" && break
done

  else
    # The variable is set, but is it from the command line or the environment?

    # Try to remove the string !CCACHE! from our list.
    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
      # If it failed, the variable was not from the command line. Ignore it,
      # but warn the user (except for BASH, which is always set by the calling BASH).
      if test "xCCACHE" != xBASH; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
      fi
      # Try to locate tool using the code snippet
      for ac_prog in ccache
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 ${ac_cv_path_CCACHE+:} false; 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 as_fn_executable_p "$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


  test -n "$CCACHE" && break
done

    else
      # If it succeeded, then it was overridden by the user. We will use it
      # for the tool.

      # First remove it from the list of overridden variables, so we can test
      # for unknown variables in the end.
      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"

      # Check if the provided tool contains a complete path.
      tool_specified="$CCACHE"
      tool_basename="${tool_specified##*/}"
      if test "x$tool_basename" = "x$tool_specified"; then
        # A command without a complete path is provided, search $PATH.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
        # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_CCACHE+:} false; 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 as_fn_executable_p "$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


        if test "x$CCACHE" = x; then
          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
        fi
      else
        # Otherwise we believe it is a complete path. Use it as it is.
        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
$as_echo_n "checking for CCACHE... " >&6; }
        if test ! -x "$tool_specified"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
      fi
    fi
  fi



  if test "x$CCACHE" = x; then
    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
  fi


    CCACHE_STATUS="enabled"
    PATH="$OLD_PATH"
  elif test "x$enable_ccache" = xno; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
$as_echo "no, explicitly disabled" >&6; }
  elif test "x$enable_ccache" = x; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
  else
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
$as_echo "unknown" >&6; }
    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
  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"
    if test "x$CCACHE" = x; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
    fi
  fi

  if test "x$CCACHE" != x; then

  if test "x$CCACHE" != x; then
    # 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=
      CCACHE_STATUS="disabled"
    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=
        CCACHE_STATUS="disabled"
      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

  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    file_to_test="$SRC_ROOT/LICENSE"
    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
      as_fn_error $? "Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin." "$LINENO" 5
    fi
  fi


  # Did user specify any unknown variables?

  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
    # Replace the separating ! with spaces before presenting for end user.
    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
  fi


  { $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 test "x$DF" = x; then
    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
      # msys does not have df; use Windows "net use" instead.
      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
      if test "x$IS_NETWORK_DISK" = x; then
        OUTPUT_DIR_IS_LOCAL="yes"
      else
        OUTPUT_DIR_IS_LOCAL="no"
      fi
    else
      # No df here, say it's local
      OUTPUT_DIR_IS_LOCAL="yes"
    fi
  else
    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
      OUTPUT_DIR_IS_LOCAL="yes"
    else
      OUTPUT_DIR_IS_LOCAL="no"
    fi
  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


# At the end, call the custom hook. (Dummy macro if no custom 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
    if test "x$cache_file" != "x/dev/null"; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
$as_echo "$as_me: updating cache $cache_file" >&6;}
      if test ! -f "$cache_file" || test -h "$cache_file"; then
	cat confcache >"$cache_file"
      else
        case $cache_file in #(
        */* | ?:*)
	  mv -f confcache "$cache_file"$$ &&
	  mv -f "$cache_file"$$ "$cache_file" ;; #(
        *)
	  mv -f confcache "$cache_file" ;;
	esac
      fi
    fi
  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}'

# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
#
# If the first sed substitution is executed (which looks for macros that
# take arguments), then branch to the quote section.  Otherwise,
# look for a macro that doesn't take arguments.
ac_script='
:mline
/\\$/{
 N
 s,\\\n,,
 b mline
}
t clear
:clear
s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
t quote
s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
t quote
b any
:quote
s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
s/\[/\\&/g
s/\]/\\&/g
s/\$/$$/g
H
:any
${
	g
	s/^\n//
	s/\n/ /g
	p
}
'
DEFS=`sed -n "$ac_script" confdefs.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.
as_myself=
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 -pR'.
    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
      as_ln_s='cp -pR'
  elif ln conf$$.file conf$$ 2>/dev/null; then
    as_ln_s=ln
  else
    as_ln_s='cp -pR'
  fi
else
  as_ln_s='cp -pR'
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


# as_fn_executable_p FILE
# -----------------------
# Test if FILE is an executable regular file.
as_fn_executable_p ()
{
  test -f "$1" && test -x "$1"
} # as_fn_executable_p
as_test_x='test -x'
as_executable_p=as_fn_executable_p

# 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 jdk9, which was
generated by GNU Autoconf 2.69.  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



cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
config_files="$ac_config_files"

_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

Configuration files:
$config_files

Report bugs to <build-dev@openjdk.java.net>.
OpenJDK home page: <http://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 jdk9
configured by $0, generated by GNU Autoconf 2.69,
  with options \\"\$ac_cs_config\\"

Copyright (C) 2012 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;;
  --he | --h |  --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/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.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
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= ac_tmp=
  trap 'exit_status=$?
  : "${ac_tmp:=$tmp}"
  { test ! -d "$ac_tmp" || rm -fr "$ac_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 -d "$tmp"
}  ||
{
  tmp=./conf$$-$RANDOM
  (umask 077 && mkdir "$tmp")
} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
ac_tmp=$tmp

# 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 {' >"$ac_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 >>"\$ac_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 >>"\$ac_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 < "$ac_tmp/subs1.awk" > "$ac_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"


eval set X "  :F $CONFIG_FILES      "
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="$ac_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 >"$ac_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 "$ac_tmp/subs.awk" \
  >$ac_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' "$ac_tmp/out"`; test -n "$ac_out"; } &&
  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
      "$ac_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 "$ac_tmp/stdin"
  case $ac_file in
  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
  esac \
  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
 ;;



  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


# Try to move the config.log file to the output directory.
if test -e ./config.log; then
  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
fi

# Make the compare script executable
$CHMOD +x $OUTPUT_ROOT/compare.sh

# Finally output some useful information to the user

  # Finally output some useful information to the user

  printf "\n"
  printf "====================================================\n"
  if test "x$no_create" != "xyes"; then
    if test "x$IS_RECONFIGURE" != "xyes"; then
      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
    else
      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
    fi
  else
    if test "x$IS_RECONFIGURE" != "xyes"; then
      printf "A configuration has been successfully checked but not created\n"
    else
      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
    fi
  fi
  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 "* HS debug level: $HOTSPOT_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 "\n"
  printf "Tools summary:\n"
  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
  fi
  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"

  printf "\n"
  printf "Build performance summary:\n"
  printf "* Cores to use:   $JOBS\n"
  printf "* Memory limit:   $MEMORY_SIZE MB\n"
  if test "x$CCACHE_STATUS" != "x"; then
    printf "* ccache status:  $CCACHE_STATUS\n"
  fi
  printf "\n"

  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" && test "x$no_create" != "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

  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
    printf "WARNING: The result of this configuration was not saved.\n"
    printf "You should run without '--no-create | -n' to create the configuration.\n"
    printf "\n"
  fi